Merge pull request #1839 in HDFFV/hdf5 from ~BYRN/hdf5_adb:develop to develop

* commit '83b23a5a42c2124c1c5933d0565be1bbefd1c30d':
  Use prefix variable
  Cleanup HD prefix
  Merge reconciliation and VFD test fixes
This commit is contained in:
Allen Byrne 2019-08-07 13:55:02 -05:00
commit 92d79a5840
20 changed files with 988 additions and 1233 deletions

View File

@ -3393,6 +3393,7 @@
./tools/test/h5dump/CMakeTestsPBITS.cmake
./tools/test/h5dump/CMakeTestsXML.cmake
./tools/test/h5dump/CMakeTestsVDS.cmake
./tools/test/h5dump/CMakeVFDTests.cmake
./tools/src/h5format_convert/CMakeLists.txt
./tools/test/h5format_convert/CMakeLists.txt
./tools/test/h5format_convert/CMakeTests.cmake

View File

@ -100,9 +100,9 @@ endif ()
#-----------------------------------------------------------------------------
# Version Strings
#-----------------------------------------------------------------------------
set (HDF5_VERSION_STRING @HDF5_VERSION_STRING@)
set (HDF5_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
set (HDF5_VERSION_MINOR @HDF5_VERSION_MINOR@)
set (${HDF5_PACKAGE_NAME}_VERSION_STRING @HDF5_VERSION_STRING@)
set (${HDF5_PACKAGE_NAME}_VERSION_MAJOR @HDF5_VERSION_MAJOR@)
set (${HDF5_PACKAGE_NAME}_VERSION_MINOR @HDF5_VERSION_MINOR@)
#-----------------------------------------------------------------------------
# Don't include targets if this file is being picked up by another
@ -196,7 +196,7 @@ foreach (libtype IN LISTS ${HDF5_PACKAGE_NAME}_LIB_TYPE)
elseif (comp STREQUAL "Java")
set (${HDF5_PACKAGE_NAME}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_LIBRARY COMP_LIBRARY)
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} hdf5::${hdf5_comp})
set (${COMP_LIBRARY} ${${COMP_LIBRARY}} @HDF5_PACKAGE@::${hdf5_comp})
else ()
set (${HDF5_PACKAGE_NAME}_${libtype}_${comp}_FOUND 1)
string(TOUPPER ${HDF5_PACKAGE_NAME}_${comp}_${libtype}_LIBRARY COMP_LIBRARY)

View File

