summaryrefslogtreecommitdiffstats
path: root/test/testvfdswmr.sh.in
diff options
context:
space:
mode:
authorvchoi <vchoi@jelly.ad.hdfgroup.org>2021-08-10 19:25:06 (GMT)
committervchoi <vchoi@jelly.ad.hdfgroup.org>2021-08-10 19:25:06 (GMT)
commit0bb13dcf92a309d7668e8cda85f248b420934f29 (patch)
tree5cc9e27f69466ab86b346af07bfa437b000c4107 /test/testvfdswmr.sh.in
parent0212f12d60d622f19aad1ddfd3f121c7953ad903 (diff)
downloadhdf5-0bb13dcf92a309d7668e8cda85f248b420934f29.zip
hdf5-0bb13dcf92a309d7668e8cda85f248b420934f29.tar.gz
hdf5-0bb13dcf92a309d7668e8cda85f248b420934f29.tar.bz2
(1)
src/H5Fvfd_swmr.c --enable or disable raw data flush depending on configuration (2) vfd_swmr_dsetchks_writer.c vfd_swmr_dsetops_writer.c --modifications to test/verify when flushing of raw data is enabled/disabled --refactor coding (3) testvfdswmr.sh.in --add testing with/without flush of raw data to tests: dsetchks and dsetops (4) vfd_swmr_attrdset_writer.c --pass true for flushing raw data to the common routine init_vfd_swmr_config() --refactor coding so that it has similar format as the other two tests: dsetops and dsetchks (5) vfd_swmr_addrem_writer.c vfd_swmr_bigset_writer.c vfd_swmr_generator.c vfd_swmr_group_writer.c vfd_swmr_reader.c vfd_swmr_remove_reader.c vfd_swmr_remove_writer.c vfd_swmr_sparse_reader.c vfd_swmr_sparse_writer.c vfd_swmr_vlstr_reader.c vfd_swmr_vlstr_writer.c vfd_swmr_writer.c vfd_swmr_zoo_writer.c --pass true for flushing raw data to the common routine init_vfd_swmr_config()
Diffstat (limited to 'test/testvfdswmr.sh.in')
-rw-r--r--test/testvfdswmr.sh.in181
1 files changed, 95 insertions, 86 deletions
diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in
index b0ab785..1e870de 100644
--- a/test/testvfdswmr.sh.in
+++ b/test/testvfdswmr.sh.in
@@ -1211,51 +1211,55 @@ done
###############################################################################
#
#
-for options in "-p -e 20 -t -q" "-g -m 5 -n 2 -s 10 -w 7 -q" "-k -m 10 -n 5 -r 5 -l 10 -q"; do
- #
- #
- if [ ${do_dsetops:-no} = no ]; then
- continue
- fi
- # Clean up any existing fifo files from previous runs
- if [ -e ./$DSETOPS_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
- rm -f ./$DSETOPS_FIFO_WRITER_TO_READER
- fi
- if [ -e ./$DSETOPS_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
- rm -f ./$DSETOPS_FIFO_READER_TO_WRITER
- fi
- #
- echo launch vfd_swmr_dsetops_writer dsetops, options $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_dsetops_writer \
- ../vfd_swmr_dsetops_writer $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_dsetops_reader \
- ../vfd_swmr_dsetops_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
+# Loop with flushing of raw data and then without
+for flush in "" "-U"; do
+ # Loop with different operations
+ for options in "-p -e 20 -t -q" "-g -m 5 -n 2 -s 10 -w 7 -q" "-k -m 10 -n 5 -r 5 -l 10 -q"; do
+ #
+ #
+ if [ ${do_dsetops:-no} = no ]; then
+ continue
+ fi
+ # Clean up any existing fifo files from previous runs
+ if [ -e ./$DSETOPS_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
+ rm -f ./$DSETOPS_FIFO_WRITER_TO_READER
+ fi
+ if [ -e ./$DSETOPS_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
+ rm -f ./$DSETOPS_FIFO_READER_TO_WRITER
+ fi
+ #
+ echo launch vfd_swmr_dsetops_writer dsetops, options $options $flush......may take some time......
+ catch_out_err_and_rc vfd_swmr_dsetops_writer \
+ ../vfd_swmr_dsetops_writer $options $flush &
+ pid_writer=$!
+
+ catch_out_err_and_rc vfd_swmr_dsetops_reader \
+ ../vfd_swmr_dsetops_reader $options $flush &
+ 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_dsetops_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_dsetops_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_dsetops_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_dsetops_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_dsetops_writer.{out,rc}
- rm -f vfd_swmr_dsetops_reader.*.{out,rc}
+ # Clean up output files
+ rm -f vfd_swmr_dsetops_writer.{out,rc}
+ rm -f vfd_swmr_dsetops_reader.*.{out,rc}
+ done
done
###############################################################################
@@ -1275,51 +1279,56 @@ dsetchks_list=(
"-r -m 11 -n 5 -l 7 -q"
"-f -x 5 -y 2 -q"
)
-for options in "${dsetchks_list[@]}"; do
- #
- #
- if [ ${do_dsetchks:-no} = no ]; then
- continue
- fi
- # Clean up any existing fifo files from previous runs
- if [ -e ./$DSETCHKS_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
- rm -f ./$DSETCHKS_FIFO_WRITER_TO_READER
- fi
- if [ -e ./$DSETCHKS_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
- rm -f ./$DSETCHKS_FIFO_READER_TO_WRITER
- fi
- #
- echo launch vfd_swmr_dsetchks_writer dsetchks, options $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_dsetchks_writer \
- ../vfd_swmr_dsetchks_writer $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_dsetchks_reader \
- ../vfd_swmr_dsetchks_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_dsetchks_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+#
+#
+# Loop with flushing of raw data and then without
+for flush in "" "-U"; do
+ for options in "${dsetchks_list[@]}"; do
+ #
+ #
+ if [ ${do_dsetchks:-no} = no ]; then
+ continue
+ fi
+ # Clean up any existing fifo files from previous runs
+ if [ -e ./$DSETCHKS_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found
+ rm -f ./$DSETCHKS_FIFO_WRITER_TO_READER
+ fi
+ if [ -e ./$DSETCHKS_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found
+ rm -f ./$DSETCHKS_FIFO_READER_TO_WRITER
+ fi
+ #
+ echo launch vfd_swmr_dsetchks_writer dsetchks, options $options $flush ......may take some time......
+ catch_out_err_and_rc vfd_swmr_dsetchks_writer \
+ ../vfd_swmr_dsetchks_writer $options $flush &
+ pid_writer=$!
+
+ catch_out_err_and_rc vfd_swmr_dsetchks_reader \
+ ../vfd_swmr_dsetchks_reader $options $flush &
+ 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_dsetchks_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_dsetchks_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_dsetchks_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
- # Clean up output files
- rm -f vfd_swmr_dsetchks_writer.{out,rc}
- rm -f vfd_swmr_dsetchks_reader.*.{out,rc}
+ # Clean up output files
+ rm -f vfd_swmr_dsetchks_writer.{out,rc}
+ rm -f vfd_swmr_dsetchks_reader.*.{out,rc}
+ done
done
###############################################################################