Please note that the CVS and issue trackers have moved to GitHub. These Trac pages are no longer kept up-to-date.

root/seattle/branches/nacl_repy/seattlelib/tests/ut_lind_fs_fstat_complex.py

Revision 5964, 0.5 KB (checked in by nitin, 5 years ago)

filesystem will use load_fs() instead of _blank_init_fs()

Line 
1import lind_test_server
2from lind_fs_constants import *
3
4# this is very similar to the stat complex test, I had to remove the links
5# though
6
7# Let's add a few files, etc. to the system and see if it works...
8lind_test_server.load_fs()
9
10myfd = lind_test_server.open_syscall('/foo',O_CREAT | O_WRONLY,S_IRWXA)
11
12# write should succeed
13assert(lind_test_server.write_syscall(myfd,'hi') == 2)
14
15stat_result = lind_test_server.fstat_syscall(myfd)
16
17# ensure the file has size 2
18assert(stat_result[7] == 2)
19
20# ensure the link count is 1
21assert(stat_result[3] == 1)
Note: See TracBrowser for help on using the browser.