diff options
author | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2021-05-04 23:02:36 (GMT) |
---|---|---|
committer | vchoi <vchoi@jelly.ad.hdfgroup.org> | 2021-05-04 23:04:58 (GMT) |
commit | a4cf8aea727e869ffc91b89d4bfd602336a37434 (patch) | |
tree | 1f39aea6822edbe1f3c8c1a3812cfa768d2f10a5 /test/testvfdswmr.sh.in | |
parent | 8d7593cfcf182f5cfd933f33e9418dff6e9284de (diff) | |
download | hdf5-a4cf8aea727e869ffc91b89d4bfd602336a37434.zip hdf5-a4cf8aea727e869ffc91b89d4bfd602336a37434.tar.gz hdf5-a4cf8aea727e869ffc91b89d4bfd602336a37434.tar.bz2 |
Add new test vfd_swmr_dsetops_writer.c to test writing operations for:
Dataset types:
--dataset with compact layout
--dataset with contiguous layout
--datasets with chunked layout: single/implicit/fixed array/extensible array/btree2 indexes
Types of writes:
--Sequential writes
--Random writes
--Regular hyperslab writes
--Raw data modifications
Diffstat (limited to 'test/testvfdswmr.sh.in')
-rw-r--r-- | test/testvfdswmr.sh.in | 69 |
1 files changed, 62 insertions, 7 deletions
diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index a50d7ab..815c443 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -81,8 +81,14 @@ MESSAGE_TIMEOUT=300 # Message timeout length in secs ############################################################################### ## 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 +ATTRDSET_FIFO_WRITER_TO_READER=fifo_attrdset_writer_to_reader +ATTRDSET_FIFO_READER_TO_WRITER=fifo_attrdset_reader_to_writer + +############################################################################### +## For dsetops test: definitions for fifo files to coordinate test runs +############################################################################### +DSETOPS_FIFO_WRITER_TO_READER=fifo_dsetops_writer_to_reader +DSETOPS_FIFO_READER_TO_WRITER=fifo_dsetops_reader_to_writer ############################################################################### ## short hands and function definitions @@ -155,7 +161,7 @@ if [ $rc -ne 0 ] ; then exit 0 fi -all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo groups attrdset" +all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo groups attrdset dsetops" all_tests="${all_tests} groups_attrs os_groups_attrs few_big many_small" tests=${all_tests} @@ -201,6 +207,7 @@ mkdir vfd_swmr_test cd vfd_swmr_test + # Loop over index types for index_type in "-i ea" "-i b2" do @@ -631,11 +638,11 @@ for options in "-p -g -a 10 -v -m -d 10 -c 3 -u 5" "-k -a 20 -v -m -d 5"; do 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 + if [ -e ./$ATTRDSET_FIFO_WRITER_TO_READER ]; then # If writer fifo file is found + rm -f ./$ATTRDSET_FIFO_WRITER_TO_READER fi - if [ -e ./$FIFO_READER_TO_WRITER ]; then # If reader fifo file is found - rm -f ./$FIFO_READER_TO_WRITER + if [ -e ./$ATTRDSET_FIFO_READER_TO_WRITER ]; then # If reader fifo file is found + rm -f ./$ATTRDSET_FIFO_READER_TO_WRITER fi echo launch vfd_swmr_attrdset_writer attrdset, options $options @@ -671,6 +678,54 @@ for options in "-p -g -a 10 -v -m -d 10 -c 3 -u 5" "-k -a 20 -v -m -d 5"; do rm -f vfd_swmr_attrdset_reader.*.{out,rc} done +# dsetops test +for options in "-p -e 20 -t" "-g -m 5 -n 2 -s 10 -w 7" "-k -m 10 -n 5 -r 5 -l 10"; 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 + 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 + + # 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 + # # 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. |