diff options
Diffstat (limited to 'tools/h5dump')
-rw-r--r-- | tools/h5dump/CMakeTests.cmake | 59 | ||||
-rw-r--r-- | tools/h5dump/CMakeTestsPBITS.cmake | 32 | ||||
-rw-r--r-- | tools/h5dump/CMakeTestsVDS.cmake | 36 | ||||
-rw-r--r-- | tools/h5dump/CMakeTestsXML.cmake | 23 | ||||
-rw-r--r-- | tools/h5dump/h5dump.c | 2 | ||||
-rw-r--r-- | tools/h5dump/h5dumpgentest.c | 461 | ||||
-rw-r--r-- | tools/h5dump/testh5dump.sh.in | 8 | ||||
-rw-r--r-- | tools/h5dump/testh5dumppbits.sh.in | 2 | ||||
-rw-r--r-- | tools/h5dump/testh5dumpvds.sh.in | 2 | ||||
-rw-r--r-- | tools/h5dump/testh5dumpxml.sh.in | 2 |
10 files changed, 490 insertions, 137 deletions
diff --git a/tools/h5dump/CMakeTests.cmake b/tools/h5dump/CMakeTests.cmake index 346ab60..e376b50 100644 --- a/tools/h5dump/CMakeTests.cmake +++ b/tools/h5dump/CMakeTests.cmake @@ -62,6 +62,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tcmpdintarray.ddl ${HDF5_TOOLS_DIR}/testfiles/tcmpdints.ddl ${HDF5_TOOLS_DIR}/testfiles/tcmpdintsize.ddl + ${HDF5_TOOLS_DIR}/testfiles/tcompound_complex2.ddl ${HDF5_TOOLS_DIR}/testfiles/tcomp-1.ddl ${HDF5_TOOLS_DIR}/testfiles/tcomp-2.ddl ${HDF5_TOOLS_DIR}/testfiles/tcomp-3.ddl @@ -173,6 +174,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tvldtypes3.ddl ${HDF5_TOOLS_DIR}/testfiles/tvldtypes4.ddl ${HDF5_TOOLS_DIR}/testfiles/tvldtypes5.ddl + ${HDF5_TOOLS_DIR}/testfiles/tvlenstr_array.ddl ${HDF5_TOOLS_DIR}/testfiles/tvlstr.ddl ${HDF5_TOOLS_DIR}/testfiles/tvms.ddl ${HDF5_TOOLS_DIR}/testfiles/twidedisplay.ddl @@ -222,6 +224,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tcmpdintsize.h5 ${HDF5_TOOLS_DIR}/testfiles/tcompound.h5 ${HDF5_TOOLS_DIR}/testfiles/tcompound_complex.h5 + ${HDF5_TOOLS_DIR}/testfiles/tcompound_complex2.h5 ${HDF5_TOOLS_DIR}/testfiles/tdatareg.h5 ${HDF5_TOOLS_DIR}/testfiles/tdset.h5 ${HDF5_TOOLS_DIR}/testfiles/tempty.h5 @@ -286,6 +289,7 @@ ${HDF5_TOOLS_DIR}/testfiles/tvldtypes3.h5 ${HDF5_TOOLS_DIR}/testfiles/tvldtypes4.h5 ${HDF5_TOOLS_DIR}/testfiles/tvldtypes5.h5 + ${HDF5_TOOLS_DIR}/testfiles/tvlenstr_array.h5 ${HDF5_TOOLS_DIR}/testfiles/tvlstr.h5 ${HDF5_TOOLS_DIR}/testfiles/tvms.h5 ${HDF5_TOOLS_DIR}/testfiles/zerodim.h5 @@ -325,14 +329,7 @@ # foreach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) get_filename_component (fname "${tst_h5_file}" NAME) - set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") - #message (STATUS " Copying ${tst_h5_file}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_h5_file} ${dest} - ) + HDFTEST_COPY_FILE("${tst_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files") endforeach (tst_h5_file ${HDF5_REFERENCE_TEST_FILES}) foreach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) @@ -340,60 +337,32 @@ file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} TEST_STREAM) file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} "${TEST_STREAM}") else (WIN32) - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file} ${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file} - ) + HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/${tst_exp_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${tst_exp_file}" "h5dump_std_files") endif (WIN32) endforeach (tst_exp_file ${HDF5_REFERENCE_EXP_FILES}) foreach (tst_other_file ${HDF5_REFERENCE_FILES}) get_filename_component (fname "${tst_other_file}" NAME) - set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") - #message (STATUS " Copying ${tst_other_file}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_other_file} ${dest} - ) + HDFTEST_COPY_FILE("${tst_other_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files") endforeach (tst_other_file ${HDF5_REFERENCE_FILES}) foreach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) get_filename_component (fname "${tst_error_file}" NAME) - set (dest "${PROJECT_BINARY_DIR}/testfiles/std/${fname}") - #message (STATUS " Copying ${tst_error_file}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_error_file} ${dest} - ) + HDFTEST_COPY_FILE("${tst_error_file}" "${PROJECT_BINARY_DIR}/testfiles/std/${fname}" "h5dump_std_files") endforeach (tst_error_file ${HDF5_ERROR_REFERENCE_TEST_FILES}) # -------------------------------------------------------------------- # Special file handling # -------------------------------------------------------------------- - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl ${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl - ) + HDFTEST_COPY_FILE("${HDF5_TOOLS_SOURCE_DIR}/testfiles/tbin1.ddl" "${PROJECT_BINARY_DIR}/testfiles/std/tbin1LE.ddl" "h5dump_std_files") if (WIN32) file (READ ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp TEST_STREAM) file (WRITE ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp "${TEST_STREAM}") else (WIN32) - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp ${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp - ) + HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/tbinregR.exp" "${PROJECT_BINARY_DIR}/testfiles/std/tbinregR.exp" "h5dump_std_files") endif (WIN32) + add_custom_target(h5dump_std_files ALL COMMENT "Copying files needed by h5dump_std tests" DEPENDS ${h5dump_std_files_list}) ############################################################################## ############################################################################## @@ -850,6 +819,8 @@ tcomp-4.out.err tcompact.out tcompact.out.err + tcompound_complex.out + tcompound_complex.out.err tcontents.out tcontents.out.err tcontiguos.out @@ -1066,6 +1037,8 @@ tvldtypes4.out.err tvldtypes5.out tvldtypes5.out.err + tvlenstr_array.out + tvlenstr_array.out.err tvlstr.out tvlstr.out.err tvms.out @@ -1174,6 +1147,7 @@ ADD_H5ERR_MASK_TEST (tcomp-3 0 "--enable-error-stack;-t;/#6632;-g;/group2;tcompound.h5") # test complicated compound datatype ADD_H5_TEST (tcomp-4 0 --enable-error-stack tcompound_complex.h5) + ADD_H5_TEST (tcompound_complex2 0 --enable-error-stack tcompound_complex2.h5) # tests for bitfields and opaque data types ADD_H5_TEST (tbitnopaque 0 --enable-error-stack tbitnopaque.h5) @@ -1208,6 +1182,7 @@ #test for file with variable length string data ADD_H5_TEST (tvlstr 0 --enable-error-stack tvlstr.h5) + ADD_H5_TEST (tvlenstr_array 0 --enable-error-stack tvlenstr_array.h5) # test for files with array data ADD_H5_TEST (tarray1 0 --enable-error-stack tarray1.h5) diff --git a/tools/h5dump/CMakeTestsPBITS.cmake b/tools/h5dump/CMakeTestsPBITS.cmake index 14f282a..28514fb 100644 --- a/tools/h5dump/CMakeTestsPBITS.cmake +++ b/tools/h5dump/CMakeTestsPBITS.cmake @@ -87,40 +87,20 @@ foreach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS}) get_filename_component(fname "${pbits_h5_file}" NAME) - set (dest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") - #message (STATUS " Copying ${pbits_h5_file}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${pbits_h5_file} ${dest} - ) + HDFTEST_COPY_FILE("${pbits_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files") endforeach (pbits_h5_file ${HDF5_REFERENCE_TEST_PBITS}) foreach (ddl_pbits ${HDF5_REFERENCE_PBITS}) get_filename_component(fname "${ddl_pbits}" NAME) - set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") - #message (STATUS " Copying ${ddl_pbits}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/pbits/${ddl_pbits} ${ddldest} - ) + HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/pbits/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files") endforeach (ddl_pbits ${HDF5_REFERENCE_PBITS}) foreach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) get_filename_component(fname "${ddl_pbits}" NAME) - set (ddldest "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}") - #message (STATUS " Copying ${ddl_pbits}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits} ${ddldest} - ) + HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_pbits}" "${PROJECT_BINARY_DIR}/testfiles/pbits/${fname}" "h5dump_pbits_files") endforeach (ddl_pbits ${HDF5_ERROR_REFERENCE_PBITS}) + add_custom_target(h5dump_pbits_files ALL COMMENT "Copying files needed by h5dump_pbits tests" DEPENDS ${h5dump_pbits_files_list}) ############################################################################## ############################################################################## @@ -135,10 +115,10 @@ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/pbits") if (NOT ${resultcode} STREQUAL "0") set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") - endif (NOT ${resultcode} STREQUAL "0") + endif () if (NOT "${last_pbits_test}" STREQUAL "") set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_pbits_test}) - endif (NOT "${last_pbits_test}" STREQUAL "") + endif () else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-${resultfile}-clear-objects diff --git a/tools/h5dump/CMakeTestsVDS.cmake b/tools/h5dump/CMakeTestsVDS.cmake index dcb90e0..68a62e8 100644 --- a/tools/h5dump/CMakeTestsVDS.cmake +++ b/tools/h5dump/CMakeTestsVDS.cmake @@ -66,40 +66,20 @@ foreach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS}) get_filename_component(fname "${vds_h5_file}" NAME) - set (dest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}") - #message (STATUS " Copying ${vds_h5_file}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${vds_h5_file} ${dest} - ) + HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${vds_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files") endforeach (vds_h5_file ${HDF5_REFERENCE_TEST_VDS}) foreach (ddl_vds ${HDF5_REFERENCE_VDS}) get_filename_component(fname "${ddl_vds}" NAME) - set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}") - #message (STATUS " Copying ${ddl_vds}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${ddl_vds} ${ddldest} - ) + HDFTEST_COPY_FILE("${HDF5_TOOLS_SRC_DIR}/testfiles/vds/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files") endforeach (ddl_vds ${HDF5_REFERENCE_VDS}) foreach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS}) get_filename_component(fname "${ddl_vds}" NAME) - set (ddldest "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}") - #message (STATUS " Copying ${ddl_vds}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds} ${ddldest} - ) + HDFTEST_COPY_FILE("${PROJECT_SOURCE_DIR}/errfiles/${ddl_vds}" "${PROJECT_BINARY_DIR}/testfiles/vds/${fname}" "h5dump_vds_files") endforeach (ddl_vds ${HDF5_ERROR_REFERENCE_VDS}) + add_custom_target(h5dump_vds_files ALL COMMENT "Copying files needed by h5dump_vds tests" DEPENDS ${h5dump_vds_files_list}) ############################################################################## ############################################################################## @@ -114,10 +94,10 @@ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") if (NOT ${resultcode} STREQUAL "0") set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") - endif (NOT ${resultcode} STREQUAL "0") + endif () if (NOT "${last_vds_test}" STREQUAL "") set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test}) - endif (NOT "${last_vds_test}" STREQUAL "") + endif () else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-${resultfile}-clear-objects @@ -147,10 +127,10 @@ set_tests_properties (H5DUMP-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/vds") if (NOT ${resultcode} STREQUAL "0") set_tests_properties (H5DUMP-${resultfile} PROPERTIES WILL_FAIL "true") - endif (NOT ${resultcode} STREQUAL "0") + endif () if (NOT "${last_vds_test}" STREQUAL "") set_tests_properties (H5DUMP-${resultfile} PROPERTIES DEPENDS ${last_VDS_test}) - endif (NOT "${last_vds_test}" STREQUAL "") + endif () else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-${resultfile}-clear-objects diff --git a/tools/h5dump/CMakeTestsXML.cmake b/tools/h5dump/CMakeTestsXML.cmake index afb1df6..6e8dd15 100644 --- a/tools/h5dump/CMakeTestsXML.cmake +++ b/tools/h5dump/CMakeTestsXML.cmake @@ -129,27 +129,14 @@ foreach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) get_filename_component(fname "${tst_xml_h5_file}" NAME) - set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") - #message (STATUS " Copying ${tst_xml_h5_file}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_xml_h5_file} ${dest} - ) + HDFTEST_COPY_FILE("${tst_xml_h5_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}" "h5dump_xml_files") endforeach (tst_xml_h5_file ${HDF5_XML_REFERENCE_TEST_FILES}) foreach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) get_filename_component(fname "${tst_xml_other_file}" NAME) - set (dest "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}") - #message (STATUS " Copying ${tst_xml_other_file}") - add_custom_command ( - TARGET h5dump - POST_BUILD - COMMAND ${CMAKE_COMMAND} - ARGS -E copy_if_different ${tst_xml_other_file} ${dest} - ) + HDFTEST_COPY_FILE("${tst_xml_other_file}" "${PROJECT_BINARY_DIR}/testfiles/xml/${fname}" "h5dump_xml_files") endforeach (tst_xml_other_file ${HDF5_XML_REFERENCE_FILES}) + add_custom_target(h5dump_xml_files ALL COMMENT "Copying files needed by h5dump_xml tests" DEPENDS ${h5dump_xml_files_list}) ############################################################################## ############################################################################## @@ -176,10 +163,10 @@ set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WORKING_DIRECTORY "${PROJECT_BINARY_DIR}/testfiles/xml") if (NOT ${resultcode} STREQUAL "0") set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES WILL_FAIL "true") - endif (NOT ${resultcode} STREQUAL "0") + endif () if (NOT "${last_xml_test}" STREQUAL "") set_tests_properties (H5DUMP-XML-${resultfile} PROPERTIES DEPENDS ${last_xml_test}) - endif (NOT "${last_xml_test}" STREQUAL "") + endif () else (HDF5_ENABLE_USING_MEMCHECKER) add_test ( NAME H5DUMP-XML-${resultfile}-clear-objects diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index 3b46912..562cfd5 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -638,7 +638,7 @@ parse_hsize_list(const char *h_list, subset_d *d) for (ptr = h_list; i < size_count && ptr && *ptr && *ptr != ';' && *ptr != ']'; ptr++) if(HDisdigit(*ptr)) { /* we should have an integer now */ - p_list[i++] = (hsize_t)HDatoll(ptr); + p_list[i++] = (hsize_t)HDstrtoull(ptr, NULL, 0); while (HDisdigit(*ptr)) /* scroll to end of integer */ diff --git a/tools/h5dump/h5dumpgentest.c b/tools/h5dump/h5dumpgentest.c index 1cdf6cf..c95ada3 100644 --- a/tools/h5dump/h5dumpgentest.c +++ b/tools/h5dump/h5dumpgentest.c @@ -112,6 +112,8 @@ #define FILE79 "tintsattrs.h5" #define FILE80 "tbitnopaque.h5" #define FILE81 "tints4dims.h5" +#define FILE82 "tcompound_complex2.h5" +#define FILE83 "tvlenstr_array.h5" /*------------------------------------------------------------------------- * prototypes @@ -289,14 +291,14 @@ typedef struct s1_t { #define F66_DUMMYDBL "DummyDBL" /* Declarations for gent_dataset_idx() for "FILE68a" */ -#define F68a_DSET_FIXED "dset_fixed" -#define F68a_DSET_FIXED_FILTER "dset_filter" -#define F68a_DSET_BTREE "dset_btree" -#define F68a_DIM200 200 -#define F68a_DIM100 100 -#define F68a_DIM20 20 -#define F68a_DIM10 10 -#define F68a_CHUNK 5 +#define F68a_DSET_FIXED "dset_fixed" +#define F68a_DSET_FIXED_FILTER "dset_filter" +#define F68a_DSET_BTREE "dset_btree" +#define F68a_DIM200 200 +#define F68a_DIM100 100 +#define F68a_DIM20 20 +#define F68a_DIM10 10 +#define F68a_CHUNK 5 /* "FILE70" macros and for FILE71 */ /* Name of dataset to create in datafile */ @@ -371,6 +373,25 @@ typedef struct s1_t { #define F81_YDIM 6 #define F81_ZDIM 4 +/* "File 82" macros */ +/* Name of dataset to create in datafile */ +#define F82_DATASETNAME "CompoundComplex1D" +/* Dataset dimensions */ +#define F82_DIM32 32 +#define F82_RANK 1 +//#define F82_RANK2 2 +//#define F82_RANK3 3 +//#define F82_RANK4 4 + +/* "File 83" macros */ +/* Name of dataset to create in datafile */ +#define F83_DATASETNAME "ScalarArrayOfVlenStr" +#define F83_DATASETNAME2 "CompoundArrayOfVlenStr" +/* Dataset dimensions */ +#define F83_DIM 5 +#define F83_RANK 1 +#define F83_ARRAYDIM 3 + static void gent_group(void) { @@ -7023,16 +7044,16 @@ gent_fs_strategy_threshold(void) /* * Create a file with new format: - * Create one dataset with (set_chunk, fixed dims, null max. dims) - * so that Fixed Array indexing will be used. - * Create one dataset with (set_chunk, fixed dims, null max. dims, filter) - * so that Fixed Array indexing will be used. + * Create one dataset with (set_chunk, fixed dims, null max. dims) + * so that Fixed Array indexing will be used. + * Create one dataset with (set_chunk, fixed dims, null max. dims, filter) + * so that Fixed Array indexing will be used. * Create one dataset with (set_chunk, fixed dims, fixed max. dims) - * so that Fixed Array indexing will be used. - * + * so that Fixed Array indexing will be used. + * * Modifications: - * Fixed Array indexing will be used for chunked dataset - * with fixed max. dims setting. + * Fixed Array indexing will be used for chunked dataset + * with fixed max. dims setting. * */ static void @@ -7062,7 +7083,7 @@ gent_dataset_idx(void) assert(ret >= 0); /* dataset with fixed dimensions */ - dims[0] = F68a_DIM20; + dims[0] = F68a_DIM20; dims[1] = F68a_DIM10; space = H5Screate_simple(RANK, dims, NULL); @@ -7075,7 +7096,7 @@ gent_dataset_idx(void) H5Sclose(space); /* dataset with non-fixed dimensions */ - maxdims[0] = F68a_DIM200; + maxdims[0] = F68a_DIM200; maxdims[1] = F68a_DIM100; space = H5Screate_simple(RANK, dims, maxdims); @@ -9838,6 +9859,408 @@ gent_intsfourdims(void) H5Fclose(fid); } +/*------------------------------------------------------------------------- + * Function: gent_compound_complex2 + * + * Purpose: Generate a file to be used in testing compound datatypes of + * various sizes, dimensions, member types and nesting. + *------------------------------------------------------------------------- + */ +static void gent_compound_complex2(void) +{ + /* Third-level nested compound */ + typedef struct { + short deep_nested_short[10]; + int deep_nested_int[10]; + long deep_nested_long[10]; + double deep_nested_double[10]; + float deep_nested_float[10]; + } third_level_compound; + + /* Second-level multiply-nested compounds */ + typedef struct { + unsigned int multiple_nested_a[5]; + int multiple_nested_b[5]; + unsigned long multiple_nested_c[5]; + long multiple_nested_d[5]; + } further_nested; + + typedef struct { + char further_nested_string[11]; + char further_nested_string_array[4][13]; + third_level_compound deep_nest; + } further_nested2; + + /* First First-level nested compound */ + typedef struct + { + double nested_a; + char nested_string[23]; + char nested_string_array[4][12]; + } nested_compound; + + /* Second First-level nested compound */ + typedef struct + { + float a; + further_nested b; + further_nested2 c; + } multiple_nested_compound; + + /* Compound datatype with different member types */ + typedef struct + { + /* Arrays nested inside compound */ + unsigned int a[4]; + int b[6]; + float c[2][4]; + nested_compound d; /* Compound inside compound */ + multiple_nested_compound e; /* Compound inside compound with further nested compound */ + } compound; + + compound buf[F82_DIM32]; /* compound */ + + hid_t file, type=-1, space=-1, dset=-1; + hid_t dset_array_a, dset_array_b, dset_array_c; + hid_t cmpd_tid1 = -1, cmpd_tid2 = -1, cmpd_tid3 = -1; + size_t i; + size_t j, k; + unsigned dset_array_ndims; + hsize_t dset_array_a_dims[1], dset_array_b_dims[1], dset_array_c_dims[2]; + hsize_t nelmts = F82_DIM32; + + file = H5Fcreate(FILE82, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + if ((space = H5Screate_simple(F82_RANK, &nelmts, NULL)) >= 0) { + /* CompoundComplex1D */ + if ((type = H5Tcreate(H5T_COMPOUND, sizeof(compound))) >= 0) { + hid_t str_type, array; + hsize_t dims[1]; + hid_t nest1, nest2; + + /* Insert top-level array members */ + dset_array_ndims = 1; dset_array_a_dims[0] = 4; + dset_array_a = H5Tarray_create2(H5T_STD_U32LE, dset_array_ndims, dset_array_a_dims); + H5Tinsert(type, "a", HOFFSET(compound, a), dset_array_a); + H5Tclose(dset_array_a); + + dset_array_ndims = 1; dset_array_b_dims[0] = 6; + dset_array_b = H5Tarray_create2(H5T_STD_I32LE, dset_array_ndims, dset_array_b_dims); + H5Tinsert(type, "b", HOFFSET(compound, b), dset_array_b); + H5Tclose(dset_array_b); + + dset_array_ndims = 2; dset_array_c_dims[0] = 2; dset_array_c_dims[1] = 4; + dset_array_c = H5Tarray_create2(H5T_IEEE_F32LE, dset_array_ndims, dset_array_c_dims); + H5Tinsert(type, "c", HOFFSET(compound, c), dset_array_c); + H5Tclose(dset_array_c); + + /* Insert first nested compound */ + cmpd_tid1 = H5Tcreate(H5T_COMPOUND, sizeof(nested_compound)); + + H5Tinsert(cmpd_tid1, "nested_double", HOFFSET(nested_compound, nested_a), H5T_IEEE_F64LE); + + dims[0] = 1; + str_type = mkstr(23, H5T_STR_NULLTERM); + array = H5Tarray_create2(str_type, 1, dims); + H5Tinsert(cmpd_tid1, "nested_string", HOFFSET(nested_compound, nested_string), array); + H5Tclose(array); + H5Tclose(str_type); + + dims[0] = 4; + str_type = mkstr(12, H5T_STR_NULLTERM); + array = H5Tarray_create2(str_type, 1, dims); + H5Tinsert(cmpd_tid1, "nested_string_array", HOFFSET(nested_compound, nested_string_array), array); + H5Tclose(array); + H5Tclose(str_type); + + H5Tinsert(type, "nested_compound", HOFFSET(compound, d), cmpd_tid1); + + /* Insert second nested compound */ + cmpd_tid2 = H5Tcreate(H5T_COMPOUND, sizeof(multiple_nested_compound)); + + H5Tinsert(cmpd_tid2, "nested_float", HOFFSET(multiple_nested_compound, a), H5T_IEEE_F32LE); + + /* Add first further nested compound */ + nest1 = H5Tcreate(H5T_COMPOUND, sizeof(further_nested)); + + dims[0] = 5; + array = H5Tarray_create2(H5T_STD_U32LE, 1, dims); + H5Tinsert(nest1, "nested_unsigned_int", HOFFSET(further_nested, multiple_nested_a), array); + H5Tclose(array); + + array = H5Tarray_create2(H5T_STD_I32LE, 1, dims); + H5Tinsert(nest1, "nested_int", HOFFSET(further_nested, multiple_nested_b), array); + H5Tclose(array); + + array = H5Tarray_create2(H5T_STD_U64LE, 1, dims); + H5Tinsert(nest1, "nested_unsigned_long", HOFFSET(further_nested, multiple_nested_c), array); + H5Tclose(array); + + array = H5Tarray_create2(H5T_STD_I64LE, 1, dims); + H5Tinsert(nest1, "nested_long", HOFFSET(further_nested, multiple_nested_d), array); + H5Tclose(array); + + H5Tinsert(cmpd_tid2, "further_nested_compoundA", HOFFSET(multiple_nested_compound, b), nest1); + H5Tclose(nest1); + + /* Add second further nested compound */ + nest2 = H5Tcreate(H5T_COMPOUND, sizeof(further_nested2)); + + dims[0] = 1; + str_type = mkstr(11, H5T_STR_NULLTERM); + array = H5Tarray_create2(str_type, 1, dims); + H5Tinsert(nest2, "nested_string", HOFFSET(further_nested2, further_nested_string), array); + H5Tclose(array); + H5Tclose(str_type); + + dims[0] = 4; + str_type = mkstr(13, H5T_STR_NULLTERM); + array = H5Tarray_create2(str_type, 1, dims); + H5Tinsert(nest2, "nested_string_array", HOFFSET(further_nested2, further_nested_string_array), array); + H5Tclose(array); + H5Tclose(str_type); + + /* Add a final third-level nested compound to this second-level compound */ + cmpd_tid3 = H5Tcreate(H5T_COMPOUND, sizeof(third_level_compound)); + + dims[0] = 10; + array = H5Tarray_create2(H5T_STD_I16LE, 1, dims); + H5Tinsert(cmpd_tid3, "deep_nested_short", HOFFSET(third_level_compound, deep_nested_short), array); + H5Tclose(array); + + array = H5Tarray_create2(H5T_STD_I32LE, 1, dims); + H5Tinsert(cmpd_tid3, "deep_nested_int", HOFFSET(third_level_compound, deep_nested_int), array); + H5Tclose(array); + + array = H5Tarray_create2(H5T_STD_I64LE, 1, dims); + H5Tinsert(cmpd_tid3, "deep_nested_long", HOFFSET(third_level_compound, deep_nested_long), array); + H5Tclose(array); + + array = H5Tarray_create2(H5T_IEEE_F64LE, 1, dims); + H5Tinsert(cmpd_tid3, "deep_nested_double", HOFFSET(third_level_compound, deep_nested_double), array); + H5Tclose(array); + + array = H5Tarray_create2(H5T_IEEE_F32LE, 1, dims); + H5Tinsert(cmpd_tid3, "deep_nested_float", HOFFSET(third_level_compound, deep_nested_float), array); + H5Tclose(array); + + H5Tinsert(nest2, "deep_nested_compound", HOFFSET(further_nested2, deep_nest), cmpd_tid3); + + H5Tinsert(cmpd_tid2, "further_nested_compoundB", HOFFSET(multiple_nested_compound, c), nest2); + H5Tclose(nest2); + + H5Tinsert(type, "multiple_nested_compound", HOFFSET(compound, e), cmpd_tid2); + + + if ((dset = H5Dcreate2(file, F82_DATASETNAME, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { + for(i = 0; i < nelmts; i++) { + for (j = 0; j < dset_array_a_dims[0]; j++) + buf[i].a[j] = (unsigned int)(j + i*10); + for (j = 0; j < dset_array_b_dims[0]; j++) + buf[i].b[j] = (int)(j - i*10); + for (j = 0; j < dset_array_c_dims[0]; j++) + for (k = 0; k < dset_array_c_dims[1]; k++) + buf[i].c[j][k] = (float)(j + k + i*10) + (float)(j) * 0.1F; + + /* Set up first nested compound */ + buf[i].d.nested_a = (double) i; + + strcpy(buf[i].d.nested_string, "This is a test string."); + + for (j = 0; j < 4; j++) + strcpy(buf[i].d.nested_string_array[j], "String test"); + + /* Set up multiple nested compound */ + buf[i].e.a = (float) i; + + for (j = 0; j < 5; j++) { + buf[i].e.b.multiple_nested_a[j] = (unsigned int)(j + i*10); + buf[i].e.b.multiple_nested_b[j] = (int)(j - i*10); + buf[i].e.b.multiple_nested_c[j] = (unsigned long)(j + i*10); + buf[i].e.b.multiple_nested_d[j] = (long)(j - i*10); + } + + strcpy(buf[i].e.c.further_nested_string, "1234567890"); + for (j = 0; j < 4; j++) + strcpy(buf[i].e.c.further_nested_string_array[j], "STRING ARRAY"); + + for (j = 0; j < 10; j++) { + buf[i].e.c.deep_nest.deep_nested_short[j] = (short)(j + i*10); + buf[i].e.c.deep_nest.deep_nested_int[j] = (int)(j - i*10); + buf[i].e.c.deep_nest.deep_nested_long[j] = (long)(j + i*10); + buf[i].e.c.deep_nest.deep_nested_double[j] = (double)(j + i*10); + buf[i].e.c.deep_nest.deep_nested_float[j] = (float)(j + i*10); + } + } + + if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) + fprintf(stderr, "gent_tcompound_complex2 H5Dwrite failed\n"); + + H5Dclose(dset); + } + H5Tclose(type); + } + H5Tclose(cmpd_tid1); + H5Tclose(cmpd_tid2); + H5Tclose(cmpd_tid3); + H5Sclose(space); + } + +// /* CompoundComplex2D */ +// if ((type = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) >= 0) { +// H5Tinsert(type, "a", HOFFSET(s_t, a), H5T_STD_B8LE); +// H5Tinsert(type, "b", HOFFSET(s_t, b), H5T_STD_B16LE); +// H5Tinsert(type, "c", HOFFSET(s_t, c), H5T_STD_B32LE); +// H5Tinsert(type, "d", HOFFSET(s_t, d), H5T_STD_B64LE); +// if ((space = H5Screate_simple(F82_RANK2, &nelmts, NULL)) >= 0) { +// if ((dset = H5Dcreate2(file, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { +// for(i = 0; i < nelmts; i++) { +// buf5[i].a = (unsigned char)0xff ^ (unsigned char)i; +// buf5[i].b = (unsigned int)0xffff ^ (unsigned int)(i * 16); +// buf5[i].c = (unsigned long)0xffffffff ^ (unsigned long)(i * 32); +// buf5[i].d = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64); +// } +// +// H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); +// H5Dclose(dset); +// } +// H5Sclose(space); +// } +// H5Tclose(type); +// } +// +// /* CompoundComplex3D */ +// if ((type = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) >= 0) { +// H5Tinsert(type, "a", HOFFSET(s_t, a), H5T_STD_B8LE); +// H5Tinsert(type, "b", HOFFSET(s_t, b), H5T_STD_B16LE); +// H5Tinsert(type, "c", HOFFSET(s_t, c), H5T_STD_B32LE); +// H5Tinsert(type, "d", HOFFSET(s_t, d), H5T_STD_B64LE); +// if ((space = H5Screate_simple(F82_RANK3, &nelmts, NULL)) >= 0) { +// if ((dset = H5Dcreate2(file, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { +// for(i = 0; i < nelmts; i++) { +// buf5[i].a = (unsigned char)0xff ^ (unsigned char)i; +// buf5[i].b = (unsigned int)0xffff ^ (unsigned int)(i * 16); +// buf5[i].c = (unsigned long)0xffffffff ^ (unsigned long)(i * 32); +// buf5[i].d = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64); +// } +// +// H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); +// H5Dclose(dset); +// } +// H5Sclose(space); +// } +// H5Tclose(type); +// } +// +// /* CompoundComplex4D */ +// if ((type = H5Tcreate(H5T_COMPOUND, sizeof(s_t))) >= 0) { +// H5Tinsert(type, "a", HOFFSET(s_t, a), H5T_STD_B8LE); +// H5Tinsert(type, "b", HOFFSET(s_t, b), H5T_STD_B16LE); +// H5Tinsert(type, "c", HOFFSET(s_t, c), H5T_STD_B32LE); +// H5Tinsert(type, "d", HOFFSET(s_t, d), H5T_STD_B64LE); +// if ((space = H5Screate_simple(F82_RANK4, &nelmts, NULL)) >= 0) { +// if ((dset = H5Dcreate2(file, "compound_1", type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { +// for(i = 0; i < nelmts; i++) { +// buf5[i].a = (unsigned char)0xff ^ (unsigned char)i; +// buf5[i].b = (unsigned int)0xffff ^ (unsigned int)(i * 16); +// buf5[i].c = (unsigned long)0xffffffff ^ (unsigned long)(i * 32); +// buf5[i].d = (unsigned long long)0xffffffffffffffff ^ (unsigned long long)(i * 64); +// } +// +// H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf5); +// H5Dclose(dset); +// } +// H5Sclose(space); +// } +// H5Tclose(type); +// } + + H5Fclose(file); +} + +/*------------------------------------------------------------------------- + * Function: gent_vlenstr_array + * + * Purpose: Generate a file to be used in testing Arrays of variable + * length strings. + *------------------------------------------------------------------------- + */ +static void gent_vlenstr_array(void) +{ + /* Compound datatype with different member types */ + typedef struct compound + { + /* Array of variable-length strings*/ + const char *vlen_array[F83_ARRAYDIM]; + } compound; + compound buf[F83_DIM]; + + const char *test[F83_ARRAYDIM] = { + "This is a variable-length test string.", + "This test string is also variable-length.", + "A final test of variable-length strings. This string is longer than the others." + }; + const char *buffer[F83_DIM*F83_ARRAYDIM]; + + hid_t file, type=-1, space=-1, dset=-1; + hid_t cmpd_tid1, array_tid; + int i, j; + + hsize_t dims[] = {F83_DIM}, arraydim[] = {F83_ARRAYDIM}; + /* Initialize scalar data */ + for (i = 0; i < F83_DIM; i++) + for (j = 0; j < 3; j++) + buffer[j + 3*i] = test[j]; + + /* Initialize compound data */ + for (i = 0; i < F83_DIM; i++) + for (j = 0; j < 3; j++) + buf[i].vlen_array[j] = test[j]; + + file = H5Fcreate(FILE83, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); + + if ((space = H5Screate_simple(F83_RANK, dims, NULL)) >= 0) { + array_tid = H5Tcopy(H5T_C_S1); + H5Tset_size(array_tid, H5T_VARIABLE); + + /* ScalarArrayOfVlenStr */ + if ((type = H5Tarray_create2(array_tid, F83_RANK, arraydim)) >= 0) { + if ((dset = H5Dcreate2(file, F83_DATASETNAME, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { + if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buffer) < 0) + fprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n"); + + H5Dclose(dset); + } + H5Tclose(type); + } + H5Tclose(array_tid); + H5Sclose(space); + } + + if ((space = H5Screate_simple(F83_RANK, dims, NULL)) >= 0) { + /* CompoundArrayOfVlenStr */ + if ((type = H5Tcreate(H5T_COMPOUND, sizeof(compound))) >= 0) { + cmpd_tid1 = H5Tcopy(H5T_C_S1); + H5Tset_size(cmpd_tid1, H5T_VARIABLE); + + array_tid = H5Tarray_create2(cmpd_tid1, F83_RANK, arraydim); + H5Tinsert(type, "vlen_str_array", HOFFSET(compound, vlen_array), array_tid); + + if ((dset = H5Dcreate2(file, F83_DATASETNAME2, type, space, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) >= 0) { + if (H5Dwrite(dset, type, H5S_ALL, H5S_ALL, H5P_DEFAULT, buf) < 0) + fprintf(stderr, "gent_vlenstr_array H5Dwrite failed\n"); + + H5Dclose(dset); + } + H5Tclose(cmpd_tid1); + H5Tclose(type); + } + H5Sclose(space); + } + + H5Fclose(file); +} + /*------------------------------------------------------------------------- * Function: main @@ -9892,9 +10315,11 @@ int main(void) gent_multi(); gent_large_objname(); gent_vlstr(); + gent_vlenstr_array(); gent_char(); gent_attr_all(); gent_compound_complex(); + gent_compound_complex2(); gent_named_dtype_attr(); gent_null_space(); gent_zero_dim_size(); diff --git a/tools/h5dump/testh5dump.sh.in b/tools/h5dump/testh5dump.sh.in index 944fb85..9108f44 100644 --- a/tools/h5dump/testh5dump.sh.in +++ b/tools/h5dump/testh5dump.sh.in @@ -104,6 +104,7 @@ $SRC_H5DUMP_TESTFILES/tcmpdattrintsize.h5 $SRC_H5DUMP_TESTFILES/tcmpdintsize.h5 $SRC_H5DUMP_TESTFILES/tcompound.h5 $SRC_H5DUMP_TESTFILES/tcompound_complex.h5 +$SRC_H5DUMP_TESTFILES/tcompound_complex2.h5 $SRC_H5DUMP_TESTFILES/tdatareg.h5 $SRC_H5DUMP_TESTFILES/tdset.h5 $SRC_H5DUMP_TESTFILES/tempty.h5 @@ -169,6 +170,7 @@ $SRC_H5DUMP_TESTFILES/tvldtypes2.h5 $SRC_H5DUMP_TESTFILES/tvldtypes3.h5 $SRC_H5DUMP_TESTFILES/tvldtypes4.h5 $SRC_H5DUMP_TESTFILES/tvldtypes5.h5 +$SRC_H5DUMP_TESTFILES/tvlenstr_array.h5 $SRC_H5DUMP_TESTFILES/tvlstr.h5 $SRC_H5DUMP_TESTFILES/tvms.h5 " @@ -229,6 +231,7 @@ $SRC_H5DUMP_TESTFILES/tcomp-1.ddl $SRC_H5DUMP_TESTFILES/tcomp-2.ddl $SRC_H5DUMP_TESTFILES/tcomp-3.ddl $SRC_H5DUMP_TESTFILES/tcomp-4.ddl +$SRC_H5DUMP_TESTFILES/tcompound_complex2.ddl $SRC_H5DUMP_TESTFILES/tcompact.ddl $SRC_H5DUMP_TESTFILES/tcontents.ddl $SRC_H5DUMP_TESTFILES/tcontiguos.ddl @@ -342,6 +345,7 @@ $SRC_H5DUMP_TESTFILES/tvldtypes2.ddl $SRC_H5DUMP_TESTFILES/tvldtypes3.ddl $SRC_H5DUMP_TESTFILES/tvldtypes4.ddl $SRC_H5DUMP_TESTFILES/tvldtypes5.ddl +$SRC_H5DUMP_TESTFILES/tvlenstr_array.ddl $SRC_H5DUMP_TESTFILES/tvlstr.ddl $SRC_H5DUMP_TESTFILES/tvms.ddl $SRC_H5DUMP_TESTFILES/twidedisplay.ddl @@ -419,7 +423,7 @@ CLEAN_TESTFILES_AND_TESTDIR() # skip rm if srcdir is same as destdir # this occurs when build/test performed in source dir and # make cp fail - SDIR=`$DIRNAME $tstfile` + SDIR=$SRC_H5DUMP_TESTFILES INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then @@ -1034,6 +1038,7 @@ TOOLTEST tcomp-2.ddl --enable-error-stack -N /type1 --any_path /type2 --any_path TOOLTEST4 tcomp-3.ddl --enable-error-stack -t /#6632 -g /group2 tcompound.h5 # test complicated compound datatype TOOLTEST tcomp-4.ddl --enable-error-stack tcompound_complex.h5 +TOOLTEST tcompound_complex.ddl --enable-error-stack tcompound_complex2.h5 # tests for bitfields and opaque data types TOOLTEST tbitnopaque.ddl --enable-error-stack tbitnopaque.h5 @@ -1068,6 +1073,7 @@ TOOLTEST tvldtypes5.ddl --enable-error-stack tvldtypes5.h5 #test for file with variable length string data TOOLTEST tvlstr.ddl --enable-error-stack tvlstr.h5 +TOOLTEST tvlenstr_array.ddl --enable-error-stack tvlenstr_array.h5 # test for files with array data TOOLTEST tarray1.ddl --enable-error-stack tarray1.h5 diff --git a/tools/h5dump/testh5dumppbits.sh.in b/tools/h5dump/testh5dumppbits.sh.in index 4211c63..446020a 100644 --- a/tools/h5dump/testh5dumppbits.sh.in +++ b/tools/h5dump/testh5dumppbits.sh.in @@ -190,7 +190,7 @@ CLEAN_TESTFILES_AND_TESTDIR() # skip rm if srcdir is same as destdir # this occurs when build/test performed in source dir and # make cp fail - SDIR=`$DIRNAME $tstfile` + SDIR=$SRC_H5DUMP_TESTFILES/pbits INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then diff --git a/tools/h5dump/testh5dumpvds.sh.in b/tools/h5dump/testh5dumpvds.sh.in index 850c03a..16411f5 100644 --- a/tools/h5dump/testh5dumpvds.sh.in +++ b/tools/h5dump/testh5dumpvds.sh.in @@ -169,7 +169,7 @@ CLEAN_TESTFILES_AND_TESTDIR() # skip rm if srcdir is same as destdir # this occurs when build/test performed in source dir and # make cp fail - SDIR=`$DIRNAME $tstfile` + SDIR=$SRC_H5DUMP_TESTFILES/vds INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then diff --git a/tools/h5dump/testh5dumpxml.sh.in b/tools/h5dump/testh5dumpxml.sh.in index 1efde85..33a67c0 100644 --- a/tools/h5dump/testh5dumpxml.sh.in +++ b/tools/h5dump/testh5dumpxml.sh.in @@ -221,7 +221,7 @@ CLEAN_TESTFILES_AND_TESTDIR() # skip rm if srcdir is same as destdir # this occurs when build/test performed in source dir and # make cp fail - SDIR=`$DIRNAME $tstfile` + SDIR=$SRC_H5DUMP_TESTFILES INODE_SDIR=`$LS -i -d $SDIR | $AWK -F' ' '{print $1}'` INODE_DDIR=`$LS -i -d $TESTDIR | $AWK -F' ' '{print $1}'` if [ "$INODE_SDIR" != "$INODE_DDIR" ]; then |