From 162f01292c70304e799fe0feeb633714d7fe305c Mon Sep 17 00:00:00 2001 From: Allen Byrne <50328838+byrnHDF@users.noreply.github.com> Date: Thu, 20 Jun 2024 16:01:43 -0500 Subject: [PATCH] Rework the TestExpress usage and refactor dead code (#4590) --- .github/workflows/abi-report.yml | 2 +- .github/workflows/cmake-bintest.yml | 12 ++-- .github/workflows/testxpr-cmake.yml | 2 + c++/test/dsets.cpp | 1 - c++/test/tlinks.cpp | 3 +- config/cmake/LIBAEC/CMakeLists.txt | 8 +-- config/cmake/LIBAEC/CPack.Info.plist.in | 2 +- config/cmake/ZLIB/CMakeLists.txt | 2 +- java/src/hdf/overview.html | 2 +- test/accum.c | 2 +- test/accum_swmr_reader.c | 2 +- test/app_ref.c | 6 +- test/big.c | 9 ++- test/btree2.c | 16 +++--- test/cache_logging.c | 5 +- test/chunk_info.c | 2 +- test/cmpd_dset.c | 2 +- test/cross_read.c | 2 +- test/del_many_dense_attrs.c | 2 +- test/dsets.c | 2 +- test/dt_arith.c | 34 ++++++------ test/dtypes.c | 38 ++++++------- test/earray.c | 22 ++++---- test/efc.c | 3 +- test/enum.c | 2 +- test/err_compat.c | 3 +- test/error_test.c | 3 +- test/event_set.c | 2 +- test/evict_on_close.c | 2 +- test/extend.c | 2 +- test/external.c | 2 +- test/external_env.c | 2 +- test/farray.c | 22 ++++---- test/fheap.c | 18 +++--- test/file_image.c | 22 +++++--- test/filenotclosed.c | 2 +- test/fillval.c | 2 +- test/filter_fail.c | 2 +- test/filter_plugin.c | 12 ++-- test/flush1.c | 2 +- test/flush2.c | 2 +- test/freespace.c | 2 +- test/getname.c | 2 +- test/gheap.c | 2 +- test/h5test.c | 73 ++----------------------- test/h5test.h | 33 ++++++++--- test/hdfs.c | 2 +- test/istore.c | 2 +- test/lheap.c | 2 +- test/links.c | 2 +- test/links_env.c | 2 +- test/mdset.c | 2 +- test/mf.c | 2 +- test/mirror_vfd.c | 2 +- test/mount.c | 2 +- test/mtime.c | 2 +- test/ntypes.c | 2 +- test/objcopy.c | 10 ++-- test/objcopy_ref.c | 6 +- test/ohdr.c | 2 +- test/onion.c | 2 +- test/page_buffer.c | 5 +- test/ros3.c | 2 +- test/s3comms.c | 2 +- test/select_io_dset.c | 2 +- test/set_extent.c | 2 +- test/stab.c | 2 +- test/swmr.c | 2 +- test/testframe.c | 2 +- test/tfile.c | 12 ++-- test/timer.c | 2 +- test/tsohm.c | 4 +- test/unlink.c | 2 +- test/unregister.c | 2 +- test/vds.c | 8 ++- test/vds_env.c | 2 +- test/vfd.c | 2 +- test/vfd_plugin.c | 2 +- test/vol.c | 2 +- test/vol_plugin.c | 2 +- testpar/t_filters_parallel.c | 3 +- testpar/t_mpi.c | 3 +- testpar/t_pflush2.c | 6 +- testpar/t_pmulti_dset.c | 2 +- testpar/t_select_io_dset.c | 2 +- testpar/t_shapesame.c | 3 +- testpar/t_subfiling_vfd.c | 2 +- testpar/testphdf5.c | 3 +- tools/test/h5repack/h5repacktst.c | 3 +- tools/test/perform/perf_meta.c | 3 +- 90 files changed, 248 insertions(+), 278 deletions(-) diff --git a/.github/workflows/abi-report.yml b/.github/workflows/abi-report.yml index 055f373031d..b2a20fb6891 100644 --- a/.github/workflows/abi-report.yml +++ b/.github/workflows/abi-report.yml @@ -82,7 +82,7 @@ jobs: mkdir "${{ github.workspace }}/hdf5R" cd "${{ github.workspace }}/hdf5R" wget -q https://github.com/HDFGroup/hdf5/releases/download/hdf5-${{ inputs.file_ref }}/hdf5-${{ inputs.file_ref }}-ubuntu-2204.tar.gz - tar zxf hdf5-${{ inputs.file_ref }}-ubuntu-2204.tar.gz + tar zxf hdf5-${{ inputs.file_ref }}-ubuntu-2204_gcc.tar.gz - name: List files for the space (Linux) run: | diff --git a/.github/workflows/cmake-bintest.yml b/.github/workflows/cmake-bintest.yml index f777ddca07a..61604b366df 100644 --- a/.github/workflows/cmake-bintest.yml +++ b/.github/workflows/cmake-bintest.yml @@ -189,12 +189,12 @@ jobs: ls ${{ runner.workspace }} # symlinks the compiler executables to a common location - # - name: Setup GNU Fortran - # uses: fortran-lang/setup-fortran@v1 - # id: setup-fortran - # with: - # compiler: gcc - # version: 12 + - name: Setup GNU Fortran + uses: fortran-lang/setup-fortran@v1 + id: setup-fortran + with: + compiler: gcc + version: 12 - name: Run ctest (MacOS) id: run-ctest diff --git a/.github/workflows/testxpr-cmake.yml b/.github/workflows/testxpr-cmake.yml index 172c2f7e6be..809832f3e3a 100644 --- a/.github/workflows/testxpr-cmake.yml +++ b/.github/workflows/testxpr-cmake.yml @@ -61,6 +61,8 @@ jobs: working-directory: ${{ runner.workspace }}/build - name: CMake Run Tests + env: + HDF5TestExpress: 0 run: ctest . --parallel 2 -C ${{ matrix.build_mode }} -V -R H5TESTXPR working-directory: ${{ runner.workspace }}/build diff --git a/c++/test/dsets.cpp b/c++/test/dsets.cpp index 9de6db1319f..65dabbe11c2 100644 --- a/c++/test/dsets.cpp +++ b/c++/test/dsets.cpp @@ -17,7 +17,6 @@ EXTERNAL ROUTINES/VARIABLES: These routines are in the test directory of the C library: - h5_reset() -- in h5test.c, resets the library by closing it h5_fileaccess() -- in h5test.c, returns a file access template ***************************************************************************/ diff --git a/c++/test/tlinks.cpp b/c++/test/tlinks.cpp index 7017217009a..3ce8c6823d3 100644 --- a/c++/test/tlinks.cpp +++ b/c++/test/tlinks.cpp @@ -752,7 +752,8 @@ test_links() /* Close 2nd FAPL */ H5Pclose(fapl2_id); - h5_clean_files(FILENAME, fapl_id); + h5_delete_all_test_files(FILENAME, fapl_id); + H5Pclose(fapl_id); } catch (Exception &E) { issue_fail_msg("test_links()", __LINE__, __FILE__, E.getCDetailMsg()); diff --git a/config/cmake/LIBAEC/CMakeLists.txt b/config/cmake/LIBAEC/CMakeLists.txt index bdf43f8baf7..29f1fc7f460 100644 --- a/config/cmake/LIBAEC/CMakeLists.txt +++ b/config/cmake/LIBAEC/CMakeLists.txt @@ -125,9 +125,9 @@ set (CMAKE_POSITION_INDEPENDENT_CODE ON) set (EXE_EXT "") if (WIN32) set (EXE_EXT ".exe") - add_definitions (-D_BIND_TO_CURRENT_VCLIBS_VERSION=1) - add_definitions (-D_CRT_SECURE_NO_WARNINGS) - add_definitions (-D_CONSOLE) + add_compile_definitions (_BIND_TO_CURRENT_VCLIBS_VERSION=1) + add_compile_definitions (_CRT_SECURE_NO_WARNINGS) + add_compile_definitions (_CONSOLE) endif () if (MSVC) @@ -161,7 +161,7 @@ configure_file( #----------------------------------------------------------------------------- # All libs/tests/examples need the main include directories #----------------------------------------------------------------------------- -set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES +set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${LIBAEC_BINARY_DIR};${LIBAEC_SOURCE_DIR}/src;${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" ) diff --git a/config/cmake/LIBAEC/CPack.Info.plist.in b/config/cmake/LIBAEC/CPack.Info.plist.in index 08d371bd5d9..b936470fc29 100644 --- a/config/cmake/LIBAEC/CPack.Info.plist.in +++ b/config/cmake/LIBAEC/CPack.Info.plist.in @@ -17,7 +17,7 @@ CFBundleSignature ???? CFBundleVersion - @CPACK_PACKAGE_VERSIO@ + @CPACK_PACKAGE_VERSION@ CFBundleShortVersionString @CPACK_SHORT_VERSION_STRING@ CSResourcesFileMapped diff --git a/config/cmake/ZLIB/CMakeLists.txt b/config/cmake/ZLIB/CMakeLists.txt index d31503b0ac6..78d678074b0 100644 --- a/config/cmake/ZLIB/CMakeLists.txt +++ b/config/cmake/ZLIB/CMakeLists.txt @@ -42,7 +42,7 @@ HDF_DIR_PATHS(ZLIB) #----------------------------------------------------------------------------- # All libs/tests/examples need the main include directories #----------------------------------------------------------------------------- -set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES +set_directory_properties(PROPERTIES INCLUDE_DIRECTORIES "${ZLIB_BINARY_DIR};${ZLIB_SOURCE_DIR};${CMAKE_RUNTIME_OUTPUT_DIRECTORY}" ) diff --git a/java/src/hdf/overview.html b/java/src/hdf/overview.html index 74907555534..84e945b2f87 100644 --- a/java/src/hdf/overview.html +++ b/java/src/hdf/overview.html @@ -91,6 +91,6 @@

and the HDF5 library.

To Obtain

-The JHI5 is included with the HDF5 library. +The JHI5 is included with the HDF5 library. diff --git a/test/accum.c b/test/accum.c index d5b308dad06..62d1c9fd88a 100644 --- a/test/accum.c +++ b/test/accum.c @@ -91,7 +91,7 @@ main(void) puts("Testing the metadata accumulator"); /* File access property list */ - h5_reset(); + h5_test_init(); if ((fapl = h5_fileaccess()) < 0) FAIL_STACK_ERROR; h5_fixname(FILENAME[0], fapl, filename, sizeof filename); diff --git a/test/accum_swmr_reader.c b/test/accum_swmr_reader.c index a5b16eba860..05966a9f2b0 100644 --- a/test/accum_swmr_reader.c +++ b/test/accum_swmr_reader.c @@ -51,7 +51,7 @@ main(void) bool api_ctx_pushed = false; /* Whether API context pushed */ /* Testing setup */ - h5_reset(); + h5_test_init(); /* Skip this test if SWMR I/O is not supported for the VFD specified * by the environment variable. diff --git a/test/app_ref.c b/test/app_ref.c index a62dc19fea2..68e00d8ac3a 100644 --- a/test/app_ref.c +++ b/test/app_ref.c @@ -86,7 +86,7 @@ main(void) int i; char filename[1024]; - h5_reset(); + h5_test_init(); h5_fixname(FILENAME[0], H5P_DEFAULT, filename, sizeof filename); srand((unsigned)time(NULL)); @@ -179,11 +179,11 @@ main(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); /* Clean up any file(s) created */ - h5_reset(); + h5_test_init(); fapl = H5Pcreate(H5P_FILE_ACCESS); h5_cleanup(FILENAME, fapl); diff --git a/test/big.c b/test/big.c index 508cd82469f..8651927b18c 100644 --- a/test/big.c +++ b/test/big.c @@ -591,7 +591,8 @@ test_sec2(hid_t fapl) quit: /* End with normal return code */ /* Clean up the test file */ - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); HDremove(DNAME); return 0; @@ -628,7 +629,8 @@ test_stdio(hid_t fapl) quit: /* End with normal return code */ /* Clean up the test file */ - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); HDremove(DNAME); fflush(stdout); return 0; @@ -683,7 +685,8 @@ test_family(hid_t fapl) quit: /* End with normal return code */ /* Clean up the test file */ - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); HDremove(DNAME); return 0; diff --git a/test/btree2.c b/test/btree2.c index 1bf25e9400f..47ecda444d5 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -9915,22 +9915,20 @@ main(void) hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */ unsigned nerrors = 0; /* Cumulative error count */ unsigned reopen; /* Whether to reopen B-tree during tests */ - int ExpressMode; const char *driver_name; bool api_ctx_pushed = false; /* Whether API context pushed */ driver_name = h5_get_test_driver_name(); /* Reset library */ - h5_reset(); - fapl = h5_fileaccess(); - ExpressMode = GetTestExpress(); + h5_test_init(); + fapl = h5_fileaccess(); /* For the Direct I/O driver, skip intensive tests due to poor performance */ if (!strcmp(driver_name, "direct")) - ExpressMode = 2; + SetTestExpress(2); - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. Some tests may be skipped\n"); /* Initialize v2 B-tree creation parameters */ @@ -9967,7 +9965,7 @@ main(void) nerrors += test_insert_level2_2internal_split(fapl, &cparam, &tparam); nerrors += test_insert_level2_3internal_redistrib(fapl, &cparam, &tparam); nerrors += test_insert_level2_3internal_split(fapl, &cparam, &tparam); - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. test_insert_lots skipped\n"); else nerrors += test_insert_lots(fapl, &cparam, &tparam); @@ -9981,7 +9979,7 @@ main(void) nerrors += test_update_level1_3leaf_redistrib(fapl, &cparam2, &tparam); nerrors += test_update_level1_middle_split(fapl, &cparam2, &tparam); nerrors += test_update_make_level2(fapl, &cparam2, &tparam); - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. test_update_lots skipped\n"); else nerrors += test_update_lots(fapl, &cparam2, &tparam); @@ -10008,7 +10006,7 @@ main(void) nerrors += test_remove_level2_2internal_merge_right(fapl, &cparam, &tparam); nerrors += test_remove_level2_3internal_merge(fapl, &cparam, &tparam); nerrors += test_remove_level2_collapse_right(fapl, &cparam, &tparam); - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. test_remove_lots skipped\n"); else nerrors += test_remove_lots(driver_name, fapl, &cparam); diff --git a/test/cache_logging.c b/test/cache_logging.c index 5372021f335..bcc37cc72a8 100644 --- a/test/cache_logging.c +++ b/test/cache_logging.c @@ -132,7 +132,8 @@ test_logging_api(void) TEST_ERROR; HDremove(LOG_LOCATION); - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); PASSED(); return 0; @@ -163,7 +164,7 @@ main(void) int nerrors = 0; /* Reset library */ - h5_reset(); + h5_test_init(); printf("Testing basic metadata cache logging functionality.\n"); diff --git a/test/chunk_info.c b/test/chunk_info.c index a5dde34c5a7..4591b7242b4 100644 --- a/test/chunk_info.c +++ b/test/chunk_info.c @@ -2445,7 +2445,7 @@ main(void) hid_t fapl = H5I_INVALID_HID; /* File access property list */ int nerrors = 0; /* Number of errors so far */ - h5_reset(); + h5_test_init(); /* Create a copy of file access property list */ if ((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index c3998a39adf..06ae2ff0799 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -3334,7 +3334,7 @@ main(int argc, char *argv[]) char fname[256]; unsigned nerrors = 0; - h5_reset(); + h5_test_init(); /* Turn off optimized compound converter? */ if (argc > 1) { diff --git a/test/cross_read.c b/test/cross_read.c index ce1f90b9e10..3fbe9df89e9 100644 --- a/test/cross_read.c +++ b/test/cross_read.c @@ -342,7 +342,7 @@ main(void) char filename[1024]; int nerrors = 0; - h5_reset(); + h5_test_init(); /* * Skip tests for VFDs that aren't compatible with default VFD. diff --git a/test/del_many_dense_attrs.c b/test/del_many_dense_attrs.c index 0037c3c4270..b6cb4375af8 100644 --- a/test/del_many_dense_attrs.c +++ b/test/del_many_dense_attrs.c @@ -66,7 +66,7 @@ main(void) int i; /* Local index variable */ /* Testing setup */ - h5_reset(); + h5_test_init(); /* To exit from the file for SIGABRT signal */ if (signal(SIGABRT, catch_signal) == SIG_ERR) diff --git a/test/dsets.c b/test/dsets.c index 1c418ea6713..ad5dd28f2b1 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -15953,7 +15953,7 @@ main(void) check_dbl[i] = check_dbl_data + (i * DSET_DIM2); /* Testing setup */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0) diff --git a/test/dt_arith.c b/test/dt_arith.c index 9ef47fc7b63..af4a2fc7f6e 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -425,7 +425,7 @@ fpe_handler(int H5_ATTR_UNUSED signo) static void reset_hdf5(void) { - h5_reset(); + h5_test_init(); if (without_hardware_g) h5_no_hwconv(); @@ -548,7 +548,7 @@ test_hard_query(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -556,7 +556,7 @@ test_hard_query(void) return 0; error: - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -867,7 +867,7 @@ test_particular_fp_integer(void) #endif #endif - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -1289,7 +1289,7 @@ test_derived_flt(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -1313,7 +1313,7 @@ test_derived_flt(void) } H5E_END_TRY - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -1599,7 +1599,7 @@ test_derived_integer(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -1621,7 +1621,7 @@ test_derived_integer(void) } H5E_END_TRY - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -2670,7 +2670,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) free(aligned); fflush(stdout); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -2686,7 +2686,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) free(aligned); fflush(stdout); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -3812,7 +3812,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) assert(0 && "Should not reach this point!"); return 1; #else - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -3841,7 +3841,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) assert(0 && "Should not reach this point!"); return 1; #else - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5230,7 +5230,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) if (aligned) free(aligned); fflush(stdout); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -5251,7 +5251,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) free(aligned); fflush(stdout); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); /*print statistics*/ @@ -6022,7 +6022,7 @@ main(void) */ without_hardware_g = true; - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -6040,12 +6040,12 @@ main(void) /* Test software integer-float conversion functions */ nerrors += (unsigned long)run_int_fp_conv("soft"); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); if (nerrors) { diff --git a/test/dtypes.c b/test/dtypes.c index ce8ee747b57..a457767a477 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -152,7 +152,7 @@ static int opaque_funcs(void); static void reset_hdf5(void) { - h5_reset(); + h5_test_init(); #ifdef TEST_ALIGNMENT SET_ALIGNMENT(SCHAR, H5_SIZEOF_CHAR); SET_ALIGNMENT(UCHAR, H5_SIZEOF_CHAR); @@ -862,7 +862,7 @@ test_compound_2(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -874,7 +874,7 @@ test_compound_2(void) free(bkg); free(orig); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -984,7 +984,7 @@ test_compound_3(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -995,7 +995,7 @@ test_compound_3(void) free(bkg); free(orig); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -1112,7 +1112,7 @@ test_compound_4(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -1123,7 +1123,7 @@ test_compound_4(void) free(bkg); free(orig); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -1322,14 +1322,14 @@ test_compound_6(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); return 0; error: - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -1464,14 +1464,14 @@ test_compound_7(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); return 0; error: - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5307,7 +5307,7 @@ test_conv_str_1(void) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5324,7 +5324,7 @@ test_conv_str_1(void) if (buf) free(buf); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5392,7 +5392,7 @@ test_conv_str_2(void) if (buf) free(buf); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5528,7 +5528,7 @@ test_conv_str_3(void) if (tag) H5free_memory(tag); /* Technically allocated by API call */ - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5605,7 +5605,7 @@ test_conv_enum_1(void) if (buf) free(buf); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5763,7 +5763,7 @@ test_conv_bitfield(void) H5Tclose(dt); PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5773,7 +5773,7 @@ test_conv_bitfield(void) H5Tclose(st); H5Tclose(dt); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); @@ -5918,7 +5918,7 @@ test_bitfield_funcs(void) if (retval == 0) PASSED(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); reset_hdf5(); diff --git a/test/earray.c b/test/earray.c index 1402e33d4e1..419d921bd8c 100644 --- a/test/earray.c +++ b/test/earray.c @@ -2291,20 +2291,18 @@ test_skip_elmts(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t *tparam, int main(void) { - H5EA_create_t cparam; /* Creation parameters for extensible array */ - earray_test_param_t tparam; /* Testing parameters */ - earray_test_type_t curr_test; /* Current test being worked on */ - earray_iter_type_t curr_iter; /* Current iteration type being worked on */ - hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */ - unsigned nerrors = 0; /* Cumulative error count */ - int ExpressMode; /* Test express value */ - bool api_ctx_pushed = false; /* Whether API context pushed */ + H5EA_create_t cparam; /* Creation parameters for extensible array */ + earray_test_param_t tparam; /* Testing parameters */ + earray_test_type_t curr_test; /* Current test being worked on */ + earray_iter_type_t curr_iter; /* Current iteration type being worked on */ + hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */ + unsigned nerrors = 0; /* Cumulative error count */ + bool api_ctx_pushed = false; /* Whether API context pushed */ /* Reset library */ - h5_reset(); - fapl = h5_fileaccess(); - ExpressMode = GetTestExpress(); - if (ExpressMode > 1) + h5_test_init(); + fapl = h5_fileaccess(); + if (TestExpress > 1) printf("***Express test mode on. Some tests may be skipped\n"); /* Set the filename to use for this test (dependent on fapl) */ diff --git a/test/efc.c b/test/efc.c index b5399823c89..3da334fae98 100644 --- a/test/efc.c +++ b/test/efc.c @@ -2697,7 +2697,8 @@ main(void) puts("All external file cache tests passed."); - h5_clean_files(FILENAME, fapl_id); + h5_delete_all_test_files(FILENAME, fapl_id); + H5Pclose(fapl_id); for (i = 0; i < N_FILENAMES; i++) { free(filename[i]); diff --git a/test/enum.c b/test/enum.c index b64355cadba..2c8e8cd28d7 100644 --- a/test/enum.c +++ b/test/enum.c @@ -782,7 +782,7 @@ main(void) char name[1024]; int nerrors = 0; - h5_reset(); + h5_test_init(); fapl_id = h5_fileaccess(); /* Create the file */ diff --git a/test/err_compat.c b/test/err_compat.c index f2bd2ab61c4..c7abb42e9bb 100644 --- a/test/err_compat.c +++ b/test/err_compat.c @@ -489,7 +489,8 @@ main(void) if (H5Fclose(fid) < 0) TEST_ERROR; - h5_clean_files(FILENAME, fapl_id); + h5_delete_all_test_files(FILENAME, fapl_id); + H5Pclose(fapl_id); free(ipoints2); free(ipoints2_data); diff --git a/test/error_test.c b/test/error_test.c index 84db80e3f93..fe27300f431 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -1049,7 +1049,8 @@ main(void) if (test_filter_error(filename, fapl) < 0) TEST_ERROR; - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); free(ipoints2); free(ipoints2_data); diff --git a/test/event_set.c b/test/event_set.c index 9e659aada15..0880157f430 100644 --- a/test/event_set.c +++ b/test/event_set.c @@ -655,7 +655,7 @@ main(void) int nerrors = 0; /* Error count */ /* Setup */ - h5_reset(); + h5_test_init(); fapl_id = h5_fileaccess(); /* Register dummy connector IDs */ diff --git a/test/evict_on_close.c b/test/evict_on_close.c index db2a96282ef..975b6258311 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -884,7 +884,7 @@ main(void) printf("Testing evict-on-close cache behavior\n"); /* Initialize */ - h5_reset(); + h5_test_init(); /* Test H5P call to set up EoC (does not require VFD-specific fapl) */ nerrors += check_evict_on_close_api() < 0 ? 1 : 0; diff --git a/test/extend.c b/test/extend.c index 554cf2ac918..26bc3d2faa6 100644 --- a/test/extend.c +++ b/test/extend.c @@ -255,7 +255,7 @@ main(void) char filename[1024]; int i, j; - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); /* Initialize buffer and space */ diff --git a/test/external.c b/test/external.c index 13c5dfd0705..a92538b2efb 100644 --- a/test/external.c +++ b/test/external.c @@ -1367,7 +1367,7 @@ main(void) unsigned latest_format; /* default or latest file format */ int nerrors = 0; /* number of errors */ - h5_reset(); + h5_test_init(); /* Get a fapl for the old (default) file format */ fapl_id_old = h5_fileaccess(); diff --git a/test/external_env.c b/test/external_env.c index 1f8ff20797c..61844c40a0a 100644 --- a/test/external_env.c +++ b/test/external_env.c @@ -144,7 +144,7 @@ main(void) unsigned latest_format; /* default or latest file format */ int nerrors = 0; /* number of errors */ - h5_reset(); + h5_test_init(); /* Get a fapl for the old (default) file format */ fapl_id_old = h5_fileaccess(); diff --git a/test/farray.c b/test/farray.c index 12166228d1d..2b14570ca48 100644 --- a/test/farray.c +++ b/test/farray.c @@ -1622,20 +1622,18 @@ test_skip_elmts(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t *tparam, int main(void) { - H5FA_create_t cparam; /* Creation parameters for fixed array */ - farray_test_param_t tparam; /* Testing parameters */ - farray_test_type_t curr_test; /* Current test being worked on */ - farray_iter_type_t curr_iter; /* Current iteration type being worked on */ - hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */ - unsigned nerrors = 0; /* Cumulative error count */ - int ExpressMode; /* Test express value */ - bool api_ctx_pushed = false; /* Whether API context pushed */ + H5FA_create_t cparam; /* Creation parameters for fixed array */ + farray_test_param_t tparam; /* Testing parameters */ + farray_test_type_t curr_test; /* Current test being worked on */ + farray_iter_type_t curr_iter; /* Current iteration type being worked on */ + hid_t fapl = H5I_INVALID_HID; /* File access property list for data files */ + unsigned nerrors = 0; /* Cumulative error count */ + bool api_ctx_pushed = false; /* Whether API context pushed */ /* Reset library */ - h5_reset(); - fapl = h5_fileaccess(); - ExpressMode = GetTestExpress(); - if (ExpressMode > 1) + h5_test_init(); + fapl = h5_fileaccess(); + if (TestExpress > 1) printf("***Express test mode on. Some tests may be skipped\n"); /* Set the filename to use for this test (dependent on fapl) */ diff --git a/test/fheap.c b/test/fheap.c index bdd913edd65..049f2833693 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -15957,7 +15957,6 @@ main(void) unsigned u, v; /* Local index variable */ unsigned nerrors = 0; /* Cumulative error count */ unsigned num_pb_fs = 1; /* The number of settings to test for page buffering and file space handling */ - int ExpressMode; /* Express testing level */ const char *driver_name; /* Environment variable */ bool contig_addr_vfd; /* Whether VFD used has a contiguous address space */ bool api_ctx_pushed = false; /* Whether API context pushed */ @@ -15969,10 +15968,9 @@ main(void) contig_addr_vfd = (bool)(strcmp(driver_name, "split") != 0 && strcmp(driver_name, "multi") != 0); /* Reset library */ - h5_reset(); + h5_test_init(); - def_fapl = h5_fileaccess(); - ExpressMode = GetTestExpress(); + def_fapl = h5_fileaccess(); /* * Caution when turning on ExpressMode 0: @@ -15984,9 +15982,9 @@ main(void) * Activate full testing when this feature is re-enabled * in the future for parallel build. */ - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. Some tests may be skipped\n"); - else if (ExpressMode == 0) { + else if (TestExpress == 0) { #ifdef H5_HAVE_PARALLEL num_pb_fs = NUM_PB_FS - 2; #else @@ -16202,7 +16200,7 @@ main(void) /* If this test fails, uncomment the tests above, which build up to this * level of complexity gradually. -QAK */ - if (ExpressMode > 1) + if (TestExpress > 1) printf( "***Express test mode on. test_man_start_5th_recursive_indirect is skipped\n"); else @@ -16250,7 +16248,7 @@ main(void) nerrors += test_man_remove_first_row(fapl, &small_cparam, &tparam); nerrors += test_man_remove_first_two_rows(fapl, &small_cparam, &tparam); nerrors += test_man_remove_first_four_rows(fapl, &small_cparam, &tparam); - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. Some tests skipped\n"); else { nerrors += test_man_remove_all_root_direct(fapl, &small_cparam, &tparam); @@ -16300,7 +16298,7 @@ main(void) nerrors += test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped( fapl, &small_cparam, &tparam); - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. Some tests skipped\n"); else { nerrors += @@ -16430,7 +16428,7 @@ main(void) } /* end block */ /* Random object insertion & deletion */ - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. Some tests skipped\n"); else { /* Random tests using "small" heap creation parameters */ diff --git a/test/file_image.c b/test/file_image.c index 45bf5af29c7..834b758a3ff 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -649,7 +649,8 @@ test_core(void) FAIL_STACK_ERROR; /* Release resources */ - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); free(udata); free(file_image); HDremove(copied_filename); @@ -924,7 +925,8 @@ test_get_file_image(const char *test_banner, const int file_name_num, hid_t fapl VERIFY(err == SUCCEED, "H5Pclose(core_fapl_id) failed."); /* tidy up */ - h5_clean_files(FILENAME2, fapl); + h5_delete_all_test_files(FILENAME2, fapl); + H5Pclose(fapl); /* discard the image buffer if it exists */ if (image_ptr != NULL) @@ -1070,7 +1072,8 @@ test_get_file_image_error_rejection(void) VERIFY(err == SUCCEED, "H5Fclose(file_id) failed."); /* tidy up */ - h5_clean_files(FILENAME2, fapl_id); + h5_delete_all_test_files(FILENAME2, fapl_id); + H5Pclose(fapl_id); /* discard the image buffer if it exists */ if (image_ptr != NULL) @@ -1174,7 +1177,8 @@ test_get_file_image_error_rejection(void) VERIFY(err == SUCCEED, "H5Fclose(2) failed."); /* tidy up */ - h5_clean_files(FILENAME2, fapl_id); + h5_delete_all_test_files(FILENAME2, fapl_id); + H5Pclose(fapl_id); /************************** Test #3 **********************************/ /* set up a split file driver test file, and try to get its image @@ -1236,7 +1240,8 @@ test_get_file_image_error_rejection(void) VERIFY(err == SUCCEED, "H5Fclose(2) failed."); /* tidy up */ - h5_clean_files(FILENAME2, fapl_id); + h5_delete_all_test_files(FILENAME2, fapl_id); + H5Pclose(fapl_id); /************************** Test #4 **********************************/ /* set up a family file driver test file, and try to get its image @@ -1296,7 +1301,8 @@ test_get_file_image_error_rejection(void) VERIFY(err == SUCCEED, "H5Fclose(2) failed."); /* tidy up */ - h5_clean_files(FILENAME2, fapl_id); + h5_delete_all_test_files(FILENAME2, fapl_id); + H5Pclose(fapl_id); PASSED(); @@ -1314,7 +1320,7 @@ main(void) bool driver_is_default_compatible; unsigned user; - h5_reset(); + h5_test_init(); printf("Testing File Image Functionality.\n"); @@ -1375,7 +1381,7 @@ main(void) errors += test_get_file_image_error_rejection(); - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); if (errors) { diff --git a/test/filenotclosed.c b/test/filenotclosed.c index 66b0052b52b..cdd8eed09d2 100644 --- a/test/filenotclosed.c +++ b/test/filenotclosed.c @@ -77,7 +77,7 @@ main(void) exit(EXIT_SUCCESS); } - h5_reset(); + h5_test_init(); /* To exit from the file for SIGABRT signal */ if (signal(SIGABRT, catch_signal) == SIG_ERR) diff --git a/test/fillval.c b/test/fillval.c index 64a33e04ff8..49ee2011256 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -2626,7 +2626,7 @@ main(int argc, char *argv[]) } /* end for */ } /* end if */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0) diff --git a/test/filter_fail.c b/test/filter_fail.c index 10296175909..1d204fa3218 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -368,7 +368,7 @@ main(void) char filename[1024]; unsigned nerrors = 0; - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); diff --git a/test/filter_plugin.c b/test/filter_plugin.c index 4e4f86b41e3..1ea46aedb51 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -1441,7 +1441,7 @@ main(void) hid_t my_fapl_id; /* Testing setup */ - h5_reset(); + h5_test_init(); /* Get a VFD-dependent filename */ if ((old_ff_fapl_id = h5_fileaccess()) < 0) @@ -1491,7 +1491,7 @@ main(void) TEST_ERROR; } - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); /*******************************************************************/ @@ -1501,7 +1501,7 @@ main(void) puts("\nTesting reading data with with dynamic plugin filters:"); /* Close the library so that all loaded plugin libraries are unloaded */ - h5_reset(); + h5_test_init(); if ((old_ff_fapl_id = h5_fileaccess()) < 0) TEST_ERROR; @@ -1542,7 +1542,7 @@ main(void) TEST_ERROR; } - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); /*******************************************************************/ @@ -1550,7 +1550,7 @@ main(void) /*******************************************************************/ /* Close the library so that all loaded plugin libraries are unloaded */ - h5_reset(); + h5_test_init(); if ((old_ff_fapl_id = h5_fileaccess()) < 0) TEST_ERROR; @@ -1588,7 +1588,7 @@ main(void) TEST_ERROR; } else { - /* Restore the default error handler (set in h5_reset()) */ + /* Restore the default error handler (set in h5_test_init()) */ h5_restore_err(); if (H5Pclose(old_ff_fapl_id) < 0) diff --git a/test/flush1.c b/test/flush1.c index f9ecb15fa1e..e93684bf36a 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -183,7 +183,7 @@ main(void) char filename[1024]; /* filename */ bool use_swmr; /* whether or not to use SWMR I/O */ - h5_reset(); + h5_test_init(); if ((fapl_id = h5_fileaccess()) < 0) TEST_ERROR; diff --git a/test/flush2.c b/test/flush2.c index 12daa2be87f..b8f4e13d35d 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -231,7 +231,7 @@ main(void) H5E_auto2_t func; /* for shutting off error reporting */ bool driver_is_default_vfd_compatible; - h5_reset(); + h5_test_init(); if ((fapl_id = h5_fileaccess()) < 0) PUTS_ERROR("bad vfd-dependent fapl"); diff --git a/test/freespace.c b/test/freespace.c index b278d2a217f..2d812177af3 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -2878,7 +2878,7 @@ main(void) unsigned nerrors = 0; /* Cumulative error count */ bool api_ctx_pushed = false; /* Whether API context pushed */ - h5_reset(); + h5_test_init(); if ((fapl = h5_fileaccess()) < 0) { nerrors++; diff --git a/test/getname.c b/test/getname.c index 6802ae365c6..ffc90a61cad 100644 --- a/test/getname.c +++ b/test/getname.c @@ -3757,7 +3757,7 @@ main(void) bool driver_is_parallel; /* Reset the library and get the file access property list */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); h5_fixname(FILENAME[0], fapl, filename0, sizeof filename0); diff --git a/test/gheap.c b/test/gheap.c index 782c80c8288..f4bf3210d6f 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -561,7 +561,7 @@ main(void) hid_t fapl_id = H5I_INVALID_HID; bool api_ctx_pushed = false; /* Whether API context pushed */ - h5_reset(); + h5_test_init(); if ((fapl_id = h5_fileaccess()) < 0) goto error; diff --git a/test/h5test.c b/test/h5test.c index b6ff6342eb5..97e413ac4a8 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -142,29 +142,6 @@ h5_errors(hid_t estack, void H5_ATTR_UNUSED *client_data) return 0; } -/*------------------------------------------------------------------------- - * Function: h5_clean_files - * - * Purpose: Cleanup temporary test files (always). - * base_name contains the list of test file names. - * - * Return: void - * - *------------------------------------------------------------------------- - */ -void -h5_clean_files(const char *base_name[], hid_t fapl) -{ - int i; - - for (i = 0; base_name[i]; i++) { - h5_delete_test_file(base_name[i], fapl); - } - - /* Close the FAPL used to access the file */ - H5Pclose(fapl); -} /* end h5_clean_files() */ - /*------------------------------------------------------------------------- * Function: h5_delete_test_file * @@ -239,7 +216,8 @@ h5_cleanup(const char *base_name[], hid_t fapl) if (GetTestCleanup()) { /* Clean up files in base_name, and the FAPL */ - h5_clean_files(base_name, fapl); + h5_delete_all_test_files(base_name, fapl); + H5Pclose(fapl); retval = 1; } /* end if */ @@ -250,29 +228,6 @@ h5_cleanup(const char *base_name[], hid_t fapl) return retval; } /* end h5_cleanup() */ -/*------------------------------------------------------------------------- - * Function: h5_test_shutdown - * - * Purpose: Performs any special test cleanup required before the test - * ends. - * - * NOTE: This function should normally only be called once - * in a given test, usually just before leaving main(). It - * is intended for use in the single-file unit tests, not - * testhdf5. - * - * Return: void - * - *------------------------------------------------------------------------- - */ -void -h5_test_shutdown(void) -{ - - /* Restore the original error reporting routine */ - h5_restore_err(); -} /* end h5_test_shutdown() */ - /*------------------------------------------------------------------------- * Function: h5_restore_err * @@ -291,27 +246,6 @@ h5_restore_err(void) err_func = NULL; } -/*------------------------------------------------------------------------- - * Function: h5_reset - * - * Purpose: Reset the library by closing it - * - * Return: void - *------------------------------------------------------------------------- - */ -void -h5_reset(void) -{ - fflush(stdout); - fflush(stderr); - H5close(); - - /* Save current error stack reporting routine and redirect to our local one */ - assert(err_func == NULL); - H5Eget_auto2(H5E_DEFAULT, &err_func, NULL); - H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL); -} - /*------------------------------------------------------------------------- * Function: h5_test_init * @@ -337,6 +271,9 @@ h5_test_init(void) assert(err_func == NULL); H5Eget_auto2(H5E_DEFAULT, &err_func, NULL); H5Eset_auto2(H5E_DEFAULT, h5_errors, NULL); + + /* Retrieve the TestExpress mode */ + GetTestExpress(); } /* end h5_test_init() */ /*------------------------------------------------------------------------- diff --git a/test/h5test.h b/test/h5test.h index 9ef94943a81..238bd38acd6 100644 --- a/test/h5test.h +++ b/test/h5test.h @@ -66,6 +66,28 @@ #define VERBOSE_MED (HDGetTestVerbosity() >= VERBO_MED) #define VERBOSE_HI (HDGetTestVerbosity() >= VERBO_HI) +/* + * The TestExpress mode for the testing framework + * + Values: + 0: Exhaustive run + Tests should take as long as necessary + 1: Full run. Default if H5_TEST_EXPRESS_LEVEL_DEFAULT + and HDF5TestExpress are not defined + Tests should take no more than 30 minutes + 2: Quick run + Tests should take no more than 10 minutes + 3: Smoke test. + Default if HDF5TestExpress is set to a value other than 0-3 + Tests should take less than 1 minute + + Design: + If the environment variable $HDF5TestExpress is defined, + or if a default testing level > 1 has been set via + H5_TEST_EXPRESS_LEVEL_DEFAULT, then test programs should + skip some tests so that they complete sooner. +*/ + /* * Test controls definitions. */ @@ -268,7 +290,6 @@ extern "C" { #endif /* Generally useful testing routines */ -H5TEST_DLL void h5_clean_files(const char *base_name[], hid_t fapl); H5TEST_DLL int h5_cleanup(const char *base_name[], hid_t fapl); H5TEST_DLL char *h5_fixname(const char *base_name, hid_t fapl, char *fullname, size_t size); H5TEST_DLL char *h5_fixname_superblock(const char *base_name, hid_t fapl, char *fullname, size_t size); @@ -278,7 +299,6 @@ H5TEST_DLL hid_t h5_fileaccess(void); H5TEST_DLL hid_t h5_fileaccess_flags(unsigned flags); H5TEST_DLL void h5_no_hwconv(void); H5TEST_DLL const char *h5_rmprefix(const char *filename); -H5TEST_DLL void h5_reset(void); H5TEST_DLL void h5_restore_err(void); H5TEST_DLL void h5_show_hostname(void); H5TEST_DLL h5_stat_size_t h5_get_file_size(const char *filename, hid_t fapl); @@ -303,16 +323,14 @@ H5TEST_DLL bool h5_driver_uses_multiple_files(const char *drv_name, un H5TEST_DLL herr_t h5_get_vfd_fapl(hid_t fapl_id); H5TEST_DLL herr_t h5_get_libver_fapl(hid_t fapl_id); -/* h5_clean_files() replacements */ +/* fapl must be closed by caller */ H5TEST_DLL void h5_delete_test_file(const char *base_name, hid_t fapl); H5TEST_DLL void h5_delete_all_test_files(const char *base_name[], hid_t fapl); -/* h5_reset() replacement */ +/* Performs any special actions before the test begins, + * including resetting the library by closing it */ H5TEST_DLL void h5_test_init(void); -/* h5_cleanup() replacement */ -H5TEST_DLL void h5_test_shutdown(void); - /* Routines for operating on the list of tests (for the "all in one" tests) */ H5TEST_DLL void TestUsage(void); H5TEST_DLL void AddTest(const char *TheName, void (*TheCall)(void), void (*Cleanup)(void), @@ -352,6 +370,7 @@ H5TEST_DLL char *getenv_all(MPI_Comm comm, int root, const char *name); #endif /* Extern global variables */ +H5TEST_DLLVAR int TestExpress; H5TEST_DLLVAR int TestVerbosity; H5TEST_DLLVAR size_t n_tests_run_g; H5TEST_DLLVAR size_t n_tests_passed_g; diff --git a/test/hdfs.c b/test/hdfs.c index 857a54c9c12..956621f384c 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -1589,7 +1589,7 @@ main(void) } #endif /* H5_HAVE_LIBHDFS */ - h5_reset(); + h5_test_init(); printf("Testing hdfs VFD functionality.\n"); diff --git a/test/istore.c b/test/istore.c index 1934cc37b0b..89fec3d3a36 100644 --- a/test/istore.c +++ b/test/istore.c @@ -591,7 +591,7 @@ main(int argc, char *argv[]) has_sparse_support = is_sparse(); /* Reset library */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); /* Use larger file addresses... */ diff --git a/test/lheap.c b/test/lheap.c index 7b9863411fd..7377d949fd6 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -55,7 +55,7 @@ main(void) bool driver_is_default_compatible; /* Reset library */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); /* Push API context */ diff --git a/test/links.c b/test/links.c index ffac35651de..8c84e8eebf8 100644 --- a/test/links.c +++ b/test/links.c @@ -23112,7 +23112,7 @@ main(void) driver_name = h5_get_test_driver_name(); - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0) diff --git a/test/links_env.c b/test/links_env.c index ed9c3ba7f0c..389cde662a4 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -157,7 +157,7 @@ main(void) exit(EXIT_SUCCESS); } - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); nerrors += external_link_env(fapl, false) < 0 ? 1 : 0; diff --git a/test/mdset.c b/test/mdset.c index 0091bc26e79..639c57525bd 100644 --- a/test/mdset.c +++ b/test/mdset.c @@ -642,7 +642,7 @@ main(void) unsigned i; int ret; - h5_reset(); + h5_test_init(); fapl_id = h5_fileaccess(); /* Initialize random number seed */ diff --git a/test/mf.c b/test/mf.c index 909a7ec89f1..e400348a11d 100644 --- a/test/mf.c +++ b/test/mf.c @@ -9136,7 +9136,7 @@ main(void) /* Get the VFD to use */ driver_name = h5_get_test_driver_name(); - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); diff --git a/test/mirror_vfd.c b/test/mirror_vfd.c index f7f88deb1a9..124fc6a6b0c 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -2411,7 +2411,7 @@ main(int argc, char **argv) struct mt_opts opts; int nerrors = 0; - h5_reset(); + h5_test_init(); g_log_stream = stdout; /* default debug/logging output stream */ diff --git a/test/mount.c b/test/mount.c index bc619b1b62b..92a0c13d84c 100644 --- a/test/mount.c +++ b/test/mount.c @@ -4458,7 +4458,7 @@ main(void) int nerrors = 0; hid_t fapl = H5I_INVALID_HID; - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); if (setup(fapl) < 0) goto error; diff --git a/test/mtime.c b/test/mtime.c index fad164b9e9c..53916b438a7 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -48,7 +48,7 @@ main(void) int token_cmp; bool driver_is_default_compatible; - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); TESTING("modification time messages"); diff --git a/test/ntypes.c b/test/ntypes.c index 3b5bd662bcc..81c694dc568 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -3183,7 +3183,7 @@ main(void) char filename[1024]; bool driver_is_parallel; - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); diff --git a/test/objcopy.c b/test/objcopy.c index 9205e961c22..030ace34386 100644 --- a/test/objcopy.c +++ b/test/objcopy.c @@ -17123,22 +17123,20 @@ main(void) hid_t fcpl_shared, ocpl; unsigned max_compact, min_dense; int configuration; /* Configuration of tests. */ - int ExpressMode; - const char *driver_name; /* File Driver value from environment */ - bool same_file; /* Whether to run tests that only use one file */ + const char *driver_name; /* File Driver value from environment */ + bool same_file; /* Whether to run tests that only use one file */ bool driver_is_default_compatible; driver_name = h5_get_test_driver_name(); /* Setup */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0) TEST_ERROR; - ExpressMode = GetTestExpress(); - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. Some tests may be skipped\n"); /* Copy the file access property list */ diff --git a/test/objcopy_ref.c b/test/objcopy_ref.c index 58326d5409c..a04e6aa85cc 100644 --- a/test/objcopy_ref.c +++ b/test/objcopy_ref.c @@ -1818,14 +1818,12 @@ main(void) hid_t fcpl_shared, ocpl; unsigned max_compact, min_dense; int configuration; /* Configuration of tests. */ - int ExpressMode; /* Setup */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); - ExpressMode = GetTestExpress(); - if (ExpressMode > 1) + if (TestExpress > 1) printf("***Express test mode on. Some tests may be skipped\n"); /* Copy the file access property list */ diff --git a/test/ohdr.c b/test/ohdr.c index 87f88f64ac5..7f4e6bdce0a 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -1845,7 +1845,7 @@ main(void) single_file_vfd = !h5_driver_uses_multiple_files(driver_name, 0); /* Reset library */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); diff --git a/test/onion.c b/test/onion.c index 1632c410b83..84ac6e70709 100644 --- a/test/onion.c +++ b/test/onion.c @@ -4913,7 +4913,7 @@ main(void) printf("Testing Onion VFD functionality.\n"); - h5_reset(); + h5_test_init(); /* The onion VFD only supports the sec2 VFD under the hood, so skip this * test when the environment variable has been set to something else diff --git a/test/page_buffer.c b/test/page_buffer.c index 4523b2aa904..5d36beb0389 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -2053,7 +2053,7 @@ main(void) const char *driver_name = NULL; /* File Driver value from environment */ bool api_ctx_pushed = false; /* Whether API context pushed */ - h5_reset(); + h5_test_init(); /* Get the VFD to use */ driver_name = h5_get_test_driver_name(); @@ -2086,7 +2086,8 @@ main(void) nerrors += test_stats_collection(fapl, driver_name); nerrors += test_pb_fapl_tolerance_at_open(); - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); if (nerrors) goto error; diff --git a/test/ros3.c b/test/ros3.c index b88c8c61de8..b2e3912ec81 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -1103,7 +1103,7 @@ main(void) * Commence tests * ******************/ - h5_reset(); + h5_test_init(); if (CURLE_OK != curl_global_init(CURL_GLOBAL_DEFAULT)) { printf("Unable to set up curl, can't run ros3 tests\n"); diff --git a/test/s3comms.c b/test/s3comms.c index ab447f869d9..8efbc584b39 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -2129,7 +2129,7 @@ main(void) int nerrors = 0; const char *bucket_url_env = NULL; - h5_reset(); + h5_test_init(); #endif /* H5_HAVE_ROS3_VFD */ diff --git a/test/select_io_dset.c b/test/select_io_dset.c index 3daa63f2d38..f9a4975eb50 100644 --- a/test/select_io_dset.c +++ b/test/select_io_dset.c @@ -3207,7 +3207,7 @@ main(void) unsigned mwbuf; /* With/without modifying write buffer */ /* Testing setup */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); h5_fixname(FILENAME[0], fapl, filename, sizeof filename); diff --git a/test/set_extent.c b/test/set_extent.c index f5840f90f7b..bee03140cb3 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -121,7 +121,7 @@ main(void) /* Initialize random number seed */ srand((unsigned)time(NULL)); - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); /* Copy the file access property list */ diff --git a/test/stab.c b/test/stab.c index 3f4a8360bec..3bae4d75046 100644 --- a/test/stab.c +++ b/test/stab.c @@ -1387,7 +1387,7 @@ main(void) contig_addr_vfd = (bool)(strcmp(driver_name, "split") != 0 && strcmp(driver_name, "multi") != 0); /* Reset library */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); if (h5_driver_is_default_vfd_compatible(fapl, &driver_is_default_compatible) < 0) diff --git a/test/swmr.c b/test/swmr.c index 94c98737c59..cb99917756a 100644 --- a/test/swmr.c +++ b/test/swmr.c @@ -7737,7 +7737,7 @@ main(void) bool file_locking_enabled = false; /* Checks if the file system supports locks */ /* Testing setup */ - h5_reset(); + h5_test_init(); /* Skip this test if SWMR I/O is not supported for the VFD specified * by the environment variable. diff --git a/test/testframe.c b/test/testframe.c index 133e8ac0c6b..ff12413a62e 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -41,7 +41,7 @@ static int num_errs = 0; /* Total number int TestVerbosity = VERBO_DEF; /* Default Verbosity is Low */ static int Summary = 0; /* Show test summary. Default is no. */ static int CleanUp = 1; /* Do cleanup or not. Default is yes. */ -static int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */ +int TestExpress = -1; /* Do TestExpress or not. -1 means not set yet. */ static TestStruct *Test = NULL; /* Array of tests */ static unsigned TestAlloc = 0; /* Size of the Test array */ static unsigned Index = 0; diff --git a/test/tfile.c b/test/tfile.c index de476eadf51..62881264441 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -4489,7 +4489,8 @@ test_filespace_info(const char *driver_name) } /* end for fs_persist */ /* close fapl_ and remove the file */ - h5_clean_files(FILESPACE_NAME, my_fapl); + h5_delete_all_test_files(FILESPACE_NAME, my_fapl); + H5Pclose(my_fapl); } /* end for new_format */ } /* test_filespace_info() */ @@ -4717,7 +4718,8 @@ test_file_freespace(const char *driver_name) /* Check that the file reverted to empty size */ VERIFY(mod_filesize, empty_filesize, "H5Fget_freespace"); - h5_clean_files(FILESPACE_NAME, my_fapl); + h5_delete_all_test_files(FILESPACE_NAME, my_fapl); + H5Pclose(my_fapl); } /* end for */ @@ -4805,7 +4807,8 @@ test_sects_freespace(const char *driver_name, bool new_format) if (!vol_is_native) { CHECK(H5Fclose(file), FAIL, "H5Fclose"); CHECK(H5Pclose(fcpl), FAIL, "H5Pclose"); - h5_clean_files(FILESPACE_NAME, fapl); + h5_delete_all_test_files(FILESPACE_NAME, fapl); + H5Pclose(fapl); CHECK(H5Pclose(fapl), FAIL, "H5Pclose"); MESSAGE(5, (" -- SKIPPED --\n")); return; @@ -4981,7 +4984,8 @@ test_sects_freespace(const char *driver_name, bool new_format) ret = H5Pclose(fcpl); CHECK(fcpl, FAIL, "H5Pclose"); - h5_clean_files(FILESPACE_NAME, fapl); + h5_delete_all_test_files(FILESPACE_NAME, fapl); + H5Pclose(fapl); } /* end test_sects_freespace() */ diff --git a/test/timer.c b/test/timer.c index e992cbaa734..81c356feff2 100644 --- a/test/timer.c +++ b/test/timer.c @@ -363,7 +363,7 @@ main(void) { int nerrors = 0; - h5_reset(); + h5_test_init(); printf("Testing platform-independent timer functionality.\n"); diff --git a/test/tsohm.c b/test/tsohm.c index 23d750dc779..cc639a6a2b2 100644 --- a/test/tsohm.c +++ b/test/tsohm.c @@ -615,7 +615,7 @@ size1_helper(hid_t file, const char *filename, hid_t fapl_id, bool test_file_clo /* Closing and re-opening the file takes a long time on systems without * local disks. Don't close and reopen if express testing is enabled. */ - if (GetTestExpress() > 1) + if (TestExpress > 1) test_file_closing = false; /* Initialize wdata */ @@ -1553,7 +1553,7 @@ size2_helper(hid_t fcpl_id, int test_file_closing, size2_helper_struct *ret_size /* Closing and re-opening the file takes a long time on systems without * local disks. Don't close and reopen if express testing is enabled. */ - if (GetTestExpress() > 1) + if (TestExpress > 1) test_file_closing = 0; /* Create a file and get its size */ diff --git a/test/unlink.c b/test/unlink.c index 1ca254dcf1a..42a03ac94d4 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -2909,7 +2909,7 @@ main(void) srand((unsigned)time(NULL)); /* Open */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); /* Copy the file access property list */ diff --git a/test/unregister.c b/test/unregister.c index e1576c09e2a..843c6671240 100644 --- a/test/unregister.c +++ b/test/unregister.c @@ -280,7 +280,7 @@ main(void) bool api_ctx_pushed = false; /* Whether API context pushed */ /* Testing setup */ - h5_reset(); + h5_test_init(); fapl_id = h5_fileaccess(); /* Push API context */ diff --git a/test/vds.c b/test/vds.c index c08eec09288..8dafc5c6890 100644 --- a/test/vds.c +++ b/test/vds.c @@ -8608,7 +8608,8 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl) */ /* Clean up files so the source files do not exist yet */ H5Iinc_ref(vds_fapl); /* Prevent FAPL from being closed */ - h5_clean_files(FILENAME, vds_fapl); + h5_delete_all_test_files(FILENAME, vds_fapl); + H5Pclose(vds_fapl); /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -8918,7 +8919,8 @@ test_printf(unsigned config, hid_t vds_fapl, hid_t src_fapl) */ /* Clean up files so the source files do not exist yet */ H5Iinc_ref(vds_fapl); /* Prevent FAPL from being closed */ - h5_clean_files(FILENAME, vds_fapl); + h5_delete_all_test_files(FILENAME, vds_fapl); + H5Pclose(vds_fapl); /* Clear virtual layout in DCPL */ if (H5Pset_layout(dcpl, H5D_VIRTUAL) < 0) @@ -12323,7 +12325,7 @@ main(void) driver_name = h5_get_test_driver_name(); /* Testing setup */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0) diff --git a/test/vds_env.c b/test/vds_env.c index 4432e0aad53..9e24067d75a 100644 --- a/test/vds_env.c +++ b/test/vds_env.c @@ -334,7 +334,7 @@ main(void) driver_name = h5_get_test_driver_name(); /* Testing setup */ - h5_reset(); + h5_test_init(); fapl = h5_fileaccess(); if (h5_using_parallel_driver(fapl, &driver_is_parallel) < 0) diff --git a/test/vfd.c b/test/vfd.c index 9f33e0ea328..65a5393265b 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -5886,7 +5886,7 @@ main(void) exit(EXIT_SUCCESS); } - h5_reset(); + h5_test_init(); printf("Testing basic Virtual File Driver functionality.\n"); diff --git a/test/vfd_plugin.c b/test/vfd_plugin.c index 91f8ec50c41..e588d5feab8 100644 --- a/test/vfd_plugin.c +++ b/test/vfd_plugin.c @@ -416,7 +416,7 @@ main(void) { int nerrors = 0; - h5_reset(); + h5_test_init(); puts("Testing VFD plugin functionality."); diff --git a/test/vol.c b/test/vol.c index 395b164bfe7..041e0c9b88b 100644 --- a/test/vol.c +++ b/test/vol.c @@ -2651,7 +2651,7 @@ main(void) /* Get the VFD to use */ driver_name = h5_get_test_driver_name(); - h5_reset(); + h5_test_init(); puts("Testing basic Virtual Object Layer (VOL) functionality."); diff --git a/test/vol_plugin.c b/test/vol_plugin.c index af46f3463d9..8ebc050c3b9 100644 --- a/test/vol_plugin.c +++ b/test/vol_plugin.c @@ -332,7 +332,7 @@ main(void) { int nerrors = 0; - h5_reset(); + h5_test_init(); puts("Testing VOL connector plugin functionality."); diff --git a/testpar/t_filters_parallel.c b/testpar/t_filters_parallel.c index f60431b0dad..fad597e17da 100644 --- a/testpar/t_filters_parallel.c +++ b/testpar/t_filters_parallel.c @@ -10319,7 +10319,8 @@ main(int argc, char **argv) TestAlarmOff(); - h5_clean_files(FILENAME, fapl_id); + h5_delete_all_test_files(FILENAME, fapl_id); + H5Pclose(fapl_id); fapl_id = H5I_INVALID_HID; if (dcpl_id >= 0) diff --git a/testpar/t_mpi.c b/testpar/t_mpi.c index 0f1e27b506e..c0dabf54431 100644 --- a/testpar/t_mpi.c +++ b/testpar/t_mpi.c @@ -1231,7 +1231,8 @@ main(int argc, char **argv) /* turn off alarm */ TestAlarmOff(); - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); H5close(); /* MPI_Finalize must be called AFTER H5close which may use MPI calls */ diff --git a/testpar/t_pflush2.c b/testpar/t_pflush2.c index 2f860d4417d..826f7d4622d 100644 --- a/testpar/t_pflush2.c +++ b/testpar/t_pflush2.c @@ -200,8 +200,10 @@ main(int argc, char *argv[]) H5Eset_auto2(H5E_DEFAULT, func, NULL); - h5_clean_files(FLUSH_FILENAME, fapl_id1); - h5_clean_files(NOFLUSH_FILENAME, fapl_id2); + h5_delete_all_test_files(FLUSH_FILENAME, fapl_id1); + H5Pclose(fapl_id1); + h5_delete_all_test_files(NOFLUSH_FILENAME, fapl_id2); + H5Pclose(fapl_id2); if (data_g) { free(data_g); diff --git a/testpar/t_pmulti_dset.c b/testpar/t_pmulti_dset.c index c3c65c62479..622690dbece 100644 --- a/testpar/t_pmulti_dset.c +++ b/testpar/t_pmulti_dset.c @@ -647,7 +647,7 @@ main(int argc, char *argv[]) unsigned i; int ret; - h5_reset(); + h5_test_init(); /* Initialize MPI */ MPI_Init(&argc, &argv); diff --git a/testpar/t_select_io_dset.c b/testpar/t_select_io_dset.c index 6382aed45b3..271d38c7fbd 100644 --- a/testpar/t_select_io_dset.c +++ b/testpar/t_select_io_dset.c @@ -4086,7 +4086,7 @@ main(int argc, char *argv[]) unsigned select; unsigned mwbuf; - h5_reset(); + h5_test_init(); /* Initialize MPI */ MPI_Init(&argc, &argv); diff --git a/testpar/t_shapesame.c b/testpar/t_shapesame.c index ecb94c3729c..8aeed30e078 100644 --- a/testpar/t_shapesame.c +++ b/testpar/t_shapesame.c @@ -4416,8 +4416,7 @@ main(int argc, char **argv) TestSummary(); /* Clean up test files */ - h5_clean_files(FILENAME, fapl); - + h5_delete_all_test_files(FILENAME, fapl); H5Pclose(fapl); nerrors += GetTestNumErrs(); diff --git a/testpar/t_subfiling_vfd.c b/testpar/t_subfiling_vfd.c index 8f0ac52c074..27c48250be4 100644 --- a/testpar/t_subfiling_vfd.c +++ b/testpar/t_subfiling_vfd.c @@ -3349,7 +3349,7 @@ main(int argc, char **argv) int main(void) { - h5_reset(); + h5_test_init(); printf("Testing Subfiling VFD functionality\n"); printf("SKIPPED - Subfiling VFD not built\n"); exit(EXIT_SUCCESS); diff --git a/testpar/testphdf5.c b/testpar/testphdf5.c index 992b8ee71af..960a5cf67a3 100644 --- a/testpar/testphdf5.c +++ b/testpar/testphdf5.c @@ -602,8 +602,7 @@ main(int argc, char **argv) TestSummary(); /* Clean up test files */ - h5_clean_files(FILENAME, fapl); - + h5_delete_all_test_files(FILENAME, fapl); H5Pclose(fapl); nerrors += GetTestNumErrs(); diff --git a/tools/test/h5repack/h5repacktst.c b/tools/test/h5repack/h5repacktst.c index 62d3a948c92..fccd339849a 100644 --- a/tools/test/h5repack/h5repacktst.c +++ b/tools/test/h5repack/h5repacktst.c @@ -1732,7 +1732,8 @@ main(void) hid_t fapl; fapl = h5_fileaccess(); - h5_clean_files(H5REPACK_FILENAMES, fapl); + h5_delete_all_test_files(H5REPACK_FILENAMES, fapl); + H5Pclose(fapl); } puts("All h5repack tests passed."); diff --git a/tools/test/perform/perf_meta.c b/tools/test/perform/perf_meta.c index 4f1863d36f3..401400a1ac9 100644 --- a/tools/test/perform/perf_meta.c +++ b/tools/test/perform/perf_meta.c @@ -746,7 +746,8 @@ main(int argc, char **argv) if (H5Sclose(small_space) < 0) goto error; - h5_clean_files(FILENAME, fapl); + h5_delete_all_test_files(FILENAME, fapl); + H5Pclose(fapl); #ifdef H5_HAVE_PARALLEL if (facc_type == FACC_MPIO)