diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/CMakeTests.cmake | 19 | ||||
-rw-r--r-- | test/cache_logging.c | 6 | ||||
-rw-r--r-- | test/cache_tagging.c | 2 | ||||
-rw-r--r-- | test/cmpd_dset.c | 2 | ||||
-rw-r--r-- | test/direct_chunk.c | 10 | ||||
-rw-r--r-- | test/dsets.c | 16 | ||||
-rw-r--r-- | test/evict_on_close.c | 6 | ||||
-rw-r--r-- | test/external_common.h | 5 | ||||
-rw-r--r-- | test/external_env.c | 5 | ||||
-rw-r--r-- | test/fheap.c | 11 | ||||
-rw-r--r-- | test/file_image.c | 2 | ||||
-rw-r--r-- | test/flush1.c | 2 | ||||
-rw-r--r-- | test/flush2.c | 2 | ||||
-rw-r--r-- | test/hyperslab.c | 8 | ||||
-rw-r--r-- | test/links.c | 2 | ||||
-rw-r--r-- | test/page_buffer.c | 4 | ||||
-rw-r--r-- | test/tattr.c | 2 | ||||
-rw-r--r-- | test/tfile.c | 1 | ||||
-rw-r--r-- | test/th5s.c | 1 | ||||
-rw-r--r-- | test/tselect.c | 6 |
20 files changed, 62 insertions, 50 deletions
diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 1e7ddff..3d986d2 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -867,12 +867,19 @@ set_tests_properties (H5TEST-links_env PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST ) -#-- Adding test for libinfo -add_test (NAME H5TEST-testlibinfo - COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}" - WORKING_DIRECTORY - ${HDF5_TEST_BINARY_DIR}/H5TEST -) +if (NOT BUILD_SHARED_LIBS) + #-- Adding test for libinfo + add_test (NAME H5TEST-testlibinfo + COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIB_TARGET}>" -P "${GREP_RUNNER}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) +else () + #-- Adding test for libinfo + add_test (NAME H5TEST-testlibinfo + COMMAND ${CMAKE_COMMAND} -D "TEST_PROGRAM=$<TARGET_FILE:${HDF5_LIBSH_TARGET}>" -P "${GREP_RUNNER}" + WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR}/H5TEST + ) +endif () ############################################################################## ### F I L T E R P L U G I N T E S T S diff --git a/test/cache_logging.c b/test/cache_logging.c index 6fd48d8..c43609b 100644 --- a/test/cache_logging.c +++ b/test/cache_logging.c @@ -43,7 +43,7 @@ test_logging_api(void) hid_t fid = -1; hid_t gid = -1; hbool_t is_currently_logging; - char group_name[8]; + char group_name[12]; char filename[1024]; int i; @@ -111,8 +111,8 @@ test_logging_api(void) /* Perform some manipulations */ for(i = 0; i < N_GROUPS; i++) { - HDmemset(group_name, 0, 8); - HDsnprintf(group_name, 8, "%d", i); + HDmemset(group_name, 0, sizeof(group_name)); + HDsnprintf(group_name, sizeof(group_name), "%d", i); if((gid = H5Gcreate2(fid, group_name, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR; if(H5Gclose(gid) < 0) diff --git a/test/cache_tagging.c b/test/cache_tagging.c index 04fdfce..dd886eb 100644 --- a/test/cache_tagging.c +++ b/test/cache_tagging.c @@ -741,7 +741,7 @@ check_multi_group_creation_tags(void) hid_t fid = -1; /* File Identifier */ hid_t gid = -1; /* Group Identifier */ int verbose = FALSE; /* verbose file outout */ - char gname[10]; /* group name buffer */ + char gname[16]; /* group name buffer */ int i = 0; /* iterator */ hid_t fapl = -1; /* File access prop list */ haddr_t g_tag = 0; /* Group tag value */ diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index a8baeac..1944ce1 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -1808,7 +1808,7 @@ test_pack_ooo(void) unsigned free_order[PACK_NMEMBS]; /* Index of remaining free slots in order */ unsigned num_free; /* Number of free slots in order */ unsigned sub_cmpd_order; /* Order to insert the inner compound */ - char name[6]; /* Member name */ + char name[16]; /* Member name */ unsigned extra_space; /* Whether to add extra space to the end of * the compound */ unsigned i, j; /* Indices */ diff --git a/test/direct_chunk.c b/test/direct_chunk.c index 8de923e..9ea814c 100644 --- a/test/direct_chunk.c +++ b/test/direct_chunk.c @@ -2008,11 +2008,11 @@ error: static int test_single_chunk(unsigned config) { - hid_t fid; /* File ID */ - hid_t fapl; /* File access property list ID */ - hid_t sid; /* Dataspace ID */ - hid_t did; /* Dataset ID */ - hid_t dcpl; /* Dataset creation property list */ + hid_t fid = H5I_INVALID_HID; /* File ID */ + hid_t fapl = H5I_INVALID_HID; /* File access property list ID */ + hid_t sid = H5I_INVALID_HID; /* Dataspace ID */ + hid_t did = H5I_INVALID_HID; /* Dataset ID */ + hid_t dcpl = H5I_INVALID_HID; /* Dataset creation property list */ hsize_t dims[2] = {DIM0, DIM1}; /* Dimension sizes */ hsize_t chunk[2] = {CHUNK0, CHUNK1}; /* Chunk dimension sizes */ hsize_t offset[2] = {0,0}; /* Offset for writing */ diff --git a/test/dsets.c b/test/dsets.c index a317f14..603f785 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -1233,14 +1233,19 @@ test_conv_buffer(hid_t fid) CmpField *cf = NULL; CmpFieldR *cfrR = NULL; - hid_t dataset = -1; /* dataset ID */ - hid_t space = -1; /* data space ID */ - hid_t ctype1, ctype2; /* data type ID */ - hid_t arr_type1, arr_type2, arr_type3, arr_type4, arr_type5; + hid_t dataset = H5I_INVALID_HID; /* dataset ID */ + hid_t space = H5I_INVALID_HID; /* data space ID */ + hid_t ctype1 = H5I_INVALID_HID, + ctype2 = H5I_INVALID_HID; /* data type ID */ + hid_t arr_type1 = H5I_INVALID_HID, + arr_type2 = H5I_INVALID_HID, + arr_type3 = H5I_INVALID_HID, + arr_type4 = H5I_INVALID_HID, + arr_type5 = H5I_INVALID_HID; hsize_t dimsa[3]; hsize_t dimsb[1]; hsize_t dimsc[1]; - hid_t xfer_list; + hid_t xfer_list = H5I_INVALID_HID; size_t size; TESTING("data type conversion buffer size"); @@ -12920,7 +12925,6 @@ test_versionbounds(void) hid_t vspace = -1; /* Virtual dset dataspaces */ hid_t srcdset = -1; /* Source datset */ hid_t vdset = -1; /* Virtual dataset */ - hid_t null_dspace = -1; /* Data space of H5S_NULL */ hsize_t dims[1] = {3}; /* Data space current size */ char srcfilename[FILENAME_BUF_SIZE]; char vfilename1[FILENAME_BUF_SIZE]; diff --git a/test/evict_on_close.c b/test/evict_on_close.c index 9918829..b7d30a9 100644 --- a/test/evict_on_close.c +++ b/test/evict_on_close.c @@ -73,7 +73,7 @@ const char *FILENAMES[] = { #define SUBGROUP_NAME_SIZE 16 /* Prototypes */ -static hbool_t verify_tag_not_in_cache(H5F_t *f, haddr_t tag); +static hbool_t verify_tag_not_in_cache(const H5F_t *f, haddr_t tag); static herr_t check_evict_on_close_api(void); static hid_t generate_eoc_test_file(hid_t fapl_id); static herr_t check_dset_scheme(hid_t fid, const char *dset_name); @@ -90,8 +90,8 @@ static herr_t check_group_layout(hid_t fid, const char *group_name); * *------------------------------------------------------------------------- */ -static hbool_t -verify_tag_not_in_cache(H5F_t *f, haddr_t tag) +static H5_ATTR_PURE hbool_t +verify_tag_not_in_cache(const H5F_t *f, haddr_t tag) { H5C_t *cache_ptr = NULL; /* cache pointer */ int i = 0; /* iterator */ diff --git a/test/external_common.h b/test/external_common.h index cc2b5fb..1e4fe7a 100644 --- a/test/external_common.h +++ b/test/external_common.h @@ -33,11 +33,6 @@ static const char *EXT_FNAME[] = { NULL }; -static const char *EXT_ENV_FNAME[] = { - "extern_env_dir/env_file_1", - NULL -}; - /* A similar collection of files is used for the tests that * perform file I/O. */ diff --git a/test/external_env.c b/test/external_env.c index 55f68be..1bf0cf0 100644 --- a/test/external_env.c +++ b/test/external_env.c @@ -16,6 +16,11 @@ */ #include "external_common.h" +static const char *EXT_ENV_FNAME[] = { + "extern_env_dir/env_file_1", + NULL +}; + /*------------------------------------------------------------------------- * Function: test_path_env diff --git a/test/fheap.c b/test/fheap.c index acf5d0b..557fd37 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -7599,7 +7599,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ unsigned char heap_id[100][MAX_HEAP_ID_LEN]; /* Heap ID for object inserted */ struct a_type_t1 { char a[10]; - char b[29]; + char b[40]; } obj1, obj2; /* Objects to insert/remove */ size_t id_len; /* Size of fractal heap IDs */ fheap_heap_state_t state; /* State of fractal heap */ @@ -7640,14 +7640,14 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ */ TESTING("incremental object insertion and removal") + HDmemset(&obj1, 0, sizeof(obj1)); + HDmemset(&obj2, 0, sizeof(obj2)); for(i = 0; i < 100; i++) { - HDsprintf(obj1.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i); - for(j = 0; j < i; j++) { - HDsprintf(obj2.b, "%s%d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j); - if(H5HF_remove(fh, heap_id[j]) < 0) FAIL_STACK_ERROR + + HDsprintf(obj2.b, "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", j); if(H5HF_insert(fh, (sizeof(obj2)), &obj2, heap_id[j]) < 0) FAIL_STACK_ERROR } /* end for */ @@ -7658,6 +7658,7 @@ test_man_incr_insert_remove(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_ /* Insert object */ HDmemset(heap_id[i], 0, id_len); + HDsprintf(obj1.b, "%s%2d", "ABCDEFGHIJKLMNOPQRSTUVWXYZ", i); if(H5HF_insert(fh, (sizeof(obj1)), &obj1, heap_id[i]) < 0) FAIL_STACK_ERROR } /* end for */ diff --git a/test/file_image.c b/test/file_image.c index 0dba236..86dd13e 100644 --- a/test/file_image.c +++ b/test/file_image.c @@ -580,7 +580,7 @@ test_core(void) file = H5Fopen(copied_filename, H5F_ACC_RDONLY, fapl); VERIFY(file >= 0, "H5Fopen failed"); VERIFY((udata->used_callbacks == MALLOC) || - (udata->used_callbacks == MALLOC | UDATA_COPY | UDATA_FREE), "opening a core file used the wrong callbacks"); + (udata->used_callbacks == (MALLOC | UDATA_COPY | UDATA_FREE)), "opening a core file used the wrong callbacks"); VERIFY(udata->malloc_src == H5FD_FILE_IMAGE_OP_FILE_OPEN, "Malloc callback came from wrong sourc in core open"); /* Close file */ diff --git a/test/flush1.c b/test/flush1.c index fefa8d0..ac5f9ef 100644 --- a/test/flush1.c +++ b/test/flush1.c @@ -73,7 +73,7 @@ create_file(const char *filename, hid_t fapl_id, hbool_t swmr) hid_t fid = -1; /* file ID */ hid_t top_gid = -1; /* containing group ID */ hid_t gid = -1; /* subgroup ID */ - char group_name[16]; /* group name */ + char group_name[32]; /* group name */ unsigned flags; /* file open flags */ int i; /* iterator */ diff --git a/test/flush2.c b/test/flush2.c index 6e8aee7..8ebfb75 100644 --- a/test/flush2.c +++ b/test/flush2.c @@ -135,7 +135,7 @@ file_ok(const char *filename, hid_t fapl_id, hbool_t check_second_dset) hid_t fid = -1; /* file ID */ hid_t top_gid = -1; /* containing group ID */ hid_t gid = -1; /* subgroup ID */ - char group_name[16]; /* group name */ + char group_name[32]; /* group name */ int i; /* iterator */ /* open file */ diff --git a/test/hyperslab.c b/test/hyperslab.c index feb96bd..d8c00c9 100644 --- a/test/hyperslab.c +++ b/test/hyperslab.c @@ -819,12 +819,8 @@ test_transpose(size_t nx, size_t ny) dst_stride[1] = (hsize_t)(nx * sizeof(*src)); /* Copy and transpose */ - if(nx == ny) - H5VM_stride_copy(2, (hsize_t)sizeof(*src), size, dst_stride, dst, - src_stride, src); - else - H5VM_stride_copy(2, (hsize_t)sizeof(*src), size, dst_stride, dst, - src_stride, src); + H5VM_stride_copy(2, (hsize_t)sizeof(*src), size, dst_stride, dst, + src_stride, src); /* Check */ for(i = 0; i < nx; i++) { diff --git a/test/links.c b/test/links.c index 520f784..3166954 100644 --- a/test/links.c +++ b/test/links.c @@ -7759,6 +7759,7 @@ done: case H5I_ERROR_CLASS: case H5I_ERROR_MSG: case H5I_ERROR_STACK: + case H5I_SPACE_SEL_ITER: case H5I_NTYPES: default: return -1; @@ -7847,6 +7848,7 @@ done: case H5I_ERROR_CLASS: case H5I_ERROR_MSG: case H5I_ERROR_STACK: + case H5I_SPACE_SEL_ITER: case H5I_NTYPES: default: return -1; diff --git a/test/page_buffer.c b/test/page_buffer.c index b9b31f8..e11a6d6 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -98,7 +98,7 @@ create_file(char *filename, hid_t fcpl, hid_t fapl) int i; int num_elements; int j; - char dset_name[10]; + char dset_name[32]; if((file_id = H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl)) < 0) FAIL_STACK_ERROR; @@ -235,7 +235,7 @@ open_file(char *filename, hid_t fapl, hsize_t page_size, int i; int j; int num_elements; - char dset_name[10]; + char dset_name[32]; H5F_t *f = NULL; if((file_id = H5Fopen(filename, H5F_ACC_RDONLY, fapl)) < 0) diff --git a/test/tattr.c b/test/tattr.c index b83ed9f..c7a2c23 100644 --- a/test/tattr.c +++ b/test/tattr.c @@ -10065,7 +10065,7 @@ test_attr_bug2(hid_t fcpl, hid_t fapl) hid_t tid; /* Datatype ID */ hid_t gcpl; /* Group creation property list */ hsize_t dims[2] = {10, 100}; /* Attribute dimensions */ - char aname[4]; /* Attribute name */ + char aname[16]; /* Attribute name */ unsigned i; /* index */ herr_t ret; /* Generic return status */ htri_t tri_ret; /* htri_t return status */ diff --git a/test/tfile.c b/test/tfile.c index 140bd14..c15064a 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -1446,6 +1446,7 @@ test_obj_count_and_id(hid_t fid1, hid_t fid2, hid_t did, hid_t gid1, case H5I_ERROR_CLASS: case H5I_ERROR_MSG: case H5I_ERROR_STACK: + case H5I_SPACE_SEL_ITER: case H5I_NTYPES: default: ERROR("H5Fget_obj_ids"); diff --git a/test/th5s.c b/test/th5s.c index 6632a4c..c5dfa97 100644 --- a/test/th5s.c +++ b/test/th5s.c @@ -30,6 +30,7 @@ * This file also needs to access the dataspace testing code. */ #define H5S_FRIEND /*suppress error about including H5Spkg */ +#define H5S_TESTING /*suppress warning about H5S testing funcs*/ #include "H5Spkg.h" /* Dataspaces */ /* diff --git a/test/tselect.c b/test/tselect.c index d912df5..ad435cb 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -10546,7 +10546,7 @@ test_shape_same_dr__full_space_vs_slice(int test_num, hbool_t expected_result) { char test_desc_0[128]; - char test_desc_1[128]; + char test_desc_1[256]; int i; hid_t n_cube_0_sid; /* the fully selected hyper cube */ hid_t n_cube_1_sid; /* the hyper cube in which a slice is selected */ @@ -10831,7 +10831,7 @@ test_shape_same_dr__checkerboard(int test_num, hbool_t expected_result) { char test_desc_0[128]; - char test_desc_1[128]; + char test_desc_1[256]; int i; int dims_selected = 0; hid_t n_cube_0_sid; /* the checker board selected @@ -11443,7 +11443,7 @@ test_shape_same_dr__irregular(int test_num, hbool_t expected_result) { char test_desc_0[128]; - char test_desc_1[128]; + char test_desc_1[256]; int edge_size = 10; int i; int j; |