summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-03-31 10:43:03 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-03-31 10:43:03 (GMT)
commit816a12f04f5853a8d295791dab98eebec057452b (patch)
tree671d947c0a921b5b3c845bf622cc42542447e414
parentc36b707578211b2aa193454625955d53546780ef (diff)
parenta46f31c2eb436e946639bb32518ce279507fa368 (diff)
downloadhdf5-816a12f04f5853a8d295791dab98eebec057452b.zip
hdf5-816a12f04f5853a8d295791dab98eebec057452b.tar.gz
hdf5-816a12f04f5853a8d295791dab98eebec057452b.tar.bz2
Merge branch 'develop' into tools_vol_update
-rw-r--r--test/tmisc.c88
-rw-r--r--tools/src/h5ls/h5ls.c2
2 files changed, 35 insertions, 55 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index 539a027..6eb6872 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -5700,7 +5700,17 @@ test_misc35(void)
{
hid_t sid = H5I_INVALID_HID; /* Dataspace ID */
hsize_t dims[] = {MISC35_SPACE_DIM1, MISC35_SPACE_DIM2, MISC35_SPACE_DIM3}; /* Dataspace dims */
- hsize_t coord[MISC35_NPOINTS][MISC35_SPACE_RANK]; /* Coordinates for point selection */
+ hsize_t coord[MISC35_NPOINTS][MISC35_SPACE_RANK] = /* Coordinates for point selection */
+ {{0,10, 5},
+ {1, 2, 7},
+ {2, 4, 9},
+ {0, 6,11},
+ {1, 8,13},
+ {2,12, 0},
+ {0,14, 2},
+ {1, 0, 4},
+ {2, 1, 6},
+ {0, 3, 8}};
size_t reg_size_start; /* Initial amount of regular memory allocated */
size_t arr_size_start; /* Initial amount of array memory allocated */
size_t blk_size_start; /* Initial amount of block memory allocated */
@@ -5721,16 +5731,6 @@ test_misc35(void)
CHECK(sid, H5I_INVALID_HID, "H5Screate_simple");
/* Select sequence of ten points */
- coord[0][0]=0; coord[0][1]=10; coord[0][2]= 5;
- coord[1][0]=1; coord[1][1]= 2; coord[1][2]= 7;
- coord[2][0]=2; coord[2][1]= 4; coord[2][2]= 9;
- coord[3][0]=0; coord[3][1]= 6; coord[3][2]=11;
- coord[4][0]=1; coord[4][1]= 8; coord[4][2]=13;
- coord[5][0]=2; coord[5][1]=12; coord[5][2]= 0;
- coord[6][0]=0; coord[6][1]=14; coord[6][2]= 2;
- coord[7][0]=1; coord[7][1]= 0; coord[7][2]= 4;
- coord[8][0]=2; coord[8][1]= 1; coord[8][2]= 6;
- coord[9][0]=0; coord[9][1]= 3; coord[9][2]= 8;
ret = H5Sselect_elements(sid, H5S_SELECT_SET, (size_t)MISC35_NPOINTS, (const hsize_t *)coord);
CHECK(ret, FAIL, "H5Sselect_elements");
@@ -5745,24 +5745,16 @@ test_misc35(void)
#if !defined H5_USING_MEMCHECKER
/* All the free list values should be >0 */
- if(0 == reg_size_start)
- ERROR("reg_size_start == 0");
- if(0 == arr_size_start)
- ERROR("arr_size_start == 0");
- if(0 == blk_size_start)
- ERROR("blk_size_start == 0");
- if(0 == fac_size_start)
- ERROR("fac_size_start == 0");
+ CHECK(reg_size_start, 0, "H5get_free_list_sizes");
+ CHECK(arr_size_start, 0, "H5get_free_list_sizes");
+ CHECK(blk_size_start, 0, "H5get_free_list_sizes");
+ CHECK(fac_size_start, 0, "H5get_free_list_sizes");
#else /* H5_MEMORY_ALLOC_SANITY_CHECK */
/* All the values should be == 0 */
- if(0 != reg_size_start)
- ERROR("reg_size_start != 0");
- if(0 != arr_size_start)
- ERROR("arr_size_start != 0");
- if(0 != blk_size_start)
- ERROR("blk_size_start != 0");
- if(0 != fac_size_start)
- ERROR("fac_size_start != 0");
+ VERIFY(reg_size_start, 0, "H5get_free_list_sizes");
+ VERIFY(arr_size_start, 0, "H5get_free_list_sizes");
+ VERIFY(blk_size_start, 0, "H5get_free_list_sizes");
+ VERIFY(fac_size_start, 0, "H5get_free_list_sizes");
#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */
/* Garbage collect the free lists */
@@ -5789,36 +5781,22 @@ test_misc35(void)
#if defined H5_MEMORY_ALLOC_SANITY_CHECK
/* All the values should be >0 */
- if(0 == alloc_stats.total_alloc_bytes)
- ERROR("alloc_stats.total_alloc_bytes == 0");
- if(0 == alloc_stats.curr_alloc_bytes)
- ERROR("alloc_stats.curr_alloc_bytes == 0");
- if(0 == alloc_stats.peak_alloc_bytes)
- ERROR("alloc_stats.peak_alloc_bytes == 0");
- if(0 == alloc_stats.max_block_size)
- ERROR("alloc_stats.max_block_size == 0");
- if(0 == alloc_stats.total_alloc_blocks_count)
- ERROR("alloc_stats.total_alloc_blocks_count == 0");
- if(0 == alloc_stats.curr_alloc_blocks_count)
- ERROR("alloc_stats.curr_alloc_blocks_count == 0");
- if(0 == alloc_stats.peak_alloc_blocks_count)
- ERROR("alloc_stats.peak_alloc_blocks_count == 0");
+ CHECK(alloc_stats.total_alloc_bytes, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.curr_alloc_bytes, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.peak_alloc_bytes, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.max_block_size, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.total_alloc_blocks_count, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.curr_alloc_blocks_count, 0, "H5get_alloc_stats");
+ CHECK(alloc_stats.peak_alloc_blocks_count, 0, "H5get_alloc_stats");
#else /* H5_MEMORY_ALLOC_SANITY_CHECK */
/* All the values should be == 0 */
- if(0 != alloc_stats.total_alloc_bytes)
- ERROR("alloc_stats.total_alloc_bytes != 0");
- if(0 != alloc_stats.curr_alloc_bytes)
- ERROR("alloc_stats.curr_alloc_bytes != 0");
- if(0 != alloc_stats.peak_alloc_bytes)
- ERROR("alloc_stats.peak_alloc_bytes != 0");
- if(0 != alloc_stats.max_block_size)
- ERROR("alloc_stats.max_block_size != 0");
- if(0 != alloc_stats.total_alloc_blocks_count)
- ERROR("alloc_stats.total_alloc_blocks_count != 0");
- if(0 != alloc_stats.curr_alloc_blocks_count)
- ERROR("alloc_stats.curr_alloc_blocks_count != 0");
- if(0 != alloc_stats.peak_alloc_blocks_count)
- ERROR("alloc_stats.peak_alloc_blocks_count != 0");
+ VERIFY(alloc_stats.total_alloc_bytes, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.curr_alloc_bytes, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.peak_alloc_bytes, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.max_block_size, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.total_alloc_blocks_count, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.curr_alloc_blocks_count, 0, "H5get_alloc_stats");
+ VERIFY(alloc_stats.peak_alloc_blocks_count, 0, "H5get_alloc_stats");
#endif /* H5_MEMORY_ALLOC_SANITY_CHECK */
} /* end test_misc35() */
diff --git a/tools/src/h5ls/h5ls.c b/tools/src/h5ls/h5ls.c
index a18b6c6..16e6a4c 100644
--- a/tools/src/h5ls/h5ls.c
+++ b/tools/src/h5ls/h5ls.c
@@ -3006,6 +3006,8 @@ main(int argc, const char *argv[])
}
else if (!HDstrncmp(argv[argno], "--s3-cred=", (size_t)10)) {
#ifdef H5_HAVE_ROS3_VFD
+ char const *start = NULL;
+
start = strchr(argv[argno], '=');
if (start == NULL) {
HDfprintf(rawerrorstream, "Error: Unable to parse null credentials tuple\n"