@ -163,9 +163,9 @@ main (void)
/*
* Resulting dataset
*
* 1 1 1 3 3
* 1 1 1 3 3
* 1 1 1 0 0
* 1 1 1 3 3
* 1 1 1 3 3
* 1 1 1 0 0
* 2 0 0 0 0
* 2 0 0 0 0
* 2 0 0 0 0

View File

@ -93,7 +93,6 @@ static unsigned evict_on_close_test(hbool_t single_file_vfd);
#define DSET_SIZE (40 * CHUNK_SIZE)
#define MAX_NUM_DSETS 256
static void
create_datasets(hid_t file_id, int min_dset, int max_dset)
{
@ -4486,7 +4485,6 @@ cache_image_smoke_check_4(hbool_t single_file_vfd)
if ( show_progress )
HDfprintf(stdout, "%s:L3 cp = %d, max_dset = %d, pass = %d.\n",
fcn_name, cp + 2, max_dset, pass);
} /* end while */
cp += 3;
@ -5111,8 +5109,8 @@ cache_image_smoke_check_5(hbool_t single_file_vfd)
* extension message has been deleted.
*/
i = min_group;
while ( ( pass ) && ( i <= max_group ) ) {
sprintf(process_group_name, "/process_%d", i);
while ( ( pass ) && ( i <= max_group ) ) {
sprintf(process_group_name, "/process_%d", i);
validate_zoo(file_id, process_group_name, i++);
}

File diff suppressed because it is too large Load Diff

View File

@ -12,10 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
* Programmer: Raymond Lu
* Programmer: Raymond Lu
* October 14, 2001
*
* Purpose: Tests the error API routines.
* Purpose: Tests the error API routines.
*/
#include "h5test.h"
#include "H5srcdir.h"
@ -23,7 +23,7 @@
#ifdef H5_USE_16_API
int main(void)
{
HDfprintf(stderr, "Test skipped because backward compatbility with v1.6 is configured in\n");
HDfprintf(stderr, "Test skipped because backward compatibility with v1.6 is configured in\n");
return 0;
}
#else /* H5_USE_16_API */
@ -38,7 +38,7 @@ const char *FILENAME[] = {
#define DIM0 100
#define DIM1 200
int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
int ipoints2[DIM0][DIM1], icheck2[DIM0][DIM1];
hid_t ERR_CLS;
hid_t ERR_CLS2;
@ -80,7 +80,7 @@ hid_t ERR_MIN_GETNUM;
static herr_t custom_print_cb(unsigned n, const H5E_error2_t *err_desc,
void *client_data);
/*-------------------------------------------------------------------------
* Function: test_error
*
@ -94,10 +94,10 @@ static herr_t custom_print_cb(unsigned n, const H5E_error2_t *err_desc,
static herr_t
test_error(hid_t file)
{
hid_t dataset = -1;
hid_t dataset = -1;
hid_t space = -1;
hid_t estack_id = -1;
hsize_t dims[2];
hsize_t dims[2];
const char *FUNC_test_error = "test_error";
H5E_auto2_t old_func;
void *old_data = NULL;
@ -169,7 +169,7 @@ test_error(hid_t file)
return -1;
} /* end test_error() */
/*-------------------------------------------------------------------------
* Function: init_error
*
@ -245,7 +245,7 @@ error:
return -1;
} /* end init_error() */
/*-------------------------------------------------------------------------
* Function: error_stack
*
@ -287,7 +287,7 @@ error:
return -1;
} /* end error_stack() */
/*-------------------------------------------------------------------------
* Function: long_desc_cb
*
@ -309,7 +309,7 @@ long_desc_cb(unsigned H5_ATTR_UNUSED n, const H5E_error2_t *err_desc, void *clie
return -1;
} /* end long_desc_cb() */
/*-------------------------------------------------------------------------
* Function: test_long_desc
*
@ -384,7 +384,7 @@ error:
} /* end test_long_desc() */
#pragma GCC diagnostic pop
/*-------------------------------------------------------------------------
* Function: dump_error
*
@ -414,7 +414,7 @@ error:
return -1;
} /* end dump_error() */
/*-------------------------------------------------------------------------
* Function: custom_print_cb
*
@ -445,8 +445,8 @@ custom_print_cb(unsigned n, const H5E_error2_t *err_desc, void* client_data)
TEST_ERROR;
HDfprintf(stream, "%*serror #%03d: %s in %s(): line %u\n",
indent, "", n, err_desc->file_name,
err_desc->func_name, err_desc->line);
indent, "", n, err_desc->file_name,
err_desc->func_name, err_desc->line);
HDfprintf(stream, "%*sclass: %s\n", indent * 2, "", cls);
HDfprintf(stream, "%*smajor: %s\n", indent * 2, "", maj);
HDfprintf(stream, "%*sminor: %s\n", indent * 2, "", min);
@ -457,7 +457,7 @@ error:
return -1;
} /* end custom_print_cb() */
/*-------------------------------------------------------------------------
* Function: test_create
*
@ -540,11 +540,11 @@ test_copy(void)
err_num = H5Eget_num(H5E_DEFAULT);
if (err_num != 1)
TEST_ERROR
/* Copy error stack, which clears the original */
if ((estack_id = H5Eget_current_stack()) < 0)
TEST_ERROR
/* Check the number of errors on stack copy */
err_num = H5Eget_num(estack_id);
if (err_num != 1)
@ -564,7 +564,7 @@ test_copy(void)
if (err_num != 1)
TEST_ERROR
/* Try to close error stack copy. Should fail because
/* Try to close error stack copy. Should fail because
* the current H5Eset_current_stack closes the stack to be set.
*/
H5E_BEGIN_TRY {
@ -579,7 +579,7 @@ error:
return -1;
} /* end test_copy() */
/*-------------------------------------------------------------------------
* Function: close_error
*
@ -615,17 +615,17 @@ error:
return -1;
} /* end close_error() */
/*-------------------------------------------------------------------------
* Function: test_filter_error
*
* Purpose: Make sure the error message prints out the filter name
* when the existent file is opened but the filter isn't
* registered. The existent file was created with
* gen_filters.c.
* when the existent file is opened but the filter isn't
* registered. The existent file was created with
* gen_filters.c.
*
* Return: Success: 0
* Failure: -1
* Failure: -1
*
*-------------------------------------------------------------------------
*/
@ -663,7 +663,7 @@ error:
return -1;
} /* end test_filter_error() */
/*-------------------------------------------------------------------------
* Function: main
*
@ -745,7 +745,7 @@ main(void)
if (close_error() < 0)
TEST_ERROR;
/* Test error message during data reading when filter isn't registered
/* Test error message during data reading when filter isn't registered
* Use default FAPL to avoid some VFD drivers by the check-vfd test because
* the test file was pre-generated.
*/

View File

@ -15,10 +15,10 @@
* Programmer: Robb Matzke <matzke@llnl.gov>
* Friday, October 23, 1998
*
* Purpose: This is the second half of a two-part test that makes sure
* that a file can be read after an application crashes as long
* as the file was flushed first. This half tries to read the
* file created by the first half.
* Purpose: This is the second half of a two-part test that makes sure
* that a file can be read after an application crashes as long
* as the file was flushed first. This half tries to read the
* file created by the first half.
*/
#include "h5test.h"

View File

@ -57,7 +57,7 @@ const char *FILENAME[] = {
NULL
};
/*-------------------------------------------------------------------------
* Function: test_1
*
@ -68,7 +68,7 @@ const char *FILENAME[] = {
*
* Failure: number of errors
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
*-------------------------------------------------------------------------
@ -165,7 +165,7 @@ error:
return MAX(1, nerrors);
}
/*-------------------------------------------------------------------------
* Function: test_2
*
@ -176,7 +176,7 @@ error:
*
* Failure: number of errors
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
*-------------------------------------------------------------------------
@ -264,7 +264,7 @@ test_2 (hid_t fapl)
return MAX(1, nerrors);
}
/*-------------------------------------------------------------------------
* Function: test_3
*
@ -275,7 +275,7 @@ test_2 (hid_t fapl)
*
* Failure: number of errors
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
*-------------------------------------------------------------------------
@ -353,7 +353,7 @@ test_3 (hid_t fapl)
return MAX(1, nerrors);
}
/*-------------------------------------------------------------------------
* Function: test_4
*
@ -365,7 +365,7 @@ test_3 (hid_t fapl)
*
* Failure: number of errors
*
* Programmer: Robb Matzke
* Programmer: Robb Matzke
* Tuesday, March 31, 1998
*
*-------------------------------------------------------------------------
@ -448,7 +448,7 @@ test_4 (hid_t fapl)
return MAX(1, nerrors);
}
/*-------------------------------------------------------------------------
* Function: test_ooo_indices
*
@ -461,7 +461,7 @@ test_4 (hid_t fapl)
*
* Failure: number of errors
*
* Programmer: Neil Fortner
* Programmer: Neil Fortner
* Monday, October 26, 2009
*
*-------------------------------------------------------------------------
@ -566,7 +566,7 @@ test_ooo_indices(hid_t fapl)
return MAX(1, nerrors);
} /* end test_ooo_indices */
/*-------------------------------------------------------------------------
* Function: main
*
@ -579,8 +579,8 @@ test_ooo_indices(hid_t fapl)
int
main (void)
{
int nerrors = 0;
hid_t fapl_id = H5I_INVALID_HID;
int nerrors = 0;
hid_t fapl_id = H5I_INVALID_HID;
hbool_t api_ctx_pushed = FALSE; /* Whether API context pushed */
h5_reset();

View File

@ -110,7 +110,6 @@ const char *LIBVER_NAMES[] = {
NULL
};
/* Previous error reporting function */
static H5E_auto2_t err_func = NULL;
@ -1983,7 +1982,6 @@ error:
return NULL;
} /* h5_get_dummy_vfd_class */
/*-------------------------------------------------------------------------
* Function: h5_get_dummy_vol_class()
*

View File

@ -6916,7 +6916,6 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
H5FD_mem_t fs_type;
hbool_t contig_addr_vfd;
if(new_format)
TESTING("File's free-space is going away with new library format")
else

View File

@ -14113,7 +14113,7 @@ main(void)
ExpressMode = GetTestExpress();
if (ExpressMode > 1)
printf("***Express test mode on. Some tests may be skipped\n");
HDprintf("***Express test mode on. Some tests may be skipped\n");
/* Copy the file access property list */
if((fapl2 = H5Pcopy(fapl)) < 0) TEST_ERROR
@ -14149,52 +14149,52 @@ main(void)
/* Test with and without shared messages */
if(configuration & CONFIG_SHARE_SRC) {
puts("\nTesting with shared src messages:");
HDputs("\nTesting with shared src messages:");
fcpl_src = fcpl_shared;
}
else {
puts("\nTesting without shared src messages:");
HDputs("\nTesting without shared src messages:");
fcpl_src = H5P_DEFAULT;
}
if(configuration & CONFIG_SHARE_DST) {
puts("Testing with shared dst messages:");
HDputs("Testing with shared dst messages:");
fcpl_dst = fcpl_shared;
same_file = FALSE;
}
else {
puts("Testing without shared dst messages:");
HDputs("Testing without shared dst messages:");
fcpl_dst = H5P_DEFAULT;
}
/* Set the FAPL for the source file's type of format */
if(configuration & CONFIG_SRC_NEW_FORMAT) {
puts("Testing with latest format for source file:");
HDputs("Testing with latest format for source file:");
src_fapl = fapl2;
/* Test with and without dense attributes */
if(configuration & CONFIG_DENSE) {
puts("Testing with dense attributes:");
HDputs("Testing with dense attributes:");
num_attributes_g = max_compact + 1;
}
else {
puts("Testing without dense attributes:");
HDputs("Testing without dense attributes:");
num_attributes_g = MAX(min_dense, 2) - 2;
}
} /* end if */
else {
puts("Testing with oldest file format for source file:");
HDputs("Testing with oldest file format for source file:");
src_fapl = fapl;
num_attributes_g = 4;
} /* end else */
/* Set the FAPL for the destination file's type of format */
if(configuration & CONFIG_DST_NEW_FORMAT) {
puts("Testing with latest format for destination file:");
HDputs("Testing with latest format for destination file:");
dst_fapl = fapl2;
same_file = FALSE;
} /* end if */
else {
puts("Testing with oldest file format for destination file:");
HDputs("Testing with oldest file format for destination file:");
dst_fapl = fapl;
} /* end else */
@ -14365,12 +14365,12 @@ main(void)
/* Results */
if(nerrors) {
printf("***** %d OBJECT COPY TEST%s FAILED! *****\n",
HDprintf("***** %d OBJECT COPY TEST%s FAILED! *****\n",
nerrors, (1 == nerrors ? "" : "S"));
exit(EXIT_FAILURE);
} /* end if */
puts ("All object copying tests passed.");
HDputs ("All object copying tests passed.");
/* close property list.
* NOTE: if this property list is not closed and the test is

View File

@ -1641,7 +1641,7 @@ main(void)
/* Display info about testing */
low_string = h5_get_version_string(low);
high_string = h5_get_version_string(high);
sprintf(msg, "Using file format version: (%s, %s)", low_string,
HDsprintf(msg, "Using file format version: (%s, %s)", low_string,
high_string);
HDputs(msg);
@ -1887,7 +1887,7 @@ main(void)
return 0;
error:
puts("*** TESTS FAILED ***");
HDputs("*** TESTS FAILED ***");
H5E_BEGIN_TRY {
H5Fclose(file);
} H5E_END_TRY;

File diff suppressed because it is too large Load Diff

View File

@ -1898,4 +1898,3 @@ add_prefix(char **prfx, size_t *prfx_len, const char *name)
HDstrcat(HDstrcat(*prfx, "/"), name);
} /* end add_prefix */

View File

@ -247,7 +247,6 @@ usage (void)
}
/*-------------------------------------------------------------------------
* Function: print_string
*

View File

@ -74,14 +74,14 @@ typedef struct iter_t {
ohdr_info_t group_ohdr_info; /* Object header information for groups */
hsize_t max_attrs; /* Maximum attributes from a group */
unsigned long *num_small_attrs; /* Size of small attributes tracked */
unsigned long *num_small_attrs; /* Size of small attributes tracked */
unsigned attr_nbins; /* Number of bins for attribute counts */
unsigned long *attr_bins; /* Pointer to array of bins for attribute counts */
unsigned max_dset_rank; /* Maximum rank of dataset */
unsigned long dset_rank_count[H5S_MAX_RANK]; /* Number of datasets of each rank */
hsize_t max_dset_dims; /* Maximum dimension size of dataset */
unsigned long *small_dset_dims; /* Size of dimensions of small datasets tracked */
unsigned long *small_dset_dims; /* Size of dimensions of small datasets tracked */
unsigned long dset_layouts[H5D_NLAYOUTS]; /* Type of storage for each dataset */
unsigned long dset_comptype[H5_NFILTERS_IMPL]; /* Number of currently implemented filters */
unsigned long dset_ntypes; /* Number of diff. dataset datatypes found */
@ -320,9 +320,9 @@ static void usage(const char *prog)
HDfprintf(stdout, " -s, --freespace Print free space information\n");
HDfprintf(stdout, " -S, --summary Print summary of file space information\n");
HDfprintf(stdout, " --enable-error-stack Prints messages from the HDF5 error stack as they occur\n");
HDfprintf(stdout, " --s3-cred=<cred> Access file on S3, using provided credential\n");
HDfprintf(stdout, " <cred> :: (region,id,key)\n");
HDfprintf(stdout, " If <cred> == \"(,,)\", no authentication is used.\n");
HDfprintf(stdout, " --s3-cred=<cred> Access file on S3, using provided credential\n");
HDfprintf(stdout, " <cred> :: (region,id,key)\n");
HDfprintf(stdout, " If <cred> == \"(,,)\", no authentication is used.\n");
HDfprintf(stdout, " --hdfs-attrs=<attrs> Access a file on HDFS with given configuration\n");
HDfprintf(stdout, " attributes.\n");
HDfprintf(stdout, " <attrs> :: (<namenode name>,<namenode port>,\n");
@ -544,7 +544,8 @@ dataset_stats(iter_t *iter, const char *name, const H5O_info_t *oi)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "attribute_stats() failed");
/* Get storage info */
storage = H5Dget_storage_size(did);
if((storage = H5Dget_storage_size(did)) < 0)
HGOTO_ERROR(FAIL, H5E_tools_min_id_g, "H5Dget_storage_size() failed");
/* Gather layout statistics */
if((dcpl = H5Dget_create_plist(did)) < 0)

