Rev | Line | |
---|
[34] | 1 | # This demonstrates a bug where an xs_acknowledge_watch returns |
---|
| 2 | # EINVAL, because the daemon doesn't track what watch event it sent |
---|
| 3 | # and relies on it being the "first" watch which has an event. |
---|
| 4 | # Watches firing after the first event is sent out will change this. |
---|
| 5 | |
---|
| 6 | # Create three things to watch. |
---|
| 7 | mkdir /test |
---|
| 8 | mkdir /test/1 |
---|
| 9 | mkdir /test/2 |
---|
| 10 | mkdir /test/3 |
---|
| 11 | |
---|
| 12 | # Watch all three, fire event on 2, read watch, fire event on 1 and 3, ack 2. |
---|
| 13 | 1 watch /test/1 token1 |
---|
| 14 | 1 watch /test/2 token2 |
---|
| 15 | 1 watch /test/3 token3 |
---|
| 16 | 2 write /test/2 contents2 |
---|
| 17 | expect 1:/test/2:token2 |
---|
| 18 | 1 waitwatch |
---|
| 19 | 3 write /test/1 contents1 |
---|
| 20 | 4 write /test/3 contents3 |
---|
| 21 | 1 close |
---|
Note: See
TracBrowser
for help on using the repository browser.