xen-vtx-unstable

view tools/xenstore/testsuite/14complexperms.test @ 6774:4d899a738d59

merge?
author cl349@firebug.cl.cam.ac.uk
date Tue Sep 13 15:05:49 2005 +0000 (2005-09-13)
parents f804b28871ba dd668f7527cb
children e7c7196fa329 8ca0f98ba8e2
line source
1 # We should not be able to tell the difference between a node which
2 # doesn't exist, and a node we don't have permission on, if we don't
3 # have permission on it directory.
5 mkdir /dir
6 setperm /dir 0 NONE
8 # First when it doesn't exist
9 setid 1
10 expect *Permission denied
11 dir /dir/file
12 expect *Permission denied
13 read /dir/file
14 expect *Permission denied
15 write /dir/file none value
16 expect *Permission denied
17 write /dir/file create value
18 expect *Permission denied
19 write /dir/file excl value
20 expect write failed: Invalid argument
21 write /dir/file crap value
22 expect *Permission denied
23 mkdir /dir/file
24 expect *Permission denied
25 rm /dir/file
26 expect *Permission denied
27 rm /dir
28 expect *Permission denied
29 getperm /dir/file
30 expect *Permission denied
31 setperm /dir/file 0 NONE
32 watch /dir/file token
33 1 write /dir/file create contents
34 1 rm /dir/file
35 expect waitwatch failed: Connection timed out
36 waitwatch
37 unwatch /dir/file token
38 expect *No such file or directory
39 unwatch /dir/file token
40 expect *Permission denied
41 start /dir/file
42 expect *No such file or directory
43 abort
44 expect *Permission denied
45 start /dir/file
46 expect *No such file or directory
47 commit
48 expect *Permission denied
49 introduce 2 100 7 /dir/file
51 # Now it exists
52 setid 0
53 write /dir/file create contents
55 setid 1
56 expect *Permission denied
57 dir /dir/file
58 expect *Permission denied
59 read /dir/file
60 expect *Permission denied
61 write /dir/file none value
62 expect *Permission denied
63 write /dir/file create value
64 expect *Permission denied
65 write /dir/file excl value
66 expect write failed: Invalid argument
67 write /dir/file crap value
68 expect *Permission denied
69 mkdir /dir/file
70 expect *Permission denied
71 rm /dir/file
72 expect *Permission denied
73 rm /dir
74 expect *Permission denied
75 getperm /dir/file
76 expect *Permission denied
77 setperm /dir/file 0 NONE
78 watch /dir/file token
79 1 write /dir/file create contents
80 1 rm /dir/file
81 expect waitwatch failed: Connection timed out
82 waitwatch
83 unwatch /dir/file token
84 expect *No such file or directory
85 unwatch /dir/file token
86 expect *Permission denied
87 start /dir/file
88 expect *No such file or directory
89 abort
90 expect *Permission denied
91 start /dir/file
92 expect *No such file or directory
93 commit
94 expect *Permission denied
95 introduce 2 100 7 /dir/file