# This demonstrates a bug where an xs_acknowledge_watch returns # EINVAL, because the daemon doesn't track what watch event it sent # and relies on it being the "first" watch which has an event. # Watches firing after the first event is sent out will change this. # Create three things to watch. mkdir /test mkdir /test/1 mkdir /test/2 mkdir /test/3 # Watch all three, fire event on 2, read watch, fire event on 1 and 3, ack 2. 1 watch /test/1 token1 1 watch /test/2 token2 1 watch /test/3 token3 2 write /test/2 contents2 expect 1:/test/2:token2 1 waitwatch 3 write /test/1 contents1 4 write /test/3 contents3 1 close