summaryrefslogtreecommitdiffstats
path: root/test/testvfdswmr.sh.in
diff options
context:
space:
mode:
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 7ef14be..1401da1 100644
--- a/test/testvfdswmr.sh.in
+++ b/test/testvfdswmr.sh.in
@@ -1241,51 +1241,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
###############################################################################
@@ -1305,51 +1309,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
###############################################################################