summaryrefslogtreecommitdiffstats
path: root/test/testvfdswmr.sh.in
diff options
context:
space:
mode:
authorvchoi <vchoi@jelly.ad.hdfgroup.org>2021-12-21 18:25:32 (GMT)
committervchoi <vchoi@jelly.ad.hdfgroup.org>2021-12-21 18:25:32 (GMT)
commitcdc93ea7faa30084c6399b1a7cc5347e5654f860 (patch)
treee7f98fb474120199dd06207a81d581da281b8e82 /test/testvfdswmr.sh.in
parenta30ca5afcd9f2e35b3a37f74286a6fe264b946f2 (diff)
downloadhdf5-cdc93ea7faa30084c6399b1a7cc5347e5654f860.zip
hdf5-cdc93ea7faa30084c6399b1a7cc5347e5654f860.tar.gz
hdf5-cdc93ea7faa30084c6399b1a7cc5347e5654f860.tar.bz2
Address issue #1 and issue #3 of the group test failures.
See Kent's documentation "Designed to Fail Tests and Issues". (A) Fix for issue #1: HDassert the < and = cases between old and new entry length. John will take care of the > case. (B) Fix for issue #3: set the cache copy of page_size again if different from f->shared->fs_page_size.
Diffstat (limited to 'test/testvfdswmr.sh.in')
-rw-r--r--test/testvfdswmr.sh.in122
1 files changed, 121 insertions, 1 deletions
diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in
index d52527b..955fbb6 100644
--- a/test/testvfdswmr.sh.in
+++ b/test/testvfdswmr.sh.in
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#!/us/bin/env bash
#
# Copyright by The HDF Group.
# Copyright by the Board of Trustees of the University of Illinois.
@@ -75,6 +75,13 @@ DSETCHKS_FIFO_WRITER_TO_READER=fifo_dsetchks_writer_to_reader
DSETCHKS_FIFO_READER_TO_WRITER=fifo_dsetchks_reader_to_writer
###############################################################################
+## For gfail{1,2,3,4} test: definitions for fifo files to coordinate test runs
+###############################################################################
+#
+GFAIL_FIFO_WRITER_TO_READER=fifo_group_writer_to_reader
+GFAIL_FIFO_READER_TO_WRITER=fifo_group_reader_to_writer
+
+###############################################################################
## short hands and function definitions
###############################################################################
#
@@ -147,6 +154,7 @@ all_tests="${all_tests} groups groups_attrs groups_ops few_big many_small attrds
# For exhaustive run, add: os_groups_attrs, os_groups_ops, os_groups_seg, dsetops, dsetchks,independ_wr
if [[ "$HDF5TestExpress" -eq 0 ]] ; then # exhaustive run
all_tests="${all_tests} os_groups_attrs os_groups_ops os_groups_seg dsetops dsetchks independ_wr"
+ all_tests="${all_tests} gfail_entry_length gfail_page_size"
fi
tests=${all_tests}
@@ -1388,6 +1396,118 @@ fi
###############################################################################
+#
+# "gfail_entry_length" test
+#
+# Only for exhaustive run
+#
+# Verify that the assertion failure for old and new entry length is fixed.
+# (See issue #1 in Kent's documentation "Designed to Fail Tests and Issues".
+#
+###############################################################################
+#
+#
+if [ ${do_gfail_entry_length:-no} = yes ]; then
+ #
+ # Clean up any existing fifo files from previous runs
+ if [ -e ./$GFAIL_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
+ rm -f ./$GFAIL_FIFO_WRITER_TO_READER
+ fi
+ if [ -e ./$GFAIL_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
+ rm -f ./$GFAIL_FIFO_READER_TO_WRITER
+ fi
+ #
+ echo launch vfd_swmr_gfail_writer -q -m 10 -n 340000
+ catch_out_err_and_rc vfd_swmr_gfail_entry_length_writer \
+ ../vfd_swmr_gfail_writer -q -m 10 -n 340000 &
+ pid_writer=$!
+
+ echo launch vfd_swmr_gfail_reader -m 10 -n 340000
+ catch_out_err_and_rc vfd_swmr_gfail_entry_length_reader \
+ ../vfd_swmr_gfail_reader -m 10 -n 340000 &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling 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
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_gfail_entry_length_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_gfail_entry_length_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_gfail_entry_length_writer.{out,rc}
+ rm -f vfd_swmr_gfail_entry_length_reader.*.{out,rc}
+fi
+
+###############################################################################
+#
+# "gfail_page_size" test
+#
+# Only for exhaustive run
+#
+# Verify that the assertion failure is fixed when non-default page size is set.
+# (See issue #3 in Kent's documentation "Designed to Fail Tests and Issues".
+#
+###############################################################################
+#
+#
+if [ ${do_gfail_page_size:-no} = yes ]; then
+ #
+ # Clean up any existing fifo files from previous runs
+ if [ -e ./$GFAIL_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
+ rm -f ./$GFAIL_FIFO_WRITER_TO_READER
+ fi
+ if [ -e ./$GFAIL_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
+ rm -f ./$GFAIL_FIFO_READER_TO_WRITER
+ fi
+ #
+ echo launch vfd_swmr_gfail_writer -q -m 10 -B 8192 -s 8192 -n 320000
+ catch_out_err_and_rc vfd_swmr_gfail_page_size_writer \
+ ../vfd_swmr_gfail_writer -q -m 10 -B 8192 -s 8192 -n 320000 &
+ pid_writer=$!
+
+ echo launch vfd_swmr_gfail_reader -m 10 -B 8192 -s 8192 -n 320000
+ catch_out_err_and_rc vfd_swmr_gfail_page_size_reader \
+ ../vfd_swmr_gfail_reader -m 10 -B 8192 -s 8192 -n 320000 &
+ pid_reader=$!
+
+ # Wait for the reader to finish before signaling 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
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_gfail_page_size_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_gfail_page_size_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_gfail_page_size_writer.{out,rc}
+ rm -f vfd_swmr_gfail_page_size_reader.*.{out,rc}
+fi
+
+###############################################################################
## Report and exit
###############################################################################
cd ..