From cb73324ce58e4bd326534d7b908fbcbaf54bea87 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 28 May 2020 15:31:51 -0500 Subject: Disable the error-stack printing around the H5Gopen() call that we know will sometimes fail. --- test/vfd_swmr_group_writer.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/vfd_swmr_group_writer.c b/test/vfd_swmr_group_writer.c index ae70cf1..9e36876 100644 --- a/test/vfd_swmr_group_writer.c +++ b/test/vfd_swmr_group_writer.c @@ -167,12 +167,15 @@ verify_group(state_t *s, unsigned int which) { char name[sizeof("/group-9999999999")]; hid_t g; + estack_state_t es; assert(which < s->nsteps); esnprintf(name, sizeof(name), "/group-%d", which); + es = disable_estack(); g = H5Gopen(s->file, name, H5P_DEFAULT); + restore_estack(es); if (g < 0) return false; -- cgit v0.12 From 91d388a41c9ceb120f4d7a5ff6d7599af8cb22d7 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 28 May 2020 15:33:41 -0500 Subject: Don't count up errors *and* exit right away when there is an error. Just count. --- test/testvfdswmr.sh.in | 46 ---------------------------------------------- 1 file changed, 46 deletions(-) diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index 10fe3f2..1090fde 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -190,13 +190,6 @@ do echo generator had error nerrors=`expr $nerrors + 1` fi - - # Check for error and exit if one occured - $DPRINT nerrors=$nerrors - if test $nerrors -ne 0 ; then - echo "VFD SWMR tests failed with $nerrors errors." - exit 1 - fi fi if [ ${do_expand:-no} = yes ]; then @@ -266,14 +259,6 @@ do nerrors=$((nerrors + 1)) fi - # Check for error and exit if one occured - $DPRINT nerrors=$nerrors - if test $nerrors -ne 0 ; then - echo "VFD SWMR tests failed with $nerrors errors." - echo "(Writer and reader output preserved)" - exit 1 - fi - # Clean up output files rm -f vfd_swmr_writer.{out,rc} rm -f vfd_swmr_reader.*.{out,rc} @@ -341,14 +326,6 @@ do nerrors=$((nerrors + 1)) fi - # Check for error and exit if one occured - $DPRINT nerrors=$nerrors - if test $nerrors -ne 0 ; then - echo "VFD SWMR tests failed with $nerrors errors." - echo "(Writer and reader output preserved)" - exit 1 - fi - # Clean up output files rm -f vfd_swmr_writer.{out,rc} rm -f vfd_swmr_reader.*.{out,rc} @@ -431,14 +408,6 @@ do nerrors=$((nerrors + 1)) fi - # Check for error and exit if one occured - $DPRINT nerrors=$nerrors - if test $nerrors -ne 0 ; then - echo "VFD SWMR tests failed with $nerrors errors." - echo "(Writer and reader output preserved)" - exit 1 - fi - # Clean up output files rm -f vfd_swmr_writer.{out,rc} rm -f vfd_swmr_reader.*.{out,rc} @@ -514,14 +483,6 @@ do nerrors=$((nerrors + 1)) fi - # Check for error and exit if one occured - $DPRINT nerrors=$nerrors - if test $nerrors -ne 0 ; then - echo "VFD SWMR tests failed with $nerrors errors." - echo "(Writer and reader output preserved)" - exit 1 - fi - # Clean up output files rm -f vfd_swmr_writer.{out,rc} rm -f vfd_swmr_reader.*.{out,rc} @@ -575,13 +536,6 @@ for ty in null oob; do nerrors=$((nerrors + 1)) fi - # Check for error and exit if one occured - if test $nerrors -ne 0 ; then - echo "VFD SWMR tests failed with $nerrors errors." - echo "(Writer and reader output preserved)" - exit 1 - fi - # Clean up output files rm -f vfd_swmr_vlstr_writer.{out,rc} rm -f vfd_swmr_vlstr_reader.*.{out,rc} -- cgit v0.12 From 47890e826f7229293ce171266e1c200c0b69e72b Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 28 May 2020 15:34:31 -0500 Subject: A zoo error is not a soft error. Count it as a hard error instead of a soft error. --- test/testvfdswmr.sh.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index 1090fde..f642599 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -569,7 +569,7 @@ if [ ${do_zoo:-no} = yes ]; then # Collect exit code of the reader if [ $(cat vfd_swmr_zoo_reader.rc) -ne 0 ]; then echo reader had error - nsofterrors=$((nsofterrors + 1)) + nerrors=$((nerrors + 1)) fi # Collect exit code of the writer -- cgit v0.12 From 1410aa21a079e90850595af27da89358d3c25bee Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 28 May 2020 15:35:42 -0500 Subject: Straggler from previous: don't count errors *and* exit, just count. --- test/testvfdswmr.sh.in | 7 ------- 1 file changed, 7 deletions(-) diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index f642599..9bcb180 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -578,13 +578,6 @@ if [ ${do_zoo:-no} = yes ]; then nerrors=$((nerrors + 1)) fi - # Check for error and exit if one occured - if test $nerrors -ne 0 ; then - echo "VFD SWMR tests failed with $nerrors errors." - echo "(Writer and reader output preserved)" - exit 1 - fi - # Clean up output files rm -f ./fifo rm -f vfd_swmr_zoo_writer.{out,rc} -- cgit v0.12 From 5c534e41b66cad30f9d1203e04fe453940a4c666 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 28 May 2020 15:36:21 -0500 Subject: If there were hard errors, report any soft errors, too. --- test/testvfdswmr.sh.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index 9bcb180..0be3307 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -602,7 +602,8 @@ if test $nerrors -eq 0 ; then fi exit 0 else - echo "VFD SWMR tests failed with $nerrors errors." + echo -n "VFD SWMR tests failed with $nerrors hard errors " + echo "and $nsofterrors soft errors." exit 1 fi -- cgit v0.12 From 7ecf5d54665edba3a9fb052eb50b3b2e90e3c685 Mon Sep 17 00:00:00 2001 From: David Young Date: Thu, 28 May 2020 15:36:39 -0500 Subject: Perform a test where a writer creates 10,000 groups while a reader waits for each to appear. Add but do not yet perform tests on many small extensible datasets and a few big extensible datasets. Vailin is working on a bug that causes both tests to fail virtually always. --- test/testvfdswmr.sh.in | 139 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 138 insertions(+), 1 deletion(-) diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index 0be3307..48f29f4 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -118,7 +118,8 @@ if [ $rc -ne 0 ] ; then exit 0 fi -all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo" +all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo groups" +#all_tests="${all_tests} few_big many_small" tests=${all_tests} if [ $# -gt 0 ]; then @@ -584,6 +585,142 @@ if [ ${do_zoo:-no} = yes ]; then rm -f vfd_swmr_zoo_reader.*.{out,rc} fi +# +# Make sure that we can create 10000 groups while a reader waits +# for each to appear. +# +if [ ${do_groups:-no} = yes ]; then + echo launch vfd_swmr_group_writer + catch_out_err_and_rc vfd_swmr_group_writer \ + ../vfd_swmr_group_writer -q -u 10 -n 10000 & + pid_writer=$! + + catch_out_err_and_rc vfd_swmr_group_reader \ + ../vfd_swmr_group_reader -q -u 10 -n 10000 -W & + pid_reader=$! + + # Wait for the reader to finish before signalling the + # writer to quit: the writer holds the file open so that the + # reader will find the shadow file when it opens + # the .h5 file. + wait $pid_reader + kill -USR1 $(cat vfd_swmr_group_writer.pid) + wait $pid_writer + + # Collect exit code of the reader + if [ $(cat vfd_swmr_group_reader.rc) -ne 0 ]; then + echo reader had error + nerrors=$((nerrors + 1)) + fi + + # Collect exit code of the writer + if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then + echo writer had error + nerrors=$((nerrors + 1)) + fi + + # Clean up output files + rm -f vfd_swmr_group_writer.{out,rc} + rm -f vfd_swmr_group_reader.*.{out,rc} +fi + +# +# Test many small datasets of one and two dimensions. +# +# Perform 50 iterations on 1000 extensible datasets configured with 16x16 +# chunks of 32-bit unsigned integer elements, +# expanding each dataset by a chunk in one dimension (up to 50x1 16x16 chunks) +# on each iteration. +# +# Perform the test again, extending each dataset +# in *two* dimensions (up to 50x50 16x16 chunks). +# +for dims in 1 2; do + if [ ${do_many_small:-no} = no ]; then + continue + fi + echo launch vfd_swmr_bigset_writer many small, $dims dimensions + catch_out_err_and_rc vfd_swmr_bigset_writer \ + ../vfd_swmr_bigset_writer -n 50 -d $dims -s 1000 -r 16 -c 16 -q & + pid_writer=$! + + catch_out_err_and_rc vfd_swmr_bigset_reader \ + ../vfd_swmr_bigset_reader -n 50 -d $dims -s 1000 -r 16 -c 16 -q -W & + pid_reader=$! + + # Wait for the reader to finish before signalling the + # writer to quit: the writer holds the file open so that the + # reader will find the shadow file when it opens + # the .h5 file. + wait $pid_reader + kill -USR1 $(cat vfd_swmr_bigset_writer.pid) + wait $pid_writer + + # Collect exit code of the reader + if [ $(cat vfd_swmr_bigset_reader.rc) -ne 0 ]; then + echo reader had error + nerrors=$((nerrors + 1)) + fi + + # Collect exit code of the writer + if [ $(cat vfd_swmr_bigset_writer.rc) -ne 0 ]; then + echo writer had error + nerrors=$((nerrors + 1)) + fi + + # Clean up output files + rm -f vfd_swmr_bigset_writer.{out,rc} + rm -f vfd_swmr_bigset_reader.*.{out,rc} +done + +# +# Test a few big datasets of one and two dimensions. +# +# Perform 50 iterations on 5 extensible datasets configured with 256x256 +# chunks of 32-bit unsigned integer elements, +# expanding each dataset by a chunk in one dimension (up to 50x1 256x256 chunks) +# on each iteration. +# +# Perform the test again, extending each dataset +# in *two* dimensions (up to 50x50 256x256 chunks). +# +for dims in 1 2; do + if [ ${do_few_big:-no} = no ]; then + continue + fi + echo launch vfd_swmr_bigset_writer few big, $dims dimensions + catch_out_err_and_rc vfd_swmr_bigset_writer \ + ../vfd_swmr_bigset_writer -n 50 -d $dims -s 5 -r 256 -c 256 -q & + pid_writer=$! + + catch_out_err_and_rc vfd_swmr_bigset_reader \ + ../vfd_swmr_bigset_reader -n 50 -d $dims -s 5 -r 256 -c 256 -q -W & + pid_reader=$! + + # Wait for the reader to finish before signalling the + # writer to quit: the writer holds the file open so that the + # reader will find the shadow file when it opens + # the .h5 file. + wait $pid_reader + kill -USR1 $(cat vfd_swmr_bigset_writer.pid) + wait $pid_writer + + # Collect exit code of the reader + if [ $(cat vfd_swmr_bigset_reader.rc) -ne 0 ]; then + echo reader had error + nerrors=$((nerrors + 1)) + fi + + # Collect exit code of the writer + if [ $(cat vfd_swmr_bigset_writer.rc) -ne 0 ]; then + echo writer had error + nerrors=$((nerrors + 1)) + fi + + # Clean up output files + rm -f vfd_swmr_bigset_writer.{out,rc} + rm -f vfd_swmr_bigset_reader.*.{out,rc} +done ############################################################################### ## Report and exit -- cgit v0.12