summaryrefslogtreecommitdiffstats
path: root/test/testvfdswmr.sh.in
diff options
context:
space:
mode:
authorMuqun Yang <myang6@hdfgroup.org>2021-04-23 17:31:09 (GMT)
committerMuqun Yang <myang6@hdfgroup.org>2021-04-23 17:31:09 (GMT)
commitfba7c887d9e0ce7509a5f17c13756145acab35e4 (patch)
treecdb4a4bbe0c7f8f620b342300e4d010df6bcc6fd /test/testvfdswmr.sh.in
parent90cbdd34c849689caf430570042356f0981ac4c3 (diff)
parent41ab0ced0b232af9fa0fe196e2e1f29d97566bfe (diff)
downloadhdf5-fba7c887d9e0ce7509a5f17c13756145acab35e4.zip
hdf5-fba7c887d9e0ce7509a5f17c13756145acab35e4.tar.gz
hdf5-fba7c887d9e0ce7509a5f17c13756145acab35e4.tar.bz2
Merge remote-tracking branch 'upstream/feature/vfd_swmr' into feature/vfd_swmr
Diffstat (limited to 'test/testvfdswmr.sh.in')
-rw-r--r--test/testvfdswmr.sh.in61
1 files changed, 58 insertions, 3 deletions
diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in
index 9dc61ee..b810a8d 100644
--- a/test/testvfdswmr.sh.in
+++ b/test/testvfdswmr.sh.in
@@ -77,6 +77,12 @@ WRITER_MESSAGE=VFD_SWMR_WRITER_MESSAGE # The message file created by writer tha
# This should be the same as the define in "./swmr_common.h"
MESSAGE_TIMEOUT=300 # Message timeout length in secs
# This should be the same as the define in "./h5test.h"
+
+###############################################################################
+## For attrdset test: definitions for fifo files to coordinate test runs
+###############################################################################
+FIFO_WRITER_TO_READER=fifo_attrdset_writer_to_reader
+FIFO_READER_TO_WRITER=fifo_attrdset_reader_to_writer
###############################################################################
## short hands and function definitions
@@ -149,10 +155,9 @@ if [ $rc -ne 0 ] ; then
exit 0
fi
-all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo groups"
+<<<<<<< HEAD
+all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo groups attrdset"
all_tests="${all_tests} groups_attrs few_big many_small"
-#all_tests="groups groups_attrs"
-#all_tests="groups_attrs"
tests=${all_tests}
if [ $# -gt 0 ]; then
@@ -196,6 +201,7 @@ mkdir vfd_swmr_test
cd vfd_swmr_test
+
# Loop over index types
for index_type in "-i ea" "-i b2"
do
@@ -616,6 +622,55 @@ if [ ${do_zoo:-no} = yes ]; then
rm -f vfd_swmr_zoo_reader.*.{out,rc}
fi
+# attrdset test
+for options in "-p -g -a 10 -v -m -d 10 -c 3 -u 5" "-k -a 20 -v -m -d 5"; do
+ #
+ # Test a few big datasets of one and two dimensions.
+ #
+ if [ ${do_attrdset:-no} = no ]; then
+ continue
+ fi
+ # Clean up any existing fifo files from previous runs
+ if [ -e ./$FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
+ rm -f ./$FIFO_WRITER_TO_READER
+ fi
+ if [ -e ./$FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
+ rm -f ./$FIFO_READER_TO_WRITER
+ fi
+ #
+ echo launch vfd_swmr_attrdset_writer attrdset, options $options
+ catch_out_err_and_rc vfd_swmr_attrdset_writer \
+ ../vfd_swmr_attrdset_writer $options &
+ pid_writer=$!
+
+ catch_out_err_and_rc vfd_swmr_attrdset_reader \
+ ../vfd_swmr_attrdset_reader $options &
+ 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_attrdset_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_attrdset_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_attrdset_writer.{out,rc}
+ rm -f vfd_swmr_attrdset_reader.*.{out,rc}
+done
+
#
# Make sure that we can create GROUP_n groups (20, 40, or 400 depending on the HDF5TestExpress level)
# while a reader waits for each to appear.