From 9805740dd6300cd17abb48a0174820276f62ab96 Mon Sep 17 00:00:00 2001 From: Albert Chu Date: Tue, 14 Nov 2017 16:45:44 -0800 Subject: [PATCH 1/2] t/t2000-wreck.t: Fix typo --- t/t2000-wreck.t | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/t/t2000-wreck.t b/t/t2000-wreck.t index 6ac1c1cb740a..cd5088d031d1 100755 --- a/t/t2000-wreck.t +++ b/t/t2000-wreck.t @@ -315,7 +315,7 @@ test_expect_success 'flux-wreck: attach with stdin' ' EOF test_cmp output.attach_in expected.attach_in ' -test_expect_success 'flux-werck: attach --label-io' ' +test_expect_success 'flux-wreck: attach --label-io' ' flux wreckrun -l -n4 --output=expected.attach-l echo bazz >/dev/null && flux wreck attach --label-io $(last_job_id) |sort > output.attach-l && sort expected.attach-l > x && mv x expected.attach-l && From d5c3b23a093f49631c43600ca2add1f86073a1ee Mon Sep 17 00:00:00 2001 From: Albert Chu Date: Tue, 14 Nov 2017 11:36:44 -0800 Subject: [PATCH 2/2] t/kvs: Add coverage for kvs stats clear Fixes #1287 --- t/t1001-kvs-internals.t | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/t/t1001-kvs-internals.t b/t/t1001-kvs-internals.t index 1ff8b2c7d0a1..33ef61aee6a7 100755 --- a/t/t1001-kvs-internals.t +++ b/t/t1001-kvs-internals.t @@ -267,4 +267,34 @@ test_expect_success 'kvs: unlink on rank 0, does not exist all ranks' ' flux exec sh -c "flux kvs wait ${VERS} && ! flux kvs get --json $DIR.xxx" ' +# +# test clear of stats +# + +# each store of largeval will increase the noop store count, b/c we +# know that the identical large value will be cached as raw data + +test_expect_success 'kvs: clear stats locally' ' + flux kvs unlink -Rf $DIR && + flux module stats -c kvs && + flux module stats kvs | grep no-op | grep -q 0 && + flux kvs put --json $DIR.largeval1=$largeval && + flux kvs put --json $DIR.largeval2=$largeval && + ! flux module stats kvs | grep no-op | grep -q 0 && + flux module stats -c kvs && + flux module stats kvs | grep no-op | grep -q 0 +' + +test_expect_success 'kvs: clear stats globally' ' + flux kvs unlink -Rf $DIR && + flux module stats -C kvs && + flux exec sh -c "flux module stats kvs | grep no-op | grep -q 0" && + for i in `seq 0 $((${SIZE} - 1))`; do + flux exec -r $i sh -c "flux kvs put --json $DIR.$i.largeval1=$largeval $DIR.$i.largeval2=$largeval" + done && + ! flux exec sh -c "flux module stats kvs | grep no-op | grep -q 0" && + flux module stats -C kvs && + flux exec sh -c "flux module stats kvs | grep no-op | grep -q 0" +' + test_done