{0}12:22:50‣~/llnl/flux-core/t❦./t1000-kvs.t -d -v sharness: loading extensions from /home/users/spollard/llnl/flux-core/t/sharness.d/01-setup.sh sharness: loading extensions from /home/users/spollard/llnl/flux-core/t/sharness.d/flux-sharness.sh sharness: loading extensions from /home/users/spollard/llnl/flux-core/t/sharness.d/01-setup.sh sharness: loading extensions from /home/users/spollard/llnl/flux-core/t/sharness.d/flux-sharness.sh # ./t1000-kvs.t: flux session size will be 17 expecting success: flux kvs put $KEY.integer=42 ok 1 - kvs: integer put expecting success: flux kvs put $KEY.double=3.14 ok 2 - kvs: double put expecting success: flux kvs put $KEY.string=foo ok 3 - kvs: string put expecting success: flux kvs put $KEY.emptystring= ok 4 - kvs: empty string put expecting success: flux kvs put $KEY.jsonnull=null ok 5 - kvs: JSON null is converted to string put expecting success: flux kvs put $KEY.booleantrue=true ok 6 - kvs: boolean true put expecting success: flux kvs put $KEY.booleanfalse=false ok 7 - kvs: boolean false put expecting success: flux kvs put $KEY.array="[1,3,5]" ok 8 - kvs: array put expecting success: flux kvs put $KEY.object="{\"a\":42}" ok 9 - kvs: object put expecting success: flux kvs mkdir $SUBDIR1 ok 10 - kvs: mkdir expecting success: test_kvs_key $KEY.integer 42 flux-kvs: test.a.b.c.integer: No such file or directory --- output 2017-10-17 19:23:23.177003410 +0000 +++ expected 2017-10-17 19:23:23.276999027 +0000 @@ -0,0 +1 @@ +42 not ok 11 - kvs: integer get # # test_kvs_key $KEY.integer 42 # expecting success: test_kvs_key $KEY.double 3.140000 flux-kvs: test.a.b.c.double: No such file or directory --- output 2017-10-17 19:23:23.288998501 +0000 +++ expected 2017-10-17 19:23:23.388994117 +0000 @@ -0,0 +1 @@ +3.140000 not ok 12 - kvs: double get # # test_kvs_key $KEY.double 3.140000 # expecting success: test_kvs_key $KEY.string foo flux-kvs: test.a.b.c.string: No such file or directory --- output 2017-10-17 19:23:23.396993766 +0000 +++ expected 2017-10-17 19:23:23.488989734 +0000 @@ -0,0 +1 @@ +foo not ok 13 - kvs: string get # # test_kvs_key $KEY.string foo # expecting success: test_kvs_key $KEY.emptystring "" flux-kvs: test.a.b.c.emptystring: No such file or directory --- output 2017-10-17 19:23:23.496989383 +0000 +++ expected 2017-10-17 19:23:23.588985350 +0000 @@ -0,0 +1 @@ + not ok 14 - kvs: empty string get # # test_kvs_key $KEY.emptystring "" # expecting success: test_kvs_key $KEY.jsonnull "null" flux-kvs: test.a.b.c.jsonnull: No such file or directory --- output 2017-10-17 19:23:23.596985000 +0000 +++ expected 2017-10-17 19:23:23.684981142 +0000 @@ -0,0 +1 @@ +null not ok 15 - kvs: JSON null is converted to string get # # test_kvs_key $KEY.jsonnull "null" # expecting success: test_kvs_key $KEY.booleantrue true flux-kvs: test.a.b.c.booleantrue: No such file or directory --- output 2017-10-17 19:23:23.696980616 +0000 +++ expected 2017-10-17 19:23:23.784976758 +0000 @@ -0,0 +1 @@ +true not ok 16 - kvs: boolean true get # # test_kvs_key $KEY.booleantrue true # expecting success: test_kvs_key $KEY.booleanfalse false flux-kvs: test.a.b.c.booleanfalse: No such file or directory --- output 2017-10-17 19:23:23.796976232 +0000 +++ expected 2017-10-17 19:23:23.892972024 +0000 @@ -0,0 +1 @@ +false not ok 17 - kvs: boolean false get # # test_kvs_key $KEY.booleanfalse false # expecting success: test_kvs_key $KEY.array "[1, 3, 5]" flux-kvs: test.a.b.c.array: No such file or directory --- output 2017-10-17 19:23:23.900971674 +0000 +++ expected 2017-10-17 19:23:23.992967641 +0000 @@ -0,0 +1 @@ +[1, 3, 5] not ok 18 - kvs: array get # # test_kvs_key $KEY.array "[1, 3, 5]" # expecting success: test_kvs_key $KEY.object "{\"a\": 42}" flux-kvs: test.a.b.c.object: No such file or directory --- output 2017-10-17 19:23:24.000967290 +0000 +++ expected 2017-10-17 19:23:24.080963783 +0000 @@ -0,0 +1 @@ +{"a": 42} not ok 19 - kvs: object get # # test_kvs_key $KEY.object "{\"a\": 42}" # expecting success: flux kvs dir $DIR | sort >output cat >expected <output # cat >expected <output cat >expected <output # cat >expected <output cat >expected <output # cat >expected <output cat >expected <output # cat >expected <output cat >expected <output # cat >expected <output cat >expected <output # cat >expected <output && cat >expected <output && # cat >expected <output && cat >expected <output && # cat >expected <output cat >expected <output # cat >expected </dev/null && flux kvs put $DIR.link.X=42 && flux kvs readlink $DIR.link >/dev/null && test_kvs_key $DIR.link.X 42 && test_kvs_key $DIR.a.X 42 flux-kvs: test.a.b.link: No such file or directory not ok 63 - kvs: link: intermediate links are followed by put # # flux kvs unlink -Rf $DIR && # flux kvs mkdir $DIR.a && # flux kvs link $DIR.a $DIR.link && # flux kvs readlink $DIR.link >/dev/null && # flux kvs put $DIR.link.X=42 && # flux kvs readlink $DIR.link >/dev/null && # test_kvs_key $DIR.link.X 42 && # test_kvs_key $DIR.a.X 42 # expecting success: flux kvs unlink -Rf $DIR && flux kvs mkdir $DIR.a && flux kvs link $DIR.a $DIR.link && flux kvs put $DIR.a.X=42 && flux kvs copy $DIR.a $DIR.link && ! flux kvs readlink $DIR.link >/dev/null && test_kvs_key $DIR.link.X 42 flux-kvs: flux_kvs_lookup test.a.b.a: No such file or directory not ok 64 - kvs: link: kvs_copy removes linked destination # # flux kvs unlink -Rf $DIR && # flux kvs mkdir $DIR.a && # flux kvs link $DIR.a $DIR.link && # flux kvs put $DIR.a.X=42 && # flux kvs copy $DIR.a $DIR.link && # ! flux kvs readlink $DIR.link >/dev/null && # test_kvs_key $DIR.link.X 42 # expecting success: flux kvs unlink -Rf $DIR && flux kvs mkdir $DIR.a && flux kvs link $DIR.a $DIR.link && flux kvs put $DIR.a.X=42 && flux kvs move $DIR.a $DIR.link && ! flux kvs readlink $DIR.link >/dev/null && test_kvs_key $DIR.link.X 42 && ! flux kvs dir $DIR.a >/dev/null flux-kvs: flux_kvs_lookup test.a.b.a: No such file or directory not ok 65 - kvs: link: kvs_move works # # flux kvs unlink -Rf $DIR && # flux kvs mkdir $DIR.a && # flux kvs link $DIR.a $DIR.link && # flux kvs put $DIR.a.X=42 && # flux kvs move $DIR.a $DIR.link && # ! flux kvs readlink $DIR.link >/dev/null && # test_kvs_key $DIR.link.X 42 && # ! flux kvs dir $DIR.a >/dev/null # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.X=42 && flux kvs link $DIR.a $DIR.link && flux kvs copy $DIR.link $DIR.copy && LINKVAL=$(flux kvs readlink $DIR.copy) && test "$LINKVAL" = "$DIR.a" flux-kvs: flux_kvs_lookup test.a.b.link: No such file or directory not ok 66 - kvs: link: kvs_copy does not follow links (top) # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.X=42 && # flux kvs link $DIR.a $DIR.link && # flux kvs copy $DIR.link $DIR.copy && # LINKVAL=$(flux kvs readlink $DIR.copy) && # test "$LINKVAL" = "$DIR.a" # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.b.X=42 && flux kvs link $DIR.a.b $DIR.a.link && flux kvs copy $DIR.a $DIR.copy && LINKVAL=$(flux kvs readlink $DIR.copy.link) && test "$LINKVAL" = "$DIR.a.b" flux-kvs: flux_kvs_lookup test.a.b.a: No such file or directory not ok 67 - kvs: link: kvs_copy does not follow links (mid) # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.b.X=42 && # flux kvs link $DIR.a.b $DIR.a.link && # flux kvs copy $DIR.a $DIR.copy && # LINKVAL=$(flux kvs readlink $DIR.copy.link) && # test "$LINKVAL" = "$DIR.a.b" # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.b.X=42 && flux kvs link $DIR.a.b.X $DIR.a.b.link && flux kvs copy $DIR.a $DIR.copy && LINKVAL=$(flux kvs readlink $DIR.copy.b.link) && test "$LINKVAL" = "$DIR.a.b.X" flux-kvs: flux_kvs_lookup test.a.b.a: No such file or directory not ok 68 - kvs: link: kvs_copy does not follow links (bottom) # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.b.X=42 && # flux kvs link $DIR.a.b.X $DIR.a.b.link && # flux kvs copy $DIR.a $DIR.copy && # LINKVAL=$(flux kvs readlink $DIR.copy.b.link) && # test "$LINKVAL" = "$DIR.a.b.X" # expecting success: flux kvs unlink -Rf $DIR && flux kvs link $DIR.dangle $DIR.a.b.c ok 69 - kvs: link: dangling link expecting success: OUTPUT=$(flux kvs readlink $DIR.a.b.c) && test "$OUTPUT" = "$DIR.dangle" flux-kvs: test.a.b.a.b.c: No such file or directory not ok 70 - kvs: link: readlink on dangling link # # OUTPUT=$(flux kvs readlink $DIR.a.b.c) && # test "$OUTPUT" = "$DIR.dangle" # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.b.c="foo" && flux kvs link $DIR.a.b.c $DIR.link && OUTPUT=$(flux kvs readlink $DIR.link) && test "$OUTPUT" = "$DIR.a.b.c" flux-kvs: test.a.b.link: No such file or directory not ok 71 - kvs: link: readlink works on non-dangling link # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.b.c="foo" && # flux kvs link $DIR.a.b.c $DIR.link && # OUTPUT=$(flux kvs readlink $DIR.link) && # test "$OUTPUT" = "$DIR.a.b.c" # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a=1 && flux kvs link $DIR.a $DIR.b && flux kvs link $DIR.b $DIR.c && flux kvs link $DIR.c $DIR.d && flux kvs link $DIR.d $DIR.e && flux kvs link $DIR.e $DIR.f && flux kvs link $DIR.f $DIR.g && flux kvs link $DIR.g $DIR.h && flux kvs link $DIR.h $DIR.i && flux kvs link $DIR.i $DIR.j && flux kvs link $DIR.j $DIR.k && flux kvs link $DIR.k $DIR.l && test_must_fail flux kvs get $DIR.l flux-kvs: test.a.b.l: No such file or directory ok 72 - kvs: link: error on link depth expecting success: flux kvs unlink -Rf $DIR && flux kvs link $DIR.link1 $DIR.link2 && flux kvs link $DIR.link2 $DIR.link1 && test_must_fail flux kvs get $DIR.link1 flux-kvs: test.a.b.link1: No such file or directory ok 73 - kvs: link: error on link depth, loop expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.src=\"foo\" && flux kvs copy $DIR.src $DIR.dest && OUTPUT1=$(flux kvs get $DIR.src) && OUTPUT2=$(flux kvs get $DIR.dest) && test "$OUTPUT1" = "foo" test "$OUTPUT2" = "foo" flux-kvs: flux_kvs_lookup test.a.b.src: No such file or directory not ok 74 - kvs: copy works # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.src=\"foo\" && # flux kvs copy $DIR.src $DIR.dest && # OUTPUT1=$(flux kvs get $DIR.src) && # OUTPUT2=$(flux kvs get $DIR.dest) && # test "$OUTPUT1" = "foo" # test "$OUTPUT2" = "foo" # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.src=\"foo\" && flux kvs move $DIR.src $DIR.dest && test_must_fail flux kvs get $DIR.src && OUTPUT=$(flux kvs get $DIR.dest) && test "$OUTPUT" = "foo" flux-kvs: flux_kvs_lookup test.a.b.src: No such file or directory not ok 75 - kvs: move works # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.src=\"foo\" && # flux kvs move $DIR.src $DIR.dest && # test_must_fail flux kvs get $DIR.src && # OUTPUT=$(flux kvs get $DIR.dest) && # test "$OUTPUT" = "foo" # expecting success: flux kvs dropcache 2017-10-17T19:23:37.544144Z kvs.alert[0]: dropped 1 of 1 cache entries ok 76 - kvs: dropcache works expecting success: flux kvs dropcache --all 2017-10-17T19:23:37.638998Z kvs.alert[0]: dropped 0 of 0 cache entries 2017-10-17T19:23:37.639459Z kvs.alert[1]: dropped 1 of 1 cache entries ok 77 - kvs: dropcache --all works 2017-10-17T19:23:37.639462Z kvs.alert[2]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639778Z kvs.alert[4]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639790Z kvs.alert[3]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639900Z kvs.alert[6]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639801Z kvs.alert[5]: dropped 1 of 1 cache entries expecting success: VERS=$(flux kvs version) VERS=$((VERS + 1)) flux kvs wait $VERS & kvswaitpid=$! && flux kvs put $DIR.xxx=99 && test_expect_code 0 wait $kvswaitpid 2017-10-17T19:23:37.640017Z kvs.alert[8]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640239Z kvs.alert[12]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640205Z kvs.alert[11]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640291Z kvs.alert[7]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640103Z kvs.alert[13]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640326Z kvs.alert[10]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640596Z kvs.alert[16]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640167Z kvs.alert[14]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639459Z kvs.alert[1]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640186Z kvs.alert[9]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640506Z kvs.alert[15]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639462Z kvs.alert[2]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639801Z kvs.alert[5]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639900Z kvs.alert[6]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639778Z kvs.alert[4]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.639790Z kvs.alert[3]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640239Z kvs.alert[12]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640103Z kvs.alert[13]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640017Z kvs.alert[8]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640326Z kvs.alert[10]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640167Z kvs.alert[14]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640291Z kvs.alert[7]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640205Z kvs.alert[11]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640186Z kvs.alert[9]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640596Z kvs.alert[16]: dropped 1 of 1 cache entries 2017-10-17T19:23:37.640506Z kvs.alert[15]: dropped 1 of 1 cache entries ok 78 - kvs: version and wait expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.foo=0 && wait_watch_put "$DIR.foo" "0" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR.foo >watch_out & watchpid=$! && wait_watch_current "0" flux kvs put $DIR.foo=1 && wait $watchpid cat >expected <<-EOF 0 1 EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:23:48.275903124 +0000 +++ expected 2017-10-17 19:23:53.607669391 +0000 @@ -1,2 +1,2 @@ -nil -nil +0 +1 not ok 79 - kvs: watch a key # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.foo=0 && # wait_watch_put "$DIR.foo" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR.foo >watch_out & # watchpid=$! && # wait_watch_current "0" # flux kvs put $DIR.foo=1 && # wait $watchpid # cat >expected <<-EOF # 0 # 1 # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && wait_watch_empty "$DIR.foo" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR.foo >watch_out & watchpid=$! && wait_watch_current "nil" && flux kvs put $DIR.foo=1 && wait $watchpid cat >expected <<-EOF nil 1 EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:23:53.911656064 +0000 +++ expected 2017-10-17 19:23:54.019651331 +0000 @@ -1,2 +1,2 @@ nil -nil +1 not ok 80 - kvs: watch a key that at first doesnt exist # # flux kvs unlink -Rf $DIR && # wait_watch_empty "$DIR.foo" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR.foo >watch_out & # watchpid=$! && # wait_watch_current "nil" && # flux kvs put $DIR.foo=1 && # wait $watchpid # cat >expected <<-EOF # nil # 1 # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.foo=0 && wait_watch_put "$DIR.foo" "0" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR.foo >watch_out & watchpid=$! wait_watch_current "0" && flux kvs unlink $DIR.foo && wait $watchpid cat >expected <<-EOF 0 nil EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:24:04.383197014 +0000 +++ expected 2017-10-17 19:24:09.654965910 +0000 @@ -1,2 +1,2 @@ -nil +0 nil not ok 81 - kvs: watch a key that gets removed # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.foo=0 && # wait_watch_put "$DIR.foo" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR.foo >watch_out & # watchpid=$! # wait_watch_current "0" && # flux kvs unlink $DIR.foo && # wait $watchpid # cat >expected <<-EOF # 0 # nil # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.foo=0 && wait_watch_put "$DIR.foo" "0" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR.foo >watch_out & watchpid=$! && wait_watch_current "0" && flux kvs put $DIR.foo.bar.baz=1 && wait $watchpid cat >expected <<-EOF 0 ====================== $DIR.foo.bar. ====================== EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:24:19.982513171 +0000 +++ expected 2017-10-17 19:24:25.258281890 +0000 @@ -1,2 +1,4 @@ -nil -nil +0 +====================== +test.a.b.foo.bar. +====================== not ok 82 - kvs: watch a key that becomes a dir # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.foo=0 && # wait_watch_put "$DIR.foo" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR.foo >watch_out & # watchpid=$! && # wait_watch_current "0" && # flux kvs put $DIR.foo.bar.baz=1 && # wait $watchpid # cat >expected <<-EOF # 0 # ====================== # $DIR.foo.bar. # ====================== # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.a=0 $DIR.a.b=0 && wait_watch_put "$DIR.a.a" "0" && wait_watch_put "$DIR.a.b" "0" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR >watch_out & watchpid=$! && wait_watch_current "======================" && flux kvs put $DIR.a.a=1 && wait $watchpid cat >expected <<-EOF $DIR.a. ====================== $DIR.a. ====================== EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:24:35.677825119 +0000 +++ expected 2017-10-17 19:24:40.953593840 +0000 @@ -1,2 +1,4 @@ -nil -nil +test.a.b.a. +====================== +test.a.b.a. +====================== not ok 83 - kvs: watch a dir # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.a=0 $DIR.a.b=0 && # wait_watch_put "$DIR.a.a" "0" && # wait_watch_put "$DIR.a.b" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR >watch_out & # watchpid=$! && # wait_watch_current "======================" && # flux kvs put $DIR.a.a=1 && # wait $watchpid # cat >expected <<-EOF # $DIR.a. # ====================== # $DIR.a. # ====================== # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && wait_watch_empty "$DIR" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR >watch_out & watchpid=$! && wait_watch_current "nil" && flux kvs put $DIR.a.a=1 && wait $watchpid cat >expected <<-EOF nil ====================== $DIR.a. ====================== EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:24:41.261580338 +0000 +++ expected 2017-10-17 19:24:41.377575253 +0000 @@ -1,2 +1,4 @@ nil -nil +====================== +test.a.b.a. +====================== not ok 84 - kvs: watch a dir that at first doesnt exist # # flux kvs unlink -Rf $DIR && # wait_watch_empty "$DIR" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR >watch_out & # watchpid=$! && # wait_watch_current "nil" && # flux kvs put $DIR.a.a=1 && # wait $watchpid # cat >expected <<-EOF # nil # ====================== # $DIR.a. # ====================== # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.a.a=0 $DIR.a.a.b=0 && wait_watch_put "$DIR.a.a.a" "0" && wait_watch_put "$DIR.a.a.b" "0" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR.a >watch_out & watchpid=$! && wait_watch_current "======================" && flux kvs unlink -R $DIR.a && wait $watchpid cat >expected <<-EOF $DIR.a.a. ====================== nil ====================== EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:24:51.705122514 +0000 +++ expected 2017-10-17 19:24:56.980891235 +0000 @@ -1,2 +1,4 @@ +test.a.b.a.a. +====================== nil -nil +====================== not ok 85 - kvs: watch a dir that gets removed # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.a.a=0 $DIR.a.a.b=0 && # wait_watch_put "$DIR.a.a.a" "0" && # wait_watch_put "$DIR.a.a.b" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR.a >watch_out & # watchpid=$! && # wait_watch_current "======================" && # flux kvs unlink -R $DIR.a && # wait $watchpid # cat >expected <<-EOF # $DIR.a.a. # ====================== # nil # ====================== # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.a.a=0 $DIR.a.a.b=0 && wait_watch_put "$DIR.a.a.a" "0" && wait_watch_put "$DIR.a.a.b" "0" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR.a >watch_out & watchpid=$! && wait_watch_current "======================" && flux kvs put $DIR.a=1 && wait $watchpid cat >expected <<-EOF $DIR.a.a. ====================== 1 EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:25:07.372435690 +0000 +++ expected 2017-10-17 19:25:12.648204411 +0000 @@ -1,2 +1,3 @@ -nil -nil +test.a.b.a.a. +====================== +1 not ok 86 - kvs: watch a dir, converted into a key # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.a.a=0 $DIR.a.a.b=0 && # wait_watch_put "$DIR.a.a.a" "0" && # wait_watch_put "$DIR.a.a.b" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR.a >watch_out & # watchpid=$! && # wait_watch_current "======================" && # flux kvs put $DIR.a=1 && # wait $watchpid # cat >expected <<-EOF # $DIR.a.a. # ====================== # 1 # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.a.a=0 $DIR.a.a.b=0 && wait_watch_put "$DIR.a.a.a" "0" && wait_watch_put "$DIR.a.a.b" "0" rm -f watch_out stdbuf -oL flux kvs watch -o -c 1 $DIR.a >watch_out & watchpid=$! && wait_watch_current "======================" && flux kvs put $DIR=1 && wait $watchpid cat >expected <<-EOF $DIR.a.a. ====================== nil ====================== EOF test_cmp watch_out expected --- watch_out 2017-10-17 19:25:23.079747113 +0000 +++ expected 2017-10-17 19:25:28.351516009 +0000 @@ -1,2 +1,4 @@ +test.a.b.a.a. +====================== nil -nil +====================== not ok 87 - kvs: watch a dir, prefix path converted into a key # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.a.a=0 $DIR.a.a.b=0 && # wait_watch_put "$DIR.a.a.a" "0" && # wait_watch_put "$DIR.a.a.b" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -o -c 1 $DIR.a >watch_out & # watchpid=$! && # wait_watch_current "======================" && # flux kvs put $DIR=1 && # wait $watchpid # cat >expected <<-EOF # $DIR.a.a. # ====================== # nil # ====================== # EOF # test_cmp watch_out expected # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.a=0 $DIR.a.b=0 && wait_watch_put "$DIR.a.a" "0" && wait_watch_put "$DIR.a.b" "0" rm -f watch_out stdbuf -oL flux kvs watch -R -o -c 1 $DIR >watch_out & watchpid=$! && wait_watch_current "======================" && flux kvs put $DIR.a.a=1 && wait $watchpid sort_watch_output cat >expected <<-EOF $DIR.a.a = 0 $DIR.a.b = 0 ====================== $DIR.a.a = 1 $DIR.a.b = 0 ====================== EOF test_cmp watch_out_sorted expected diff: watch_out_sorted: No such file or directory not ok 88 - kvs: watch a dir with -R # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.a=0 $DIR.a.b=0 && # wait_watch_put "$DIR.a.a" "0" && # wait_watch_put "$DIR.a.b" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -R -o -c 1 $DIR >watch_out & # watchpid=$! && # wait_watch_current "======================" && # flux kvs put $DIR.a.a=1 && # wait $watchpid # sort_watch_output # cat >expected <<-EOF # $DIR.a.a = 0 # $DIR.a.b = 0 # ====================== # $DIR.a.a = 1 # $DIR.a.b = 0 # ====================== # EOF # test_cmp watch_out_sorted expected # expecting success: flux kvs unlink -Rf $DIR && flux kvs put $DIR.a.a=0 $DIR.a.b=0 && wait_watch_put "$DIR.a.a" "0" && wait_watch_put "$DIR.a.b" "0" rm -f watch_out stdbuf -oL flux kvs watch -R -d -o -c 1 $DIR >watch_out & watchpid=$! && wait_watch_current "======================" && flux kvs put $DIR.a.a=1 && wait $watchpid sort_watch_output cat >expected <<-EOF $DIR.a.a $DIR.a.b ====================== $DIR.a.a $DIR.a.b ====================== EOF test_cmp watch_out_sorted expected diff: watch_out_sorted: No such file or directory not ok 89 - kvs: watch a dir with -R and -d # # flux kvs unlink -Rf $DIR && # flux kvs put $DIR.a.a=0 $DIR.a.b=0 && # wait_watch_put "$DIR.a.a" "0" && # wait_watch_put "$DIR.a.b" "0" # rm -f watch_out # stdbuf -oL flux kvs watch -R -d -o -c 1 $DIR >watch_out & # watchpid=$! && # wait_watch_current "======================" && # flux kvs put $DIR.a.a=1 && # wait $watchpid # sort_watch_output # cat >expected <<-EOF # $DIR.a.a # $DIR.a.b # ====================== # $DIR.a.a # $DIR.a.b # ====================== # EOF # test_cmp watch_out_sorted expected # # failed 59 among 89 test(s) 1..89