ia64/xen-unstable

view tools/xenstore/testsuite/14complexperms.test @ 6946:e703abaf6e3d

Add behaviour to the remove methods to remove the transaction's path itself. This allows us to write Remove(path) to remove the specified path rather than having to slice the path ourselves.
author emellor@ewan
date Sun Sep 18 14:42:13 2005 +0100 (2005-09-18)
parents 3233e7ecfa9f
children f7a7f8f2e6e4 872cf6ee0594
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