summaryrefslogtreecommitdiffstats
path: root/test/test_vfd_swmr.sh.in
diff options
context:
space:
mode:
Diffstat (limited to 'test/test_vfd_swmr.sh.in')
-rw-r--r--test/test_vfd_swmr.sh.in1623
1 files changed, 805 insertions, 818 deletions
diff --git a/test/test_vfd_swmr.sh.in b/test/test_vfd_swmr.sh.in
index 4ae4085..08d2706 100644
--- a/test/test_vfd_swmr.sh.in
+++ b/test/test_vfd_swmr.sh.in
@@ -1,4 +1,4 @@
-#!/us/bin/env bash
+#!/usr/bin/env bash
#
# Copyright by Akadio, Inc.
#
@@ -9,25 +9,22 @@
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
-# Tests for the vfd swmr feature.
-
-###############################################################################
-# VFD SWMR concurrent tests which are modified from existing swmr concurrent tests.
-# This is copied and modified from testswmr.sh.in
+# Acceptance tests for the VFD SWMR feature
+#
+# (Copied and modified from test_swmr.sh.in)
#
###############################################################################
-srcdir=@srcdir@
-
utils_testdir=@abs_top_builddir@/@H5_UTILS_TEST_BUILDDIR@
+testdir=@abs_top_builddir@/@H5_TEST_BUILDDIR@
###############################################################################
## test parameters
###############################################################################
nerrors=0
-nsofterrors=0 # soft errors are expected to occur some of the time
- # on a couple of nondeterministic tests.
+nsofterrors=0 # soft errors are expected to occur some of the time
+ # on a couple of non-deterministic tests.
###############################################################################
## test parameters for vfd_swmr_bigset_writer.c and vfd_swmr_group_writer.c
@@ -43,13 +40,12 @@ fi
###############################################################################
## For legacy tests:
-## definitions for message file to coordinate test runs
+## definitions for message file to coordinate test runs
###############################################################################
-#
WRITER_MESSAGE=VFD_SWMR_WRITER_MESSAGE # The message file created by writer that the open is complete
- # This should be the same as the define in "./swmr_common.h"
+ # This should be the same as the define in "test/swmr_common.h"
MESSAGE_TIMEOUT=300 # Message timeout length in secs
- # This should be the same as the define in "./h5test.h"
+ # This should be the same as the define in "test/h5test.h"
###############################################################################
## For attrdset test: definitions for fifo files to coordinate test runs
@@ -86,12 +82,11 @@ GFAIL_FIFO_READER_TO_WRITER=fifo_group_reader_to_writer
USING_AUX_PROCESS=@AUX_PROCESS@
###############################################################################
-## short hands and function definitions
+## Aliases and function definitions
###############################################################################
-#
-DPRINT=: # Set to "echo Debug:" for debugging printing,
+DPRINT=: # Set to "echo Debug:" for debugging printing,
# else ":" for noop.
-IFDEBUG=: # Set to null to turn on debugging, else ":" for noop.
+IFDEBUG=: # Set to null to turn on debugging, else ":" for noop.
# For legacy tests:
# To wait for the writer message file or till the maximum # of seconds is reached
@@ -154,10 +149,6 @@ catch_out_err_and_rc()
## to proceed as expected.
##
###############################################################################
-# The build (current) directory might be different than the source directory.
-if test -z "$srcdir"; then
- srcdir=.
-fi
# Check to see if the VFD specified by the HDF5_DRIVER environment variable
# supports SWMR.
@@ -254,333 +245,339 @@ if [[ "$HDF5TestExpress" -eq 0 ]] ; then
Nrecords=400000 # Increase the number of records to write
compress_list=("" "-c 5") # Enable filter
fi
-#
-#
+
+
# Loop over index types
-for index_type in "-i ea" "-i b2"
+for index_type in "-i ea" "-i b2"
do
# Try without compression, only; uncomment "-c 5" to try with compression.
for compress in "${compress_list[@]}";
do
echo
+ echo "*******************************************************************************"
echo "** Loop testing parameters: $index_type $compress"
+ echo "*******************************************************************************"
echo
- if [ ${do_generator:-no} = yes ]; then
- echo
- echo "## Generator test"
- # Launch the Generator without VFD SWMR write
- echo launch the vfd_swmr_generator
- ../vfd_swmr_generator $compress $index_type
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Launch the Generator with VFD SWMR write
- echo launch the vfd_swmr_generator with VFD SWMR write
- ../vfd_swmr_generator -s $compress $index_type
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
- fi
+ if [ ${do_generator:-no} = yes ]; then
+ echo
+ echo "###############################################################################"
+ echo "## Generator test"
+ echo "###############################################################################"
+ # Launch the Generator without VFD SWMR write
+ echo launch the vfd_swmr_generator
+ $testdir/vfd_swmr_generator $compress $index_type
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
- if [ ${do_expand:-no} = yes ]; then
- echo
- echo "## Writer test - test expanding the dataset"
-
- # Launch the Generator
- echo launch the vfd_swmr_generator with VFD SWMR write
- ../vfd_swmr_generator -s $compress $index_type
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Remove any possible writer message file before launching writer
- rm -f $WRITER_MESSAGE
- #
- # Launch the Writer
- echo launch the vfd_swmr_writer
- seed="" # Put -r <random seed> command here
- catch_out_err_and_rc vfd_swmr_writer \
- ../vfd_swmr_writer -q -o $Nrecords $seed &
- pid_writer=$!
- $DPRINT pid_writer=$pid_writer
-
- # Wait for message from writer process before starting reader(s)
- WAIT_MESSAGE $WRITER_MESSAGE
- #
- # Launch the Readers
- #declare -a seeds=(<seed1> <seed2> <seed3> ... )
- echo launch $Nreaders vfd_swmr_readers ......may take some time......
- pid_readers=""
- n=0
- while [ $n -lt $Nreaders ]; do
- #seed="-r ${seeds[$n]}"
- seed=""
- catch_out_err_and_rc vfd_swmr_reader.$n \
- ../vfd_swmr_reader -q $Nsecs_add $seed &
- pid_readers="$pid_readers $!"
- n=`expr $n + 1`
- done
- $DPRINT pid_readers=$pid_readers
- $IFDEBUG ps
-
- # Wait for the readers to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # readers will find the shadow file when they reopen
- # the .h5 file.
- wait $pid_readers
- kill -USR1 $(cat vfd_swmr_writer.pid)
- wait $pid_writer
-
- # Collect exit codes of the readers
- n=0
- while [ $n -lt $Nreaders ]; do
- if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- n=$((n + 1))
- done
-
- # Collect exit code of the writer
- $DPRINT checked writer $pid_writer
- if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_writer.{out,rc}
- rm -f vfd_swmr_reader.*.{out,rc}
- fi
+ # Launch the Generator with VFD SWMR write
+ echo launch the vfd_swmr_generator with VFD SWMR write
+ $testdir/vfd_swmr_generator -s $compress $index_type
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
+ fi
- if [ ${do_shrink:-no} = yes ]; then
- if [ ${do_expand:-no} != yes ]; then
- echo "Cancelling the 'shrink' test: it depends on the .h5 file left behind by the 'expand' test." 1>&2
- exit 1
- fi
- echo
- echo "## Remove test - test shrinking the dataset"
-
- # Remove any possible writer message file before launching writer
- rm -f $WRITER_MESSAGE
- # Launch the Remove Writer
- echo launch the vfd_swmr_remove_writer
- seed="" # Put -r <random seed> command here
- catch_out_err_and_rc vfd_swmr_writer \
- ../vfd_swmr_remove_writer -q -o $Nrecs_rem $seed &
- pid_writer=$!
- $DPRINT pid_writer=$pid_writer
-
- # Wait for message from writer process before starting reader(s)
- WAIT_MESSAGE $WRITER_MESSAGE
- #
- # Launch the Remove Readers
- #declare -a seeds=(<seed1> <seed2> <seed3> ... )
- n=0
- pid_readers=""
- echo launch $Nreaders swmr_remove_readers ......may take some time ......
- while [ $n -lt $Nreaders ]; do
- #seed="-r ${seeds[$n]}"
- seed=""
- catch_out_err_and_rc vfd_swmr_reader.$n \
- ../vfd_swmr_remove_reader -q $Nsecs_rem $seed &
- pid_readers="$pid_readers $!"
- n=`expr $n + 1`
- done
- $DPRINT pid_readers=$pid_readers
- $IFDEBUG ps
-
- # Wait for the readers to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # readers will find the shadow file when they reopen
- # the .h5 file.
- wait $pid_readers
- kill -USR1 $(cat vfd_swmr_writer.pid)
- wait $pid_writer
-
- # Collect exit codes of the readers
- n=0
- while [ $n -lt $Nreaders ]; do
- if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- n=$((n + 1))
- done
-
- # Collect exit code of the writer
- $DPRINT checked writer $pid_writer
- if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_writer.{out,rc}
- rm -f vfd_swmr_reader.*.{out,rc}
- fi
+ if [ ${do_expand:-no} = yes ]; then
+ echo
+ echo "## Writer test - test expanding the dataset"
- if [ ${do_expand_shrink:-no} = yes ]; then
- echo
- echo "## Expand/shrink test - randomly grow or shrink the dataset"
-
- # Launch the Generator
- echo launch the vfd_swmr_generator with VFD SWMR write
- ../vfd_swmr_generator -s $compress $index_type
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Launch the Writer (not in parallel - just to rebuild the datasets)
- echo launch the vfd_swmr_writer
- seed="" # Put -r <random seed> command here
- ../vfd_swmr_writer -q -W $Nrecords $seed
- if test $? -ne 0; then
- echo writer had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Remove any possible writer message file before launching writer
- rm -f $WRITER_MESSAGE
- #
- # Launch the Add/Remove Writer
- echo launch the vfd_swmr_addrem_writer
- seed="" # Put -r <random seed> command here
- catch_out_err_and_rc vfd_swmr_writer \
- ../vfd_swmr_addrem_writer -q $Nrecords $seed &
- pid_writer=$!
- $DPRINT pid_writer=$pid_writer
-
- # Wait for message from writer process before starting reader(s)
- WAIT_MESSAGE $WRITER_MESSAGE
- #
- # Launch the Add/Remove Readers
- #declare -a seeds=(<seed1> <seed2> <seed3> ... )
- n=0
- pid_readers=""
- echo launch $Nreaders vfd_swmr_remove_readers ...... may take some time ......
- while [ $n -lt $Nreaders ]; do
- #seed="-r ${seeds[$n]}"
- seed=""
- catch_out_err_and_rc vfd_swmr_reader.$n \
- ../vfd_swmr_remove_reader -q $Nsecs_addrem $seed &
- pid_readers="$pid_readers $!"
- n=`expr $n + 1`
- done
- $DPRINT pid_readers=$pid_readers
- $IFDEBUG ps
-
- # Wait for the readers to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # readers will find the shadow file when they reopen
- # the .h5 file.
- wait $pid_readers
- kill -USR1 $(cat vfd_swmr_writer.pid)
- wait $pid_writer
-
- # Collect exit codes of the readers
- n=0
- while [ $n -lt $Nreaders ]; do
- if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- n=$((n + 1))
- done
-
- # Collect exit code of the writer
- $DPRINT checked writer $pid_writer
- if [ ! -e vfd_swmr_writer.rc ] ||
- [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_writer.{out,rc}
- rm -f vfd_swmr_reader.*.{out,rc}
- fi
+ # Launch the Generator
+ echo launch the vfd_swmr_generator with VFD SWMR write
+ $testdir/vfd_swmr_generator -s $compress $index_type
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
- if [ ${do_sparse:-no} = yes ]; then
- echo
- echo "## Sparse writer test - write random dataset locations"
-
- # Launch the Generator
- # NOTE: Random seed is shared between readers and writers and is
- # created by the generator.
- echo launch the vfd_swmr_generator with VFD SWMR write
- seed="" # Put -r <random seed> command here
- ../vfd_swmr_generator -s $compress $index_type $seed
- if test $? -ne 0; then
- echo generator had error
- nerrors=`expr $nerrors + 1`
- fi
-
- # Remove any possible writer message file before launching writer
- rm -f $WRITER_MESSAGE
- # Launch the Sparse writer
- echo launch the vfd_swmr_sparse_writer
- catch_out_err_and_rc vfd_swmr_writer nice -n 20 \
- ../vfd_swmr_sparse_writer -q $Nrecs_spa &
- pid_writer=$!
- $DPRINT pid_writer=$pid_writer
-
- # Wait for message from writer process before starting reader(s)
- WAIT_MESSAGE $WRITER_MESSAGE
- #
- # Launch the Sparse readers
- n=0
- pid_readers=""
- echo launch $Nrdrs_spa vfd_swmr_sparse_readers ..... may take some time ......
- while [ $n -lt $Nrdrs_spa ]; do
- # The sparse reader spits out a LOT of data so it's set to 'quiet'
- catch_out_err_and_rc vfd_swmr_reader.$n \
- ../vfd_swmr_sparse_reader -q $Nrecs_spa &
- pid_readers="$pid_readers $!"
- n=`expr $n + 1`
- done
- $DPRINT pid_readers=$pid_readers
- $IFDEBUG ps
-
- # Wait for the readers and the writer to finish.
- echo "pid_readers=$pid_readers"
- echo "pid_writer=$pid_writer"
-
- # Wait for the readers to finish before signalling the
- # writer to quit: the writer holds the file open so that the
- # readers will find the shadow file when they reopen
- # the .h5 file.
- wait $pid_readers
- kill -USR1 $(cat vfd_swmr_writer.pid)
- wait $pid_writer
-
- # Collect exit codes of the readers
- n=0
- while [ $n -lt $Nrdrs_spa ]; do
- if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- n=$((n + 1))
- done
-
- # Collect exit code of the writer
- $DPRINT checked writer $pid_writer
- if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
-
- # Clean up output files
- rm -f vfd_swmr_writer.{out,rc}
- rm -f vfd_swmr_reader.*.{out,rc}
- fi
+ # Remove any possible writer message file before launching writer
+ rm -f $WRITER_MESSAGE
+ #
+ # Launch the Writer
+ echo launch the vfd_swmr_writer
+ seed="" # Put -r <random seed> command here
+ catch_out_err_and_rc vfd_swmr_writer \
+ $testdir/vfd_swmr_writer -q -o $Nrecords $seed &
+ pid_writer=$!
+ $DPRINT pid_writer=$pid_writer
+
+ # Wait for message from writer process before starting reader(s)
+ WAIT_MESSAGE $WRITER_MESSAGE
+
+ # Launch the Readers
+ #declare -a seeds=(<seed1> <seed2> <seed3> ... )
+ echo launch $Nreaders vfd_swmr_readers ......may take some time......
+ pid_readers=""
+ n=0
+ while [ $n -lt $Nreaders ]; do
+ #seed="-r ${seeds[$n]}"
+ seed=""
+ catch_out_err_and_rc vfd_swmr_reader.$n \
+ $testdir/vfd_swmr_reader -q $Nsecs_add $seed &
+ pid_readers="$pid_readers $!"
+ n=$((n + 1))
+ done
+ $DPRINT pid_readers=$pid_readers
+ $IFDEBUG ps
+
+ # Wait for the readers to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # readers will find the shadow file when they reopen
+ # the .h5 file.
+ wait $pid_readers
+ kill -USR1 $(cat vfd_swmr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit codes of the readers
+ n=0
+ while [ $n -lt $Nreaders ]; do
+ if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+ n=$((n + 1))
+ done
+
+ # Collect exit code of the writer
+ $DPRINT checked writer $pid_writer
+ if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_writer.{out,rc}
+ rm -f vfd_swmr_reader.*.{out,rc}
+ fi
+
+ if [ ${do_shrink:-no} = yes ]; then
+ if [ ${do_expand:-no} != yes ]; then
+ echo "Cancelling the 'shrink' test: it depends on the .h5 file left behind by the 'expand' test." 1>&2
+ exit 1
+ fi
+ echo
+ echo "###############################################################################"
+ echo "## Remove test - test shrinking the dataset"
+ echo "###############################################################################"
+
+ # Remove any possible writer message file before launching writer
+ rm -f $WRITER_MESSAGE
+ # Launch the Remove Writer
+ echo launch the vfd_swmr_remove_writer
+ seed="" # Put -r <random seed> command here
+ catch_out_err_and_rc vfd_swmr_writer \
+ $testdir/vfd_swmr_remove_writer -q -o $Nrecs_rem $seed &
+ pid_writer=$!
+ $DPRINT pid_writer=$pid_writer
+
+ # Wait for message from writer process before starting reader(s)
+ WAIT_MESSAGE $WRITER_MESSAGE
+
+ # Launch the Remove Readers
+ #declare -a seeds=(<seed1> <seed2> <seed3> ... )
+ n=0
+ pid_readers=""
+ echo launch $Nreaders swmr_remove_readers ......may take some time ......
+ while [ $n -lt $Nreaders ]; do
+ #seed="-r ${seeds[$n]}"
+ seed=""
+ catch_out_err_and_rc vfd_swmr_reader.$n \
+ $testdir/vfd_swmr_remove_reader -q $Nsecs_rem $seed &
+ pid_readers="$pid_readers $!"
+ n=$((n + 1))
+ done
+ $DPRINT pid_readers=$pid_readers
+ $IFDEBUG ps
+
+ # Wait for the readers to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # readers will find the shadow file when they reopen
+ # the .h5 file.
+ wait $pid_readers
+ kill -USR1 $(cat vfd_swmr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit codes of the readers
+ n=0
+ while [ $n -lt $Nreaders ]; do
+ if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+ n=$((n + 1))
+ done
+
+ # Collect exit code of the writer
+ $DPRINT checked writer $pid_writer
+ if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_writer.{out,rc}
+ rm -f vfd_swmr_reader.*.{out,rc}
+ fi
+
+ if [ ${do_expand_shrink:-no} = yes ]; then
+ echo
+ echo "## Expand/shrink test - randomly grow or shrink the dataset"
+
+ # Launch the Generator
+ echo launch the vfd_swmr_generator with VFD SWMR write
+ $testdir/vfd_swmr_generator -s $compress $index_type
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Launch the Writer (not in parallel - just to rebuild the datasets)
+ echo launch the vfd_swmr_writer
+ seed="" # Put -r <random seed> command here
+ $testdir/vfd_swmr_writer -q -W $Nrecords $seed
+ if test $? -ne 0; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Remove any possible writer message file before launching writer
+ rm -f $WRITER_MESSAGE
+ #
+ # Launch the Add/Remove Writer
+ echo launch the vfd_swmr_addrem_writer
+ seed="" # Put -r <random seed> command here
+ catch_out_err_and_rc vfd_swmr_writer \
+ $testdir/vfd_swmr_addrem_writer -q $Nrecords $seed &
+ pid_writer=$!
+ $DPRINT pid_writer=$pid_writer
+
+ # Wait for message from writer process before starting reader(s)
+ WAIT_MESSAGE $WRITER_MESSAGE
+ #
+ # Launch the Add/Remove Readers
+ #declare -a seeds=(<seed1> <seed2> <seed3> ... )
+ n=0
+ pid_readers=""
+ echo launch $Nreaders vfd_swmr_remove_readers ...... may take some time ......
+ while [ $n -lt $Nreaders ]; do
+ #seed="-r ${seeds[$n]}"
+ seed=""
+ catch_out_err_and_rc vfd_swmr_reader.$n \
+ $testdir/vfd_swmr_remove_reader -q $Nsecs_addrem $seed &
+ pid_readers="$pid_readers $!"
+ n=$((n + 1))
+ done
+ $DPRINT pid_readers=$pid_readers
+ $IFDEBUG ps
+
+ # Wait for the readers to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # readers will find the shadow file when they reopen
+ # the .h5 file.
+ wait $pid_readers
+ kill -USR1 $(cat vfd_swmr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit codes of the readers
+ n=0
+ while [ $n -lt $Nreaders ]; do
+ if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+ n=$((n + 1))
+ done
+
+ # Collect exit code of the writer
+ $DPRINT checked writer $pid_writer
+ if [ ! -e vfd_swmr_writer.rc ] ||
+ [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_writer.{out,rc}
+ rm -f vfd_swmr_reader.*.{out,rc}
+ fi
+
+ if [ ${do_sparse:-no} = yes ]; then
+ echo
+ echo "## Sparse writer test - write random dataset locations"
+
+ # Launch the Generator
+ # NOTE: Random seed is shared between readers and writers and is
+ # created by the generator.
+ echo launch the vfd_swmr_generator with VFD SWMR write
+ seed="" # Put -r <random seed> command here
+ $testdir/vfd_swmr_generator -s $compress $index_type $seed
+ if test $? -ne 0; then
+ echo generator had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Remove any possible writer message file before launching writer
+ rm -f $WRITER_MESSAGE
+ # Launch the Sparse writer
+ echo launch the vfd_swmr_sparse_writer
+ catch_out_err_and_rc vfd_swmr_writer nice -n 20 \
+ $testdir/vfd_swmr_sparse_writer -q $Nrecs_spa &
+ pid_writer=$!
+ $DPRINT pid_writer=$pid_writer
+
+ # Wait for message from writer process before starting reader(s)
+ WAIT_MESSAGE $WRITER_MESSAGE
+ #
+ # Launch the Sparse readers
+ n=0
+ pid_readers=""
+ echo launch $Nrdrs_spa vfd_swmr_sparse_readers ..... may take some time ......
+ while [ $n -lt $Nrdrs_spa ]; do
+ # The sparse reader spits out a LOT of data so it's set to 'quiet'
+ catch_out_err_and_rc vfd_swmr_reader.$n \
+ $testdir/vfd_swmr_sparse_reader -q $Nrecs_spa &
+ pid_readers="$pid_readers $!"
+ n=$((n + 1))
+ done
+ $DPRINT pid_readers=$pid_readers
+ $IFDEBUG ps
+
+ # Wait for the readers and the writer to finish.
+ echo "pid_readers=$pid_readers"
+ echo "pid_writer=$pid_writer"
+
+ # Wait for the readers to finish before signalling the
+ # writer to quit: the writer holds the file open so that the
+ # readers will find the shadow file when they reopen
+ # the .h5 file.
+ wait $pid_readers
+ kill -USR1 $(cat vfd_swmr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit codes of the readers
+ n=0
+ while [ $n -lt $Nrdrs_spa ]; do
+ if [ $(cat vfd_swmr_reader.$n.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+ n=$((n + 1))
+ done
+
+ # Collect exit code of the writer
+ $DPRINT checked writer $pid_writer
+ if [ $(cat vfd_swmr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_writer.{out,rc}
+ rm -f vfd_swmr_reader.*.{out,rc}
+ fi
done
done
@@ -595,50 +592,50 @@ done
#
for ty in null oob; do
- if [ ${ty} = null ]; then
- [ ${do_vlstr_null:-no} = no ] && continue
- echo
- echo "## VL string 1 - expect to read NULL"
- else
- [ ${do_vlstr_oob:-no} = no ] && continue
- echo
- echo "## VL string 2 - expect out-of-bounds access"
- fi
+ if [ ${ty} = null ]; then
+ [ ${do_vlstr_null:-no} = no ] && continue
+ echo
+ echo "## VL string 1 - expect to read NULL"
+ else
+ [ ${do_vlstr_oob:-no} = no ] && continue
+ echo
+ echo "## VL string 2 - expect out-of-bounds access"
+ fi
- echo launch vfd_swmr_vlstr_writer ..... may take some time ......
- catch_out_err_and_rc vfd_swmr_vlstr_writer \
- ../vfd_swmr_vlstr_writer -n 500 -q -t ${ty} &
- pid_writer=$!
-
- # pause?
-
- catch_out_err_and_rc vfd_swmr_vlstr_reader \
- ../vfd_swmr_vlstr_reader -n 500 -q -t ${ty} &
- 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_vlstr_writer.pid)
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_vlstr_reader.rc) -ne 0 ]; then
- echo reader had error
- nsofterrors=$((nsofterrors + 1))
- fi
+ echo launch vfd_swmr_vlstr_writer ..... may take some time ......
+ catch_out_err_and_rc vfd_swmr_vlstr_writer \
+ $testdir/vfd_swmr_vlstr_writer -n 500 -q -t ${ty} &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_vlstr_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # pause?
- # Clean up output files
- rm -f vfd_swmr_vlstr_writer.{out,rc}
- rm -f vfd_swmr_vlstr_reader.*.{out,rc}
+ catch_out_err_and_rc vfd_swmr_vlstr_reader \
+ $testdir/vfd_swmr_vlstr_reader -n 500 -q -t ${ty} &
+ 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_vlstr_writer.pid)
+ wait $pid_writer
+
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_vlstr_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nsofterrors=$((nsofterrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_vlstr_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_vlstr_writer.{out,rc}
+ rm -f vfd_swmr_vlstr_reader.*.{out,rc}
done
###############################################################################
@@ -652,40 +649,40 @@ done
#
#
if [ ${do_zoo:-no} = yes ]; then
- rm -f ./shared_tick_num
- echo launch vfd_swmr_zoo_writer
- catch_out_err_and_rc vfd_swmr_zoo_writer \
- ../vfd_swmr_zoo_writer -q &
- pid_writer=$!
+ rm -f ./shared_tick_num
+ echo launch vfd_swmr_zoo_writer
+ catch_out_err_and_rc vfd_swmr_zoo_writer \
+ $testdir/vfd_swmr_zoo_writer -q &
+ pid_writer=$!
# -l is the expected maximal number of ticks from the writer's finishing zoo creation or deletion
# to the reader's finishing validation of zoo creation or deletion
- catch_out_err_and_rc vfd_swmr_zoo_reader \
- ../vfd_swmr_zoo_reader -l 4 -q &
- 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
- wait $pid_writer
-
- # Collect exit code of the reader
- if [ $(cat vfd_swmr_zoo_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_zoo_reader \
+ $testdir/vfd_swmr_zoo_reader -l 4 -q &
+ pid_reader=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_zoo_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # 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
+ wait $pid_writer
- # Clean up output files
- rm -f vfd_swmr_zoo_writer.{out,rc}
- rm -f vfd_swmr_zoo_reader.*.{out,rc}
+ # Collect exit code of the reader
+ if [ $(cat vfd_swmr_zoo_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_zoo_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_zoo_writer.{out,rc}
+ rm -f vfd_swmr_zoo_reader.*.{out,rc}
fi
@@ -715,37 +712,37 @@ fi
#
#
if [ ${do_groups:-no} = yes ]; then
- echo launch vfd_swmr_group_writer ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -c 10 -n $GROUP_n &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -c 10 -n $GROUP_n -u 5 &
- 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
- 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
+ echo launch vfd_swmr_group_writer ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -c 10 -n $GROUP_n &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -c 10 -n $GROUP_n -u 5 &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # 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
+ 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
###############################################################################
@@ -772,10 +769,8 @@ grp_attr_list=(
"modify-vstr"
"del-ohr-block"
)
-#
-#
+
# Setting for exhaustive and quick runs
-#
if [[ "$HDF5TestExpress" -eq 0 ]] ; then # exhaustive run
GROUP_attr_n=2
grp_attr_list=(
@@ -801,43 +796,42 @@ elif [[ "$HDF5TestExpress" -gt 1 ]] ; then # quick run
"del-ohr-block"
)
fi
-#
-#
+
for options in ${grp_attr_list[*]}; do
- if [ ${do_groups_attrs:-no} = no ]; then
- continue
- fi
- echo launch vfd_swmr_group attribute: $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -c 1 -n $GROUP_attr_n -a 1 -A $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -c 1 -n $GROUP_attr_n -a 1 -A $options &
- 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
- 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
+ if [ ${do_groups_attrs:-no} = no ]; then
+ continue
+ fi
+ echo launch vfd_swmr_group attribute: $options ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -c 1 -n $GROUP_attr_n -a 1 -A $options &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -c 1 -n $GROUP_attr_n -a 1 -A $options &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # 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
+ 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}
done
###############################################################################
@@ -867,43 +861,42 @@ os_grp_attr_list=(
"add-ohr-block"
"del-ohr-block"
)
-#
-#
+
for options in ${os_grp_attr_list[*]}; do
- if [ ${do_os_groups_attrs:-no} = no ]; then
- continue
- fi
- echo launch vfd_swmr_group attribute with old-style group: $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -G -c 1 -n $GROUP_attr_n -a 1 -A $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -G -c 1 -n $GROUP_attr_n -a 1 -A $options &
- 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
- 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
+ if [ ${do_os_groups_attrs:-no} = no ]; then
+ continue
+ fi
+ echo launch vfd_swmr_group attribute with old-style group: $options ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -G -c 1 -n $GROUP_attr_n -a 1 -A $options &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -G -c 1 -n $GROUP_attr_n -a 1 -A $options &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # 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
+ 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}
done
###############################################################################
@@ -927,10 +920,8 @@ grp_op_list=(
"grp-compact-t-dense"
"grp-dense-t-compact"
)
-#
-#
+
# Setting for exhaustive and quick run
-#
if [[ "$HDF5TestExpress" -eq 0 ]] ; then # exhaustive run
GROUP_op_n=2
grp_op_list=(
@@ -948,43 +939,42 @@ elif [[ "$HDF5TestExpress" -gt 1 ]] ; then # quick run
"grp-dense-t-compact"
)
fi
-#
-#
+
for options in ${grp_op_list[*]}; do
- if [ ${do_groups_ops:-no} = no ]; then
- continue
- fi
- echo launch vfd_swmr_group operations: $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -c 1 -n $GROUP_op_n -O $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -c 1 -n $GROUP_op_n -O $options &
- 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
- 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
+ if [ ${do_groups_ops:-no} = no ]; then
+ continue
+ fi
+ echo launch vfd_swmr_group operations: $options ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -c 1 -n $GROUP_op_n -O $options &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -c 1 -n $GROUP_op_n -O $options &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # 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
+ 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}
done
###############################################################################
@@ -1008,40 +998,40 @@ os_grp_op_list=(
#
#
for options in ${os_grp_op_list[*]}; do
- if [ ${do_os_groups_ops:-no} = no ]; then
- continue
- fi
- echo launch vfd_swmr_group operations with old-style group: $options ......may take some time......
- catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -G -c 1 -n $GROUP_op_n -O $options &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_group_reader -q -G -c 1 -n $GROUP_op_n -O $options &
- 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
- 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
+ if [ ${do_os_groups_ops:-no} = no ]; then
+ continue
+ fi
+ echo launch vfd_swmr_group operations with old-style group: $options ......may take some time......
+ catch_out_err_and_rc vfd_swmr_group_writer \
+ $testdir/vfd_swmr_group_writer -q -G -c 1 -n $GROUP_op_n -O $options &
+ pid_writer=$!
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_group_reader -q -G -c 1 -n $GROUP_op_n -O $options &
+ pid_reader=$!
- # Clean up output files
- rm -f vfd_swmr_group_writer.{out,rc}
- rm -f vfd_swmr_group_reader.*.{out,rc}
+ # 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
+ 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}
done
###############################################################################
@@ -1062,7 +1052,7 @@ GROUP_seg_n=1000000 # Number of groups when segmentation fa
if [ ${do_os_groups_seg:-no} != no ]; then
echo launch vfd_swmr_group operations with old-style group: $GROUP_seg_n groups ......may take some time......
catch_out_err_and_rc vfd_swmr_group_writer \
- ../vfd_swmr_group_writer -q -N -G -n $GROUP_seg_n -a $GROUP_seg_n
+ $testdir/vfd_swmr_group_writer -q -N -G -n $GROUP_seg_n -a $GROUP_seg_n
# Collect exit code of the writer
if [ $(cat vfd_swmr_group_writer.rc) -ne 0 ]; then
@@ -1134,11 +1124,11 @@ for options in "-d 1" "-d 1 -F" "-d 2 -l 16" "-d 2 -F -l 16" "-d 1 -t" "-d 1 -t
echo launch vfd_swmr_bigset_writer many small, options $options
catch_out_err_and_rc vfd_swmr_bigset_writer \
- ../vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
+ $testdir/vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
pid_writer=$!
catch_out_err_and_rc vfd_swmr_bigset_reader \
- ../vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
+ $testdir/vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_many_s -e 1 -r 16 -c 16 -q &
pid_reader=$!
# Wait for the reader to finish before signalling the
@@ -1165,13 +1155,13 @@ for options in "-d 1" "-d 1 -F" "-d 2 -l 16" "-d 2 -F -l 16" "-d 1 -t" "-d 1 -t
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
+ # 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
+ # Clean up output files
rm -f vfd_swmr_bigset_writer.{out,rc}
rm -f vfd_swmr_bigset_reader.*.{out,rc}
rm -f aux_process.{out,rc}
@@ -1213,11 +1203,11 @@ for options in "-d 1" "-d 1 -F" "-d 2 -l 10" "-d 2 -F -l 10" "-d 1 -t -l 10" "-d
fi
catch_out_err_and_rc vfd_swmr_bigset_writer \
- ../vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
+ $testdir/vfd_swmr_bigset_writer -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
pid_writer=$!
catch_out_err_and_rc vfd_swmr_bigset_reader \
- ../vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
+ $testdir/vfd_swmr_bigset_reader -n $BIGSET_n $options -s $BIGSET_few_s -e 8 -r 256 -c 256 -q &
pid_reader=$!
# Wait for the reader to finish before signalling the
@@ -1296,11 +1286,11 @@ for options in "${attrdset_list[@]}"; do
echo launch vfd_swmr_attrdset_writer attrdset, options $options ......may take some time......
catch_out_err_and_rc vfd_swmr_attrdset_writer \
- ../vfd_swmr_attrdset_writer $options &
+ $testdir/vfd_swmr_attrdset_writer $options &
pid_writer=$!
catch_out_err_and_rc vfd_swmr_attrdset_reader \
- ../vfd_swmr_attrdset_reader $options &
+ $testdir/vfd_swmr_attrdset_reader $options &
pid_reader=$!
# Wait for the reader to finish before signaling the
@@ -1340,11 +1330,9 @@ done
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
+ 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
@@ -1353,37 +1341,37 @@ for flush in "" "-U"; do
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
+ echo launch vfd_swmr_dsetops_writer dsetops, options $options $flush......may take some time......
+ catch_out_err_and_rc vfd_swmr_dsetops_writer \
+ $testdir/vfd_swmr_dsetops_writer $options $flush &
+ pid_writer=$!
+
+ catch_out_err_and_rc vfd_swmr_dsetops_reader \
+ $testdir/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 writer
- if [ $(cat vfd_swmr_dsetops_writer.rc) -ne 0 ]; then
- echo writer 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
- # Clean up output files
- rm -f vfd_swmr_dsetops_writer.{out,rc}
- rm -f vfd_swmr_dsetops_reader.*.{out,rc}
+ # 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}
done
done
@@ -1404,11 +1392,10 @@ done
for ref in "-O" "-R" "-O -R"; do
# Loop with different operations
for options in "-p -e 20 -t -g -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_ref:-no} = no ]; then
- continue
- fi
+
+ if [ ${do_dsetops_ref:-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
@@ -1416,38 +1403,38 @@ for ref in "-O" "-R" "-O -R"; do
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 $ref......may take some time......
- catch_out_err_and_rc vfd_swmr_dsetops_writer \
- ../vfd_swmr_dsetops_writer $options $ref &
- pid_writer=$!
-
- catch_out_err_and_rc vfd_swmr_dsetops_reader \
- ../vfd_swmr_dsetops_reader $options $ref &
- 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 writer
- if [ $(cat vfd_swmr_dsetops_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ echo launch vfd_swmr_dsetops_writer dsetops, options $options $ref......may take some time......
+ catch_out_err_and_rc vfd_swmr_dsetops_writer \
+ $testdir/vfd_swmr_dsetops_writer $options $ref &
+ pid_writer=$!
- # Clean up output files
- rm -f vfd_swmr_dsetops_writer.{out,rc}
- rm -f vfd_swmr_dsetops_reader.*.{out,rc}
+ catch_out_err_and_rc vfd_swmr_dsetops_reader \
+ $testdir/vfd_swmr_dsetops_reader $options $ref &
+ 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 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}
done
done
@@ -1486,56 +1473,56 @@ for flush in "" "-U"; do
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
+ echo launch vfd_swmr_dsetchks_writer dsetchks, options $options $flush ......may take some time......
+ catch_out_err_and_rc vfd_swmr_dsetchks_writer \
+ $testdir/vfd_swmr_dsetchks_writer $options $flush &
+ pid_writer=$!
+
+ catch_out_err_and_rc vfd_swmr_dsetchks_reader \
+ $testdir/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 writer
- if [ $(cat vfd_swmr_dsetchks_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # 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
- # 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
if [ ${do_independ_wr:-no} = yes ]; then
- echo launch vfd_swmr_indep_wr_p0 ..... process 0 ......
- echo launch vfd_swmr_indep_wr_p1 ..... process 1 ......
- catch_out_err_and_rc vfd_swmr_indep_wr_p0 \
- ../vfd_swmr_indep_wr_p0 &
- pid_writer=$!
+ echo launch vfd_swmr_indep_wr_p0 ..... process 0 ......
+ echo launch vfd_swmr_indep_wr_p1 ..... process 1 ......
+ catch_out_err_and_rc vfd_swmr_indep_wr_p0 \
+ $testdir/vfd_swmr_indep_wr_p0 &
+ pid_writer=$!
- catch_out_err_and_rc vfd_swmr_group_reader \
- ../vfd_swmr_indep_wr_p1 &
- pid_reader=$!
+ catch_out_err_and_rc vfd_swmr_group_reader \
+ $testdir/vfd_swmr_indep_wr_p1 &
+ pid_reader=$!
wait $pid_reader
wait $pid_writer
- # Clean up output files
- rm -f vfd_swmr_indep_wr_p0.{out,rc}
- rm -f vfd_swmr_indep_wr_p1.{out,rc}
+ # Clean up output files
+ rm -f vfd_swmr_indep_wr_p0.{out,rc}
+ rm -f vfd_swmr_indep_wr_p1.{out,rc}
fi
@@ -1552,7 +1539,7 @@ fi
#
#
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
@@ -1560,39 +1547,39 @@ if [ ${do_gfail_entry_length:-no} = yes ]; then
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
+
+ echo launch vfd_swmr_gfail_writer -q -m 10 -n 340000
+ catch_out_err_and_rc vfd_swmr_gfail_entry_length_writer \
+ $testdir/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 \
+ $testdir/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))
+ 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
+ # 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}
+ # 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
###############################################################################
@@ -1613,7 +1600,7 @@ fi
#
#
if [ ${do_gfail_checksum:-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
@@ -1621,42 +1608,42 @@ if [ ${do_gfail_checksum:-no} = yes ]; then
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 -n 420000 ......may take some time......
- catch_out_err_and_rc vfd_swmr_gfail_checksum_writer \
- ../vfd_swmr_gfail_writer -q -m 50 -t 10 -n 4000000 &
- pid_writer=$!
-
- echo launch vfd_swmr_gfail_reader -n 420000 ......may take some time......
- catch_out_err_and_rc vfd_swmr_gfail_checksum_reader \
- ../vfd_swmr_gfail_reader -q -m 50 -t 10 -n 4000000 &
- 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
+
+ echo launch vfd_swmr_gfail_writer -q -n 420000 ......may take some time......
+ catch_out_err_and_rc vfd_swmr_gfail_checksum_writer \
+ $testdir/vfd_swmr_gfail_writer -q -m 50 -t 10 -n 4000000 &
+ pid_writer=$!
+
+ echo launch vfd_swmr_gfail_reader -n 420000 ......may take some time......
+ catch_out_err_and_rc vfd_swmr_gfail_checksum_reader \
+ $testdir/vfd_swmr_gfail_reader -q -m 50 -t 10 -n 4000000 &
+ 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_checksum_reader.rc) -ne 0 ]; then
grep "suggest to increase the value of max_lag" vfd_swmr_gfail_checksum_reader.out >/dev/null 2>&1
if test $? -ne 0; then
echo reader had error
- nerrors=$((nerrors + 1))
+ nerrors=$((nerrors + 1))
fi
fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_gfail_checksum_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_gfail_checksum_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
- # Clean up output files
- rm -f vfd_swmr_gfail_checksum_writer.{out,rc}
- rm -f vfd_swmr_gfail_checksum_reader.*.{out,rc}
+ # Clean up output files
+ rm -f vfd_swmr_gfail_checksum_writer.{out,rc}
+ rm -f vfd_swmr_gfail_checksum_reader.*.{out,rc}
fi
###############################################################################
@@ -1672,7 +1659,7 @@ fi
#
#
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
@@ -1680,35 +1667,35 @@ if [ ${do_gfail_page_size:-no} = yes ]; then
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
+ 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 \
+ $testdir/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 \
+ $testdir/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}
@@ -1728,7 +1715,7 @@ fi
#
#
if [ ${do_gfail_index_space:-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
@@ -1736,39 +1723,39 @@ if [ ${do_gfail_index_space:-no} = yes ]; then
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 50 -t 10 -n 1000000 ......may take some time......
- catch_out_err_and_rc vfd_swmr_gfail_index_space_writer \
- ../vfd_swmr_gfail_writer -q -m 50 -t 10 -n 1000000 &
- pid_writer=$!
-
- echo launch vfd_swmr_gfail_reader -m 50 -t 10 -n 1000000 ......may take some time......
- catch_out_err_and_rc vfd_swmr_gfail_index_space_reader \
- ../vfd_swmr_gfail_reader -m 50 -t 10 -n 1000000 &
- 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_index_space_reader.rc) -ne 0 ]; then
- echo reader had error
- nerrors=$((nerrors + 1))
- fi
- # Collect exit code of the writer
- if [ $(cat vfd_swmr_gfail_index_space_writer.rc) -ne 0 ]; then
- echo writer had error
- nerrors=$((nerrors + 1))
- fi
+ echo launch vfd_swmr_gfail_writer -q -m 50 -t 10 -n 1000000 ......may take some time......
+ catch_out_err_and_rc vfd_swmr_gfail_index_space_writer \
+ $testdir/vfd_swmr_gfail_writer -q -m 50 -t 10 -n 1000000 &
+ pid_writer=$!
- # Clean up output files
- rm -f vfd_swmr_gfail_index_space_writer.{out,rc}
- rm -f vfd_swmr_gfail_index_space_reader.*.{out,rc}
+ echo launch vfd_swmr_gfail_reader -m 50 -t 10 -n 1000000 ......may take some time......
+ catch_out_err_and_rc vfd_swmr_gfail_index_space_reader \
+ $testdir/vfd_swmr_gfail_reader -m 50 -t 10 -n 1000000 &
+ 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_index_space_reader.rc) -ne 0 ]; then
+ echo reader had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Collect exit code of the writer
+ if [ $(cat vfd_swmr_gfail_index_space_writer.rc) -ne 0 ]; then
+ echo writer had error
+ nerrors=$((nerrors + 1))
+ fi
+
+ # Clean up output files
+ rm -f vfd_swmr_gfail_index_space_writer.{out,rc}
+ rm -f vfd_swmr_gfail_index_space_reader.*.{out,rc}
fi
###############################################################################
@@ -1779,7 +1766,7 @@ $DPRINT nerrors $nerrors nsofterrors $nsofterrors
if test $nerrors -eq 0 ; then
echo "VFD SWMR tests passed."
if test $nsofterrors -ne 0 ; then
- echo
+ echo
echo "${nsofterrors} expected errors occurred. Expected errors are ok."
fi
if test -z "$HDF5_NOCLEANUP"; then