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_rmdir.py

Revision 5140, 0.6 KB (checked in by justinc, 6 years ago)

removed circular imports and created a new Python testing mechanism called
lind_test_server. This removes the need for wrappers, etc.

Line 
1import lind_test_server
2
3from lind_fs_constants import *
4
5# Let's add a few directories to the system and see if it works...
6lind_test_server._blank_fs_init()
7
8lind_test_server.mkdir_syscall('/bar',S_IRWXA)
9
10lind_test_server.mkdir_syscall('/bar/baz',S_IRWXA)
11
12lind_test_server.access_syscall('/bar/baz',F_OK)
13
14# should not be able
15try:
16  lind_test_server.rmdir_syscall('/bar')
17except:
18  pass
19else:
20  print 'could remove directory with items inside!!!'
21
22lind_test_server.rmdir_syscall('/bar/baz')
23try:
24  lind_test_server.access_syscall('/bar/baz',F_OK)
25except:
26  pass
27else:
28  print 'error!   Directory exists after removal'
29
30
Note: See TracBrowser for help on using the browser.