View File

@ -1157,3 +1157,13 @@
if (BUILD_SHARED_LIBS)
ADD_H5_UD_TEST (h5dump_plugin_test 0 tudfilter --enable-error-stack tudfilter.h5)
endif ()
##############################################################################
##############################################################################
### V F D T E S T S ###
##############################################################################
##############################################################################
if (HDF5_TEST_VFD)
include (CMakeVFDTests.cmake)
endif ()

View File

@ -0,0 +1,91 @@
#
# Copyright by The HDF Group.
# All rights reserved.
#
# This file is part of HDF5. The full HDF5 copyright notice, including
# terms governing use, modification, and redistribution, is contained in
# the COPYING file, which can be found at the root of the source code
# distribution tree, or in https://support.hdfgroup.org/ftp/HDF5/releases.
# If you do not have access to either file, you may request a copy from
# help@hdfgroup.org.
#
##############################################################################
##############################################################################
### T E S T I N G ###
##############################################################################
##############################################################################
set (VFD_H5DUMP_LIST
sec2
stdio
core
core_paged
split
multi
family
)
if (DIRECT_VFD)
set (VFD_H5DUMP_LIST ${VFD_H5DUMP_LIST} direct)
endif ()
# --------------------------------------------------------------------
# Copy all the HDF5 files from the source directory into the test directory
# --------------------------------------------------------------------
set (HDF5_VFD_H5DUMP_FILES
packedbits
)
foreach (vfdtest ${VFD_H5DUMP_LIST})
file (MAKE_DIRECTORY "${PROJECT_BINARY_DIR}/${vfdname}")
foreach (h5_tfile ${HDF5_VFD_H5DUMP_FILES})
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}.h5" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.h5" "HDF5_VFD_H5DUMP_files")
HDFTEST_COPY_FILE("${HDF5_TOOLS_DIR}/testfiles/${h5_tfile}.ddl" "${PROJECT_BINARY_DIR}/${vfdtest}/${h5_tfile}.ddl" "HDF5_VFD_H5DUMP_files")
endforeach ()
endforeach ()
add_custom_target(HDF5_VFD_H5DUMP_files ALL COMMENT "Copying files needed by HDF5_VFD_H5DUMP tests" DEPENDS ${HDF5_VFD_H5DUMP_files_list})
##############################################################################
##############################################################################
### T H E T E S T S M A C R O S ###
##############################################################################
##############################################################################
if (NOT BUILD_SHARED_LIBS)
set (tgt_ext "")
else ()
set (tgt_ext "-shared")
endif ()
macro (ADD_VFD_H5DUMP_TEST vfdname resultfile resultcode)
if (NOT HDF5_ENABLE_USING_MEMCHECKER)
add_test (
NAME H5DUMP_VFD-${vfdname}-${resultfile}-h5dump
COMMAND "${CMAKE_COMMAND}"
-D "TEST_EMULATOR=${CMAKE_CROSSCOMPILING_EMULATOR}"
-D "TEST_PROGRAM=$<TARGET_FILE:h5dump${tgt_ext}>"
-D "TEST_ARGS:STRING=${ARGN}"
-D "TEST_VFD:STRING=${vfdname}"
-D "TEST_EXPECT=${resultcode}"
-D "TEST_OUTPUT=${resultfile}.out"
-D "TEST_REFERENCE=${resultfile}.ddl"
-D "TEST_FOLDER=${PROJECT_BINARY_DIR}/${vfdname}"
-P "${HDF_RESOURCES_DIR}/vfdTest.cmake"
)
set_tests_properties (H5DUMP_VFD-${vfdname}-${resultfile}-h5dump PROPERTIES TIMEOUT ${CTEST_SHORT_TIMEOUT})
endif ()
endmacro ()
##############################################################################
##############################################################################
### T H E T E S T S ###
##############################################################################
##############################################################################
# Run test with different Virtual File Driver
foreach (vfd ${VFD_H5DUMP_LIST})
# test for signed/unsigned datasets
ADD_VFD_H5DUMP_TEST (${vfd} packedbits 0 --enable-error-stack packedbits.h5)
endforeach ()

View File

@ -1941,7 +1941,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
sprintf(buf, "This is row %d of type H5T_STR_NULLTERM of", i);
sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@ -1954,7 +1954,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
sprintf(buf, "This is row %d of type H5T_STR_NULLTERM of string array", i);
sprintf(buf, "This is row %1d of type H5T_STR_NULLTERM of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@ -1974,7 +1974,7 @@ static void gent_str2(void)
for(i = 0;(hsize_t) i < sdim; i++) {
start[0] = (hsize_t)i;
sprintf(buf, "This is row %d of type H5T_STR_NULLPAD of", i);
sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@ -1988,7 +1988,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
sprintf(buf, "This is row %d of type H5T_STR_NULLPAD of string array", i);
sprintf(buf, "This is row %1d of type H5T_STR_NULLPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf)+1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@ -2007,7 +2007,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
sprintf(buf, "This is row %d of type H5T_STR_SPACEPAD of", i);
sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);
@ -2021,7 +2021,7 @@ static void gent_str2(void)
for(i = 0; (hsize_t)i < sdim; i++) {
start[0] = (hsize_t)i;
sprintf(buf, "This is row %d of type H5T_STR_SPACEPAD of string array", i);
sprintf(buf, "This is row %1d of type H5T_STR_SPACEPAD of string array", i);
H5Tset_size(memtype, HDstrlen(buf) + 1);
H5Sselect_hyperslab(hyper_space, H5S_SELECT_SET, start, stride, count, block);
H5Dwrite(dataset, memtype, mem_space, hyper_space, H5P_DEFAULT, buf);

View File

@ -7,15 +7,25 @@ project (HDF5_TOOLS_TEST_MISC C)
if (HDF5_BUILD_GENERATORS AND NOT ONLY_SHARED_LIBS)
add_executable (h5repart_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5repart_gentest.c)
target_include_directories (h5repart_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5repart_gentest STATIC)
target_link_libraries (h5repart_gentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
if (NOT ONLY_SHARED_LIBS)
TARGET_C_PROPERTIES (h5repart_gentest STATIC)
target_link_libraries (h5repart_gentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
else ()
TARGET_C_PROPERTIES (h5repart_gentest SHARED)
target_link_libraries (h5repart_gentest PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
endif ()
set_target_properties (h5repart_gentest PROPERTIES FOLDER generator/tools)
#add_test (NAME h5repart_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5repart_gentest>)
add_executable (h5clear_gentest ${HDF5_TOOLS_TEST_MISC_SOURCE_DIR}/h5clear_gentest.c)
target_include_directories (h5clear_gentest PRIVATE "${HDF5_SRC_DIR};${HDF5_BINARY_DIR};$<$<BOOL:${HDF5_ENABLE_PARALLEL}>:${MPI_C_INCLUDE_DIRS}>")
TARGET_C_PROPERTIES (h5clear_gentest STATIC)
target_link_libraries (h5clear_gentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
if (NOT ONLY_SHARED_LIBS)
TARGET_C_PROPERTIES (h5clear_gentest STATIC)
target_link_libraries (h5clear_gentest PRIVATE ${HDF5_TOOLS_LIB_TARGET} ${HDF5_TEST_LIB_TARGET})
else ()
TARGET_C_PROPERTIES (h5clear_gentest SHARED)
target_link_libraries (h5clear_gentest PRIVATE ${HDF5_TOOLS_LIBSH_TARGET} ${HDF5_TEST_LIBSH_TARGET})
endif ()
set_target_properties (h5clear_gentest PROPERTIES FOLDER tools)
#add_test (NAME H5CLEAR-h5clear_gentest COMMAND ${CMAKE_CROSSCOMPILING_EMULATOR} $<TARGET_FILE:h5clear_gentest>)