diff options
author | Muqun Yang <myang6@hdfgroup.org> | 2021-05-06 17:54:31 (GMT) |
---|---|---|
committer | Muqun Yang <myang6@hdfgroup.org> | 2021-05-06 17:54:31 (GMT) |
commit | 86a3e7c3399d9641d9137d3500f926eda7c93274 (patch) | |
tree | 934947c3f706befa13d03be437656a9efa11463e /test/testvfdswmr.sh.in | |
parent | ec5ce26bb3eb3991c2720d679744abf27b6e31a6 (diff) | |
parent | eb54ae3abe2f608d37216fcffd664fbfca0bfecc (diff) | |
download | hdf5-86a3e7c3399d9641d9137d3500f926eda7c93274.zip hdf5-86a3e7c3399d9641d9137d3500f926eda7c93274.tar.gz hdf5-86a3e7c3399d9641d9137d3500f926eda7c93274.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.in | 75 |
1 files changed, 38 insertions, 37 deletions
diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index 19d5ae0..146523c 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -1,4 +1,4 @@ -#! /bin/bash +#!/usr/bin/env bash # # Copyright by The HDF Group. # Copyright by the Board of Trustees of the University of Illinois. @@ -46,7 +46,7 @@ nsofterrors=0 # soft errors are expected to occur some of the time ## 1: Default run. ## 2+: Quick run ############################################################################### -if [ -z $HDF5TestExpress ]; then # Set to default when not set +if [[ -z $HDF5TestExpress ]]; then # Set to default when not set HDF5TestExpress=1 fi ## @@ -625,12 +625,13 @@ 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 + # + # 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 @@ -638,38 +639,38 @@ for options in "-p -g -a 10 -v -m -d 10 -c 3 -u 5" "-k -a 20 -v -m -d 5"; do 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 + 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 + # 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} + # Clean up output files + rm -f vfd_swmr_attrdset_writer.{out,rc} + rm -f vfd_swmr_attrdset_reader.*.{out,rc} done # |