diff options
author | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2018-03-12 14:02:15 (GMT) |
---|---|---|
committer | Vailin Choi <vchoi@jam.ad.hdfgroup.org> | 2018-03-12 14:02:15 (GMT) |
commit | f08b8fa10e7bac5ae26e3b06f938d38ebb3f28e1 (patch) | |
tree | d62da3d18d831ff7c717d716c627eebd3dbc2f1b /tools/test/misc/testh5clear.sh.in | |
parent | 8ba788ca891f56792bbbbc5a40f9bc2e86a663b5 (diff) | |
download | hdf5-f08b8fa10e7bac5ae26e3b06f938d38ebb3f28e1.zip hdf5-f08b8fa10e7bac5ae26e3b06f938d38ebb3f28e1.tar.gz hdf5-f08b8fa10e7bac5ae26e3b06f938d38ebb3f28e1.tar.bz2 |
Enhancement to the tool h5clear (HDFFV-10360)
Diffstat (limited to 'tools/test/misc/testh5clear.sh.in')
-rw-r--r-- | tools/test/misc/testh5clear.sh.in | 122 |
1 files changed, 106 insertions, 16 deletions
diff --git a/tools/test/misc/testh5clear.sh.in b/tools/test/misc/testh5clear.sh.in index 2966b2c..11c2ff9 100644 --- a/tools/test/misc/testh5clear.sh.in +++ b/tools/test/misc/testh5clear.sh.in @@ -66,6 +66,21 @@ $SRC_H5CLEAR_TESTFILES/h5clear_usage.ddl $SRC_H5CLEAR_TESTFILES/h5clear_open_fail.ddl $SRC_H5CLEAR_TESTFILES/h5clear_missing_file.ddl $SRC_H5CLEAR_TESTFILES/h5clear_no_mdc_image.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_status_noclose_after_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_noclose_before_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_noclose_after_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_equal_before_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_equal_after_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_greater_before_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_greater_after_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_less_before_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_less_after_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_user_equal_before_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_user_equal_after_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_user_greater_before_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_user_greater_after_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_user_less_before_size.ddl +$SRC_H5CLEAR_TESTFILES/h5clear_user_less_after_size.ddl $SRC_H5CLEAR_TESTFILES/h5clear_sec2_v0.h5 $SRC_H5CLEAR_TESTFILES/h5clear_sec2_v2.h5 $SRC_H5CLEAR_TESTFILES/h5clear_sec2_v3.h5 @@ -74,6 +89,14 @@ $SRC_H5CLEAR_TESTFILES/latest_h5clear_log_v3.h5 $SRC_H5CLEAR_TESTFILES/latest_h5clear_sec2_v3.h5 $SRC_H5CLEAR_TESTFILES/h5clear_mdc_image.h5 $SRC_H5CLEAR_TESTFILES/mod_h5clear_mdc_image.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_status_noclose.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_noclose.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_equal.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_greater.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_less.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_user_equal.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_user_greater.h5 +$SRC_H5CLEAR_TESTFILES/h5clear_fsm_persist_user_less.h5 " COPY_TESTFILES_TO_TESTDIR() @@ -152,7 +175,8 @@ TOOLTEST_OUT() { fname=$1 option1=$2 option2=$3 - expected=$4 + option3=$4 + expected=$5 # Prepare expected and actual output expect="$TESTDIR/$expected" actual="$TESTDIR/`basename $expected .ddl`.out" @@ -161,10 +185,10 @@ TOOLTEST_OUT() { actual_err_sav=${actual_err}-sav # Run test. - TESTING $H5CLEAR $option1 $option2 $fname + TESTING $H5CLEAR $option1 $option2 $option3 $option4 $fname ( cd $TESTDIR - $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $fname + $RUNSERIAL $H5CLEAR_BIN $option1 $option2 $option3 $option4 $fname ) >$actual 2>$actual_err cp $actual $actual_sav cp $actual_err $actual_err_sav @@ -245,17 +269,16 @@ $CP -f $TESTDIR/h5clear_sec2_v3.h5 $TESTDIR/orig_h5clear_sec2_v3.h5 # "h5clear -m -s junk.h5" (valid 2 options, nonexisting file) # "h5clear -m orig_h5clear_sec2_v2.h5" (valid 1 option, existing file, no cache image) # "h5clear -s -m orig_h5clear_sec2_v0.h5" (valid 2 options, existing file, no cache image) -TOOLTEST_OUT "" -h "" h5clear_usage.ddl -TOOLTEST_OUT "" "" "" h5clear_usage.ddl -TOOLTEST_OUT junk.h5 "" "" h5clear_usage.ddl -TOOLTEST_OUT orig_h5clear_sec2_v3.h5 "" "" h5clear_usage.ddl -TOOLTEST_OUT "" -m "" h5clear_missing_file.ddl -TOOLTEST_OUT junk.h5 -s "" h5clear_open_fail.ddl -TOOLTEST_OUT "" -m -s h5clear_missing_file.ddl -TOOLTEST_OUT junk.h5 -m -s h5clear_open_fail.ddl -TOOLTEST_OUT orig_h5clear_sec2_v2.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT orig_h5clear_sec2_v0.h5 -s -m h5clear_no_mdc_image.ddl -# +TOOLTEST_OUT "" -h "" "" h5clear_usage.ddl +TOOLTEST_OUT "" "" "" "" h5clear_usage.ddl +TOOLTEST_OUT junk.h5 "" "" "" h5clear_usage.ddl +TOOLTEST_OUT orig_h5clear_sec2_v3.h5 "" "" "" h5clear_usage.ddl +TOOLTEST_OUT "" -m "" "" h5clear_missing_file.ddl +TOOLTEST_OUT junk.h5 -s "" "" h5clear_open_fail.ddl +TOOLTEST_OUT "" -m -s "" h5clear_missing_file.ddl +TOOLTEST_OUT junk.h5 -m -s "" h5clear_open_fail.ddl +TOOLTEST_OUT orig_h5clear_sec2_v2.h5 -m "" "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT orig_h5clear_sec2_v0.h5 -s -m "" h5clear_no_mdc_image.ddl # # # The following are tests to verify the expected exit code from h5clear: @@ -285,8 +308,8 @@ TOOLTEST h5clear_sec2_v0.h5 -l -m $FAIL # # # h5clear_mdc_image.h5 already has cache image removed earlier, verify the expected warning from h5clear: -TOOLTEST_OUT mod_h5clear_mdc_image.h5 -m "" h5clear_no_mdc_image.ddl -TOOLTEST_OUT mod_h5clear_mdc_image.h5 -s -m h5clear_no_mdc_image.ddl +TOOLTEST_OUT mod_h5clear_mdc_image.h5 -m "" "" h5clear_no_mdc_image.ddl +TOOLTEST_OUT mod_h5clear_mdc_image.h5 -s -m "" h5clear_no_mdc_image.ddl # # # @@ -319,6 +342,73 @@ OPEN_CHK h5clear_sec2_v2.h5 $SUCCEED # # # +# (1) h5clear_status_noclose.h5 +# "h5clear --filesize h5clear_status_noclose.h5" (unable to open the file because status_flag is on) +# "h5clear -s --increment=0 h5clear_status_noclose.h5" (clear status_flag, EOA = MAX(EOA, EOF) + 0) +# (no output, check exit code) +# "h5clear --filesize h5clear_status_noclose_user.h5" (print EOA/EOF after the last action) +TOOLTEST_OUT h5clear_status_noclose.h5 --filesize "" "" h5clear_open_fail.ddl +TOOLTEST h5clear_status_noclose.h5 -s --increment=0 $SUCCEED +TOOLTEST_OUT h5clear_status_noclose.h5 --filesize "" "" h5clear_status_noclose_after_size.ddl +# +# (2) h5clear_fsm_persist_noclose.h5 +# "h5clear --filesize h5clear_fsm_persist_noclose.h5" (print EOA/EOF before the next action) +# "h5clear --increment=0 h5clear_fsm_persist_noclose.h5" (EOA = MAX(EOA, EOF)) (no output, check exit code) +# "h5clear --filesize h5clear_fsm_persist_noclose.h5" (print EOA/EOF after the last action) +TOOLTEST_OUT h5clear_fsm_persist_noclose.h5 --filesize "" "" h5clear_noclose_before_size.ddl +TOOLTEST h5clear_fsm_persist_noclose.h5 --increment=0 "" $SUCCEED +TOOLTEST_OUT h5clear_fsm_persist_noclose.h5 --filesize "" "" h5clear_noclose_after_size.ddl +# +# (3) h5clear_fsm_persist_equal.h5 +# "h5clear --filesize h5clear_fsm_persist_equal.h5" (print EOA/EOF before the next action) +# "h5clear --increment h5clear_fsm_persist_equal.h5" (EOA = MAX(EOA, EOF) + 1M) (no output, check exit code) +# "h5clear --filesize h5clear_fsm_persist_equal.h5" (print EOA/EOF after the last action) +TOOLTEST_OUT h5clear_fsm_persist_equal.h5 --filesize "" "" h5clear_equal_before_size.ddl +TOOLTEST h5clear_fsm_persist_equal.h5 --increment "" $SUCCEED +TOOLTEST_OUT h5clear_fsm_persist_equal.h5 --filesize "" "" h5clear_equal_after_size.ddl +# +# (4) h5clear_fsm_persist_greater.h5 +# "h5clear --filesize h5clear_fsm_persist_greater.h5" (print EOA/EOF before the next action) +# "h5clear --increment=0 h5clear_fsm_persist_greater.h5" (EOA = MAX(EOA, EOF) + 0) (no output, check exit code) +# "h5clear --filesize h5clear_fsm_persist_greater.h5" (print EOA/EOF after the last action) +TOOLTEST_OUT h5clear_fsm_persist_greater.h5 --filesize "" "" h5clear_greater_before_size.ddl +TOOLTEST h5clear_fsm_persist_greater.h5 --increment=0 "" $SUCCEED +TOOLTEST_OUT h5clear_fsm_persist_greater.h5 --filesize "" "" h5clear_greater_after_size.ddl +# +# (5) h5clear_fsm_persist_less.h5 +# "h5clear --filesize h5clear_fsm_persist_less.h5" (print EOA/EOF before the next action) +# "h5clear --increment=200 h5clear_fsm_persist_less.h5" (EOA = MAX(EOA, EOF) + 200) (no output, check exit code) +# "h5clear --filesize h5clear_fsm_persist_less.h5" (print EOA/EOF after the last action) +TOOLTEST_OUT h5clear_fsm_persist_less.h5 --filesize "" "" h5clear_less_before_size.ddl +TOOLTEST h5clear_fsm_persist_less.h5 --increment=200 "" $SUCCEED +TOOLTEST_OUT h5clear_fsm_persist_less.h5 --filesize "" "" h5clear_less_after_size.ddl +# +# (6) h5clear_fsm_persist_user_equal.h5 +# "h5clear --filesize h5clear_fsm_persist_user_equal.h5" (print EOA/EOF before the next action) +# "h5clear --increment h5clear_fsm_persist_user_equal.h5" (EOA = MAX(EOA, EOF) + 1M) (no output, check exit code) +# "h5clear --filesize h5clear_fsm_persist_user_equal.h5" (print EOA/EOF after the last action) +TOOLTEST_OUT h5clear_fsm_persist_user_equal.h5 --filesize "" "" h5clear_user_equal_before_size.ddl +TOOLTEST h5clear_fsm_persist_user_equal.h5 --increment "" $SUCCEED +TOOLTEST_OUT h5clear_fsm_persist_user_equal.h5 --filesize "" "" h5clear_user_equal_after_size.ddl +# +# (7) h5clear_fsm_persist_user_greater.h5 +# "h5clear --filesize h5clear_fsm_persist_user_greater.h5" (print EOA/EOF before the next action) +# "h5clear --increment=0 h5clear_fsm_persist_user_greater.h5" (EOA = MAX(EOA, EOF) + 0) (no output, check exit code) +# "h5clear --filesize h5clear_fsm_persist_user_greater.h5" (print EOA/EOF after the last action) +TOOLTEST_OUT h5clear_fsm_persist_user_greater.h5 --filesize "" "" h5clear_user_greater_before_size.ddl +TOOLTEST h5clear_fsm_persist_user_greater.h5 --increment=0 "" $SUCCEED +TOOLTEST_OUT h5clear_fsm_persist_user_greater.h5 --filesize "" "" h5clear_user_greater_after_size.ddl +# +# (8) h5clear_fsm_persist_user_less.h5 +# "h5clear --filesize h5clear_fsm_persist_user_less.h5" (print EOA/EOF before the next action) +# "h5clear --increment=200 h5clear_fsm_persist_user_less.h5" (EOA = MAX(EOA, EOF) + 200) (no output, check exit code) +# "h5clear --filesize h5clear_fsm_persist_user_less.h5" (print EOA/EOF after the last action) +TOOLTEST_OUT h5clear_fsm_persist_user_less.h5 --filesize "" "" h5clear_user_less_before_size.ddl +TOOLTEST h5clear_fsm_persist_user_less.h5 --increment=200 "" $SUCCEED +TOOLTEST_OUT h5clear_fsm_persist_user_less.h5 --filesize "" "" h5clear_user_less_after_size.ddl +# +# +# # Clean up test files if test -z "$HDF5_NOCLEANUP"; then rm -f h5clear_*.h5 latest_h5clear*.h5 |