ia64/xen-unstable

view tools/xenstore/testsuite/11domain-watch.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 # Test watching from a domain.
3 # Watch something, write to it, check watch has fired.
4 write /test create contents
5 mkdir /dir
7 expect handle is 1
8 introduce 1 100 7 /my/home
9 1 watch /test token
10 write /test create contents2
11 expect 1:/test:token
12 1 waitwatch
13 1 ackwatch token
14 1 unwatch /test token
15 release 1
16 1 close
18 # ignore watches while doing commands, should work.
19 expect handle is 1
20 introduce 1 100 7 /my/home
21 1 watch /dir token
22 write /dir/test create contents
23 1 write /dir/test2 create contents2
24 1 write /dir/test3 create contents3
25 1 write /dir/test4 create contents4
26 expect 1:/dir/test:token
27 1 waitwatch
28 1 ackwatch token
29 release 1
30 1 close
32 # unwatch
33 expect handle is 1
34 introduce 1 100 7 /my/home
35 1 watch /dir token1
36 1 unwatch /dir token1
37 1 watch /dir token2
38 write /dir/test2 create contents
39 expect 1:/dir/test2:token2
40 1 waitwatch
41 1 unwatch /dir token2
42 release 1
43 1 close
45 # unwatch while watch pending.
46 expect handle is 1
47 introduce 1 100 7 /my/home
48 1 watch /dir token1
49 write /dir/test2 create contents
50 1 unwatch /dir token1
51 release 1
52 1 close