diff options
-rw-r--r-- | test/testvfdswmr.sh.in | 98 | ||||
-rw-r--r-- | test/vfd_swmr_attrdset_writer.c | 4 |
2 files changed, 51 insertions, 51 deletions
diff --git a/test/testvfdswmr.sh.in b/test/testvfdswmr.sh.in index 9c0f272..a50d7ab 100644 --- a/test/testvfdswmr.sh.in +++ b/test/testvfdswmr.sh.in @@ -155,8 +155,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" +all_tests="generator expand shrink expand_shrink sparse vlstr_null vlstr_oob zoo groups attrdset" all_tests="${all_tests} groups_attrs os_groups_attrs few_big many_small" tests=${all_tests} @@ -623,53 +622,54 @@ if [ ${do_zoo:-no} = yes ]; then 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 -# # 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 -# fi -# 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 -# -# # 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} -#done +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 + + # 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 + fi + 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 + + # 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} +done # # Make sure that we can create GROUP_n groups (20, 40, or 400 depending on the HDF5TestExpress level) diff --git a/test/vfd_swmr_attrdset_writer.c b/test/vfd_swmr_attrdset_writer.c index 0871898..7800727 100644 --- a/test/vfd_swmr_attrdset_writer.c +++ b/test/vfd_swmr_attrdset_writer.c @@ -1106,7 +1106,7 @@ modify_attr(const state_t *s, hid_t did, unsigned int which) TEST_ERROR; } - HDsprintf(val, "%u %u %u %u %u", which, which+1, which+2, which+3, which+4); + HDsprintf(val, "%u %c", which, 'M'); tid = vl_tid; } else { @@ -1331,7 +1331,7 @@ verify_add_or_modify_attr(unsigned action, hid_t did, char *attr_name, unsigned if(action == ADD_ATTR) HDsprintf(vl_which, "%u", which); else - HDsprintf(vl_which, "%u %u %u %u %u", which, which+1, which+2, which+3, which+4); + HDsprintf(vl_which, "%u %c", which, 'M'); if((read_vl_which = HDmalloc(sizeof("9999999999"))) == NULL) { printf("HDmalloc failed\n"); |