summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/big.c6
-rw-r--r--test/chunk_info.c17
-rw-r--r--test/dtypes.c80
-rw-r--r--test/earray.c29
-rw-r--r--test/farray.c12
-rw-r--r--test/fheap.c1853
-rw-r--r--test/fillval.c18
-rw-r--r--test/filter_plugin1_dsets.c16
-rw-r--r--test/filter_plugin2_dsets.c18
-rw-r--r--test/filter_plugin3_dsets.c16
-rw-r--r--test/filter_plugin4_groups.c18
-rw-r--r--test/freespace.c15
-rw-r--r--test/gen_new_array.c2
-rw-r--r--test/gen_new_fill.c2
-rw-r--r--test/gen_new_group.c2
-rw-r--r--test/gen_new_mtime.c2
-rw-r--r--test/gen_new_super.c2
-rw-r--r--test/gen_old_array.c2
-rw-r--r--test/gen_old_group.c2
-rw-r--r--test/gen_old_layout.c2
-rw-r--r--test/gen_old_mtime.c2
-rw-r--r--test/gen_plist.c2
-rw-r--r--test/gen_sizes_lheap.c2
-rw-r--r--test/gen_specmetaread.c2
-rw-r--r--test/gen_udlinks.c2
-rw-r--r--test/hyperslab.c4
-rw-r--r--test/links_env.c4
-rw-r--r--test/mf.c100
-rw-r--r--test/mount.c54
-rw-r--r--test/mtime.c4
-rw-r--r--test/ntypes.c228
-rw-r--r--test/pool.c14
-rw-r--r--test/reserved.c6
-rw-r--r--test/ros3.c105
-rw-r--r--test/s3comms.c118
-rw-r--r--test/set_extent.c10
-rw-r--r--test/space_overflow.c2
-rw-r--r--test/stab.c10
-rw-r--r--test/tarray.c46
-rw-r--r--test/tattr.c57
-rw-r--r--test/tchecksum.c2
-rw-r--r--test/tcoords.c20
-rw-r--r--test/testerror.sh.in6
-rw-r--r--test/testexternal_env.sh.in8
-rw-r--r--test/testflushrefresh.sh.in16
-rw-r--r--test/testframe.c12
-rw-r--r--test/testlinks_env.sh.in4
-rw-r--r--test/testmeta.c4
-rw-r--r--test/testvds_env.sh.in4
-rw-r--r--test/tselect.c32
-rw-r--r--test/tunicode.c8
-rw-r--r--test/tvlstr.c25
-rw-r--r--test/tvltypes.c144
-rw-r--r--test/twriteorder.c20
-rw-r--r--test/unlink.c6
-rw-r--r--test/use_append_chunk.c10
-rw-r--r--test/use_append_chunk_mirror.c10
-rw-r--r--test/use_append_mchunks.c20
-rw-r--r--test/use_common.c14
-rw-r--r--test/use_disable_mdc_flushes.c10
-rw-r--r--test/vds.c2
-rw-r--r--test/vds_env.c2
62 files changed, 1585 insertions, 1680 deletions
diff --git a/test/big.c b/test/big.c
index 989e4bc..36fb27d 100644
--- a/test/big.c
+++ b/test/big.c
@@ -429,7 +429,7 @@ writer(char *filename, hid_t fapl, fsizes_t testsize, int wrt_n)
for (i = 0; i < wrt_n; i++) {
/* start position must be at least hs_size from the end */
hs_start[0] = randll(size2[0] - hs_size[0], i);
- HDfprintf(out, "#%03d 0x%016Hx\n", i, hs_start[0]);
+ HDfprintf(out, "#%03d 0x%016" PRIxHSIZE "\n", i, hs_start[0]);
if (H5Sselect_hyperslab(space2, H5S_SELECT_SET, hs_start, NULL, hs_size, NULL) < 0)
goto error;
for (j = 0; j < WRT_SIZE; j++) {
@@ -524,7 +524,7 @@ reader(char *filename, hid_t fapl)
break;
i = (int)HDstrtol(ln + 1, &s, 10);
hs_offset[0] = HDstrtoull(s, NULL, 0);
- HDfprintf(stdout, "#%03d 0x%016Hx%47s", i, hs_offset[0], "");
+ HDfprintf(stdout, "#%03d 0x%016" PRIxHSIZE "%47s", i, hs_offset[0], "");
HDfflush(stdout);
if (H5Sselect_hyperslab(fspace, H5S_SELECT_SET, hs_offset, NULL, hs_size, NULL) < 0)
@@ -605,7 +605,7 @@ usage(void)
"\t-c\tFile system Checking skipped. Caution: this test generates\n"
"\t\tmany big files and may fill up the file system.\n"
"\t-fsize\tChange family size default to <fsize> where <fsize> is\n"
- "\t\ta positive float point number. Default value is %Hu.\n"
+ "\t\ta positive float point number. Default value is %" PRIuHSIZE ".\n"
"Examples:\n"
"\tbig -fsize 2.1e9 \t# test with file size just under 2GB\n"
"\tbig -fsize 2.2e9 \t# test with file size just above 2GB\n"
diff --git a/test/chunk_info.c b/test/chunk_info.c
index 4a661eb..ada2d80 100644
--- a/test/chunk_info.c
+++ b/test/chunk_info.c
@@ -127,7 +127,7 @@ void reinit_vars(unsigned *read_flt_msk, haddr_t *addr, hsize_t *size);
static int verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type,
hsize_t exp_num_chunks);
static int verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_chk_size,
- hsize_t *exp_offset, unsigned exp_flt_msk);
+ const hsize_t *exp_offset, unsigned exp_flt_msk);
static int verify_get_chunk_info_by_coord(hid_t dset, hsize_t *offset, hsize_t exp_chk_size,
unsigned exp_flt_msk);
static int verify_empty_chunk_info(hid_t dset, hsize_t *offset);
@@ -169,8 +169,8 @@ reinit_vars(unsigned *read_flt_msk, haddr_t *addr, hsize_t *size)
*-------------------------------------------------------------------------
*/
static int
-verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_chk_size, hsize_t *exp_offset,
- unsigned exp_flt_msk)
+verify_get_chunk_info(hid_t dset, hid_t dspace, hsize_t chk_index, hsize_t exp_chk_size,
+ const hsize_t *exp_offset, unsigned exp_flt_msk)
{
unsigned read_flt_msk = 0; /* Read filter mask */
hsize_t out_offset[2] = {0, 0}; /* Buffer to get offset coordinates */
@@ -302,7 +302,7 @@ index_type_str(H5D_chunk_index_t idx_type)
*-------------------------------------------------------------------------
*/
static int
-verify_selected_chunks(hid_t dset, hid_t plist, hsize_t *start, hsize_t *end)
+verify_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsize_t *end)
{
int read_buf[CHUNK_NX][CHUNK_NY];
int expected_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Expected data */
@@ -335,8 +335,9 @@ verify_selected_chunks(hid_t dset, hid_t plist, hsize_t *start, hsize_t *end)
/* Verify that read chunk is the same as the corresponding written one */
if (HDmemcmp(expected_buf[chk_index], read_buf, CHUNK_NX * CHUNK_NY) != 0) {
- HDfprintf(stderr, "Read chunk differs from written chunk at offset (%d,%d)\n", offset[0],
- offset[1]);
+ HDfprintf(stderr,
+ "Read chunk differs from written chunk at offset (%" PRIuHSIZE ",%" PRIuHSIZE ")\n",
+ offset[0], offset[1]);
return FAIL;
}
}
@@ -363,7 +364,7 @@ error:
*-------------------------------------------------------------------------
*/
static int
-write_selected_chunks(hid_t dset, hid_t plist, hsize_t *start, hsize_t *end, unsigned flt_msk)
+write_selected_chunks(hid_t dset, hid_t plist, const hsize_t *start, const hsize_t *end, unsigned flt_msk)
{
int direct_buf[NUM_CHUNKS][CHUNK_NX][CHUNK_NY]; /* Data in chunks */
hsize_t offset[2]; /* Offset coordinates of a chunk */
@@ -420,7 +421,7 @@ verify_idx_nchunks(hid_t dset, hid_t dspace, H5D_chunk_index_t exp_idx_type, hsi
/* Ensure the correct chunk indexing scheme is used */
if (idx_type != exp_idx_type) {
char msg[256];
- sprintf(msg, "Should be using %s.\n", index_type_str(idx_type));
+ HDsprintf(msg, "Should be using %s.\n", index_type_str(idx_type));
FAIL_PUTS_ERROR(msg);
}
diff --git a/test/dtypes.c b/test/dtypes.c
index 58b8b26..626c58c 100644
--- a/test/dtypes.c
+++ b/test/dtypes.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, December 9, 1997
*
* Purpose: Tests the datatype interface (H5T)
@@ -1183,7 +1183,7 @@ test_compound_5(void)
H5Tclose(int_array);
/* Check results */
- if (HDmemcmp(src[1].name, dst[1].name, sizeof(src[1].name)) || src[1].tdim != dst[1].tdim ||
+ if (HDmemcmp(src[1].name, dst[1].name, sizeof(src[1].name)) != 0 || src[1].tdim != dst[1].tdim ||
src[1].coll_ids[0] != dst[1].coll_ids[0] || src[1].coll_ids[1] != dst[1].coll_ids[1] ||
src[1].coll_ids[2] != dst[1].coll_ids[2] || src[1].coll_ids[3] != dst[1].coll_ids[3]) {
H5_FAILED();
@@ -1482,10 +1482,10 @@ test_compound_8(void)
int b;
} s1;
- typedef struct s2 {
+ struct s2 {
char c;
s1 d;
- } s2;
+ };
hid_t tid1, tid1_copy, tid2, tid2_copy, tid3, arr_tid;
size_t tsize;
hsize_t dims[1] = {ARRAY_DIM};
@@ -1868,7 +1868,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str)) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
@@ -1942,7 +1942,7 @@ test_compound_9(void)
goto error;
} /* end if */
- if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || strcmp(rdata.str, wdata.str)) {
+ if (rdata.i1 != wdata.i1 || rdata.i2 != wdata.i2 || HDstrcmp(rdata.str, wdata.str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
@@ -2132,7 +2132,7 @@ test_compound_10(void)
for (i = 0; i < ARRAY_DIM; i++) {
if (rdata[i].i1 != wdata[i].i1 || rdata[i].i2 != wdata[i].i2 ||
- HDstrcmp(rdata[i].str, wdata[i].str)) {
+ HDstrcmp(rdata[i].str, wdata[i].str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
@@ -2148,7 +2148,7 @@ test_compound_10(void)
t1 = rdata[i].text.p;
t2 = wdata[i].text.p;
- if (strcmp((char *)t1, (char *)t2)) {
+ if (HDstrcmp((char *)t1, (char *)t2) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect VL read data\n");
@@ -2333,7 +2333,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1)) {
+ else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
@@ -2384,7 +2384,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1)) {
+ else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
@@ -2425,7 +2425,7 @@ test_compound_11(void)
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
} /* end if */
- else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1)) {
+ else if (HDstrcmp(((big_t *)buf_orig)[u].s1, ((little_t *)buf)[u].s1) != 0) {
HDprintf("Error, line #%d: buf_orig[%u].s1=%s, buf[%u].s1=%s\n", __LINE__, (unsigned)u,
((big_t *)buf_orig)[u].s1, (unsigned)u, ((little_t *)buf)[u].s1);
TEST_ERROR
@@ -2556,7 +2556,7 @@ test_compound_12(void)
H5E_END_TRY;
if (ret >= 0) {
H5_FAILED();
- puts(" Tries to cut off the last member. Should have failed.");
+ HDputs(" Tries to cut off the last member. Should have failed.");
goto error;
}
@@ -3010,14 +3010,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str)) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3108,14 +3108,14 @@ test_compound_14(void)
goto error;
} /* end if */
- if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || strcmp(rdata1.str, wdata1.str)) {
+ if (rdata1.c1 != wdata1.c1 || rdata1.c2 != wdata1.c2 || HDstrcmp(rdata1.str, wdata1.str) != 0) {
H5_FAILED();
AT();
HDprintf("incorrect read data\n");
goto error;
} /* end if */
- if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) ||
+ if (rdata2.c1 != wdata2.c1 || rdata2.c2 != wdata2.c2 || HDstrcmp(rdata2.str, wdata2.str) != 0 ||
rdata2.l1 != wdata2.l1 || rdata2.l2 != wdata2.l2 || rdata2.l3 != wdata2.l3 ||
rdata2.l4 != wdata2.l4) {
H5_FAILED();
@@ -3957,7 +3957,7 @@ test_query(void)
HDprintf("Can't get name for enum member\n");
goto error;
} /* end if */
- if (strcmp("YELLOW", enum_name)) {
+ if (HDstrcmp("YELLOW", enum_name) != 0) {
H5_FAILED();
HDprintf("Incorrect name for enum member\n");
goto error;
@@ -4597,14 +4597,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0abcd\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated C-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0\0\0\0\0\0abcd\0\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended C-string test failed");
goto error;
@@ -4628,14 +4628,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated C buffer test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended C buffer test failed");
goto error;
@@ -4659,14 +4659,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdeabcdeabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Truncated Fortran-string test failed");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde abcde ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde abcde ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Extended Fortran-string test failed");
goto error;
@@ -4693,7 +4693,7 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 1");
goto error;
@@ -4704,7 +4704,7 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0abcd\0abcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 2");
goto error;
@@ -4712,7 +4712,7 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdeabcdexxxxxxxxxx", (size_t)20);
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Non-terminated string test 2");
goto error;
@@ -4736,14 +4736,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghi\0abcdefghi\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghi abcdefghi ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghi abcdefghi ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghi\0abcdefghi\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 1");
goto error;
@@ -4755,14 +4755,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 2");
goto error;
@@ -4778,14 +4778,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd abcd ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C string to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C string test 3");
goto error;
@@ -4809,14 +4809,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefghijabcdefghij", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 1");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdefghijabcdefghij", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 1");
goto error;
@@ -4828,14 +4828,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcdefgh\0\0abcdefgh\0\0", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcdeabcdeabcdefgh\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 2");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20)) {
+ if (HDmemcmp(buf, "abcde\0\0\0\0\0abcde\0\0\0\0\0", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 2");
goto error;
@@ -4851,14 +4851,14 @@ test_conv_str_1(void)
HDmemcpy(buf, "abcd\0abcd\0xxxxxxxxxx", (size_t)20);
if (H5Tconvert(src_type, dst_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd abcd ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" C buffer to Fortran test 3");
goto error;
}
if (H5Tconvert(dst_type, src_type, (size_t)2, buf, NULL, H5P_DEFAULT) < 0)
goto error;
- if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20)) {
+ if (HDmemcmp(buf, "abcd\0abcd\0abcd ", (size_t)20) != 0) {
H5_FAILED();
HDputs(" Fortran to C buffer test 3");
goto error;
@@ -7373,7 +7373,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR
- if (HDstrcmp(tag, tag_ret))
+ if (HDstrcmp(tag, tag_ret) != 0)
TEST_ERROR
H5free_memory(tag_ret);
tag_ret = NULL;
@@ -7389,7 +7389,7 @@ test_named_indirect_reopen(hid_t fapl)
TEST_ERROR
if (NULL == (tag_ret = H5Tget_tag(type)))
TEST_ERROR
- if (HDstrcmp(tag, tag_ret))
+ if (HDstrcmp(tag, tag_ret) != 0)
TEST_ERROR
H5free_memory(tag_ret);
tag_ret = NULL;
diff --git a/test/earray.c b/test/earray.c
index fc0b87e..bf7dcf3 100644
--- a/test/earray.c
+++ b/test/earray.c
@@ -332,52 +332,63 @@ check_stats(const H5EA_t *ea, const earray_state_t *state)
/* Compare information */
if (earray_stats.stored.max_idx_set != state->max_idx_set) {
- HDfprintf(stdout, "earray_stats.stored.max_idx_set = %Hu, state->max_idx_set = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.max_idx_set = %" PRIuHSIZE ", state->max_idx_set = %" PRIuHSIZE "\n",
earray_stats.stored.max_idx_set, state->max_idx_set);
TEST_ERROR
} /* end if */
if (earray_stats.stored.nelmts != state->nelmts) {
- HDfprintf(stdout, "earray_stats.stored.nelmts = %Hu, state->nelmts = %Hu\n",
+ HDfprintf(stdout, "earray_stats.stored.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
earray_stats.stored.nelmts, state->nelmts);
TEST_ERROR
} /* end if */
if (earray_stats.computed.hdr_size != state->hdr_size) {
- HDfprintf(stdout, "earray_stats.computed.hdr_size = %Hu, state->hdr_size = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.computed.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
earray_stats.computed.hdr_size, state->hdr_size);
TEST_ERROR
} /* end if */
if (earray_stats.computed.nindex_blks != state->nindex_blks) {
- HDfprintf(stdout, "earray_stats.computed.nindex_blks = %Hu, state->nindex_blks = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.computed.nindex_blks = %" PRIuHSIZE ", state->nindex_blks = %" PRIuHSIZE "\n",
earray_stats.computed.nindex_blks, state->nindex_blks);
TEST_ERROR
} /* end if */
if (earray_stats.computed.index_blk_size != state->index_blk_size) {
- HDfprintf(stdout, "earray_stats.computed.index_blk_size = %Hu, state->index_blk_size = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.computed.index_blk_size = %" PRIuHSIZE ", state->index_blk_size = %" PRIuHSIZE
+ "\n",
earray_stats.computed.index_blk_size, state->index_blk_size);
TEST_ERROR
} /* end if */
if (earray_stats.stored.ndata_blks != state->ndata_blks) {
- HDfprintf(stdout, "earray_stats.stored.ndata_blks = %Hu, state->ndata_blks = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.ndata_blks = %" PRIuHSIZE ", state->ndata_blks = %" PRIuHSIZE "\n",
earray_stats.stored.ndata_blks, state->ndata_blks);
TEST_ERROR
} /* end if */
/* Don't compare this currently, it's very hard to compute */
#ifdef NOT_YET
if (earray_stats.stored.data_blk_size != state->data_blk_size) {
- HDfprintf(stdout, "earray_stats.stored.data_blk_size = %Hu, state->data_blk_size = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.data_blk_size = %" PRIuHSIZE ", state->data_blk_size = %" PRIuHSIZE
+ "\n",
earray_stats.stored.data_blk_size, state->data_blk_size);
TEST_ERROR
} /* end if */
#endif /* NOT_YET */
if (earray_stats.stored.nsuper_blks != state->nsuper_blks) {
- HDfprintf(stdout, "earray_stats.stored.nsuper_blks = %Hu, state->nsuper_blks = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.nsuper_blks = %" PRIuHSIZE ", state->nsuper_blks = %" PRIuHSIZE "\n",
earray_stats.stored.nsuper_blks, state->nsuper_blks);
TEST_ERROR
} /* end if */
/* Don't compare this currently, it's very hard to compute */
#ifdef NOT_YET
if (earray_stats.stored.super_blk_size != state->super_blk_size) {
- HDfprintf(stdout, "earray_stats.stored.super_blk_size = %Hu, state->super_blk_size = %Hu\n",
+ HDfprintf(stdout,
+ "earray_stats.stored.super_blk_size = %" PRIuHSIZE ", state->super_blk_size = %" PRIuHSIZE
+ "\n",
earray_stats.stored.super_blk_size, state->super_blk_size);
TEST_ERROR
} /* end if */
diff --git a/test/farray.c b/test/farray.c
index 81f839f..bb5e3fc 100644
--- a/test/farray.c
+++ b/test/farray.c
@@ -178,20 +178,20 @@ check_stats(const H5FA_t *fa, const farray_state_t *state)
/* Compare information */
if (farray_stats.hdr_size != state->hdr_size) {
- HDfprintf(stdout, "farray_stats.hdr_size = %Hu, state->hdr_size = %Hu\n", farray_stats.hdr_size,
- state->hdr_size);
+ HDfprintf(stdout, "farray_stats.hdr_size = %" PRIuHSIZE ", state->hdr_size = %" PRIuHSIZE "\n",
+ farray_stats.hdr_size, state->hdr_size);
TEST_ERROR
}
if (farray_stats.dblk_size != state->dblk_size) {
- HDfprintf(stdout, "farray_stats.dblk_size = %Hu, state->dblk_size = %Hu\n", farray_stats.dblk_size,
- state->dblk_size);
+ HDfprintf(stdout, "farray_stats.dblk_size = %" PRIuHSIZE ", state->dblk_size = %" PRIuHSIZE "\n",
+ farray_stats.dblk_size, state->dblk_size);
TEST_ERROR
}
if (farray_stats.nelmts != state->nelmts) {
- HDfprintf(stdout, "farray_stats.nelmts = %Hu, state->nelmts = %Hu\n", farray_stats.nelmts,
- state->nelmts);
+ HDfprintf(stdout, "farray_stats.nelmts = %" PRIuHSIZE ", state->nelmts = %" PRIuHSIZE "\n",
+ farray_stats.nelmts, state->nelmts);
TEST_ERROR
}
diff --git a/test/fheap.c b/test/fheap.c
index e8cde89..cb9c080 100644
--- a/test/fheap.c
+++ b/test/fheap.c
@@ -69,20 +69,22 @@
/* #define ALL_INSERT_TESTS */
/* Heap metadata macros */
-#define MAX_HEAP_ID_LEN 64 /* Max. # of bytes to use for heap ID */
-#define HEAP_ID_LEN 7 /* # of bytes to use for heap ID */
-#define SMALL_HEAP_ID_LEN 7 /* # of bytes to use for "small" heap's IDs */
-#define LARGE_HEAP_ID_LEN 12 /* # of bytes to use for "large" heap's IDs */
-#define HEAP_MAX_ROOT_ROWS(fh) H5HF_get_max_root_rows(fh) /* Max. # of rows in root indirect block */
-#define DTABLE_WIDTH(fh) H5HF_get_dtable_width_test(fh) /* Width of doubling table for heap */
-#define DTABLE_MAX_DROWS(fh) \
- H5HF_get_dtable_max_drows_test(fh) /* Max. # of direct block rows in any indirect block */
-#define IBLOCK_MAX_DROWS(fh, pos) \
- H5HF_get_iblock_max_drows_test(fh, pos) /* Max. # of direct block rows in a indirect block */
-#define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r) /* Size of a direct block in a given row */
-#define DBLOCK_FREE(fh, r) \
- H5HF_get_dblock_free_test(fh, r) /* Free space in a direct block of a given row \
- */
+#define MAX_HEAP_ID_LEN 64 /* Max. # of bytes to use for heap ID */
+#define HEAP_ID_LEN 7 /* # of bytes to use for heap ID */
+#define SMALL_HEAP_ID_LEN 7 /* # of bytes to use for "small" heap's IDs */
+#define LARGE_HEAP_ID_LEN 12 /* # of bytes to use for "large" heap's IDs */
+/* Max. # of rows in root indirect block */
+#define HEAP_MAX_ROOT_ROWS(fh) H5HF_get_max_root_rows(fh)
+/* Width of doubling table for heap */
+#define DTABLE_WIDTH(fh) H5HF_get_dtable_width_test(fh)
+/* Max. # of direct block rows in any indirect block */
+#define DTABLE_MAX_DROWS(fh) H5HF_get_dtable_max_drows_test(fh)
+/* Max. # of direct block rows in a indirect block */
+#define IBLOCK_MAX_DROWS(fh, pos) H5HF_get_iblock_max_drows_test(fh, pos)
+/* Size of a direct block in a given row */
+#define DBLOCK_SIZE(fh, r) H5HF_get_dblock_size_test(fh, r)
+/* Free space in a direct block of a given row */
+#define DBLOCK_FREE(fh, r) H5HF_get_dblock_free_test(fh, r)
/* The number of settings for testing: page buffering, file space strategy and persisting free-space */
#define NUM_PB_FS 6
@@ -176,16 +178,16 @@ static int del_objs(H5F_t *f, H5HF_t **fh, fheap_test_param_t *tparam, fheap_hea
fheap_heap_ids_t *keep_ids);
/*-------------------------------------------------------------------------
- * Function: init_small_cparam
+ * Function: init_small_cparam
*
- * Purpose: Initialize heap creation parameter structure with small
+ * Purpose: Initialize heap creation parameter structure with small
* settings
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -212,16 +214,16 @@ init_small_cparam(H5HF_create_t *cparam)
} /* init_small_cparam() */
/*-------------------------------------------------------------------------
- * Function: init_large_cparam
+ * Function: init_large_cparam
*
- * Purpose: Initialize heap creation parameter structure with large
+ * Purpose: Initialize heap creation parameter structure with large
* settings
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -248,15 +250,15 @@ init_large_cparam(H5HF_create_t *cparam)
} /* init_large_cparam() */
/*-------------------------------------------------------------------------
- * Function: check_stats
+ * Function: check_stats
*
- * Purpose: Verify stats for a heap
+ * Purpose: Verify stats for a heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -270,43 +272,45 @@ check_stats(const H5HF_t *fh, const fheap_heap_state_t *state)
if (H5HF_stat_info(fh, &heap_stats) < 0)
FAIL_STACK_ERROR
if (heap_stats.man_nobjs != state->man_nobjs) {
- HDfprintf(stdout, "heap_stats.man_nobjs = %Hu, state->man_nobjs = %Zu\n", heap_stats.man_nobjs,
- state->man_nobjs);
+ HDfprintf(stdout, "heap_stats.man_nobjs = %" PRIuHSIZE ", state->man_nobjs = %zu\n",
+ heap_stats.man_nobjs, state->man_nobjs);
TEST_ERROR
} /* end if */
if (heap_stats.man_size != state->man_size) {
- HDfprintf(stdout, "heap_stats.man_size = %Hu, state->man_size = %Hu\n", heap_stats.man_size,
- state->man_size);
+ HDfprintf(stdout, "heap_stats.man_size = %" PRIuHSIZE ", state->man_size = %" PRIuHSIZE "\n",
+ heap_stats.man_size, state->man_size);
TEST_ERROR
} /* end if */
if (heap_stats.man_alloc_size != state->man_alloc_size) {
- HDfprintf(stdout, "heap_stats.man_alloc_size = %Hu, state->man_alloc_size = %Hu\n",
+ HDfprintf(stdout,
+ "heap_stats.man_alloc_size = %" PRIuHSIZE ", state->man_alloc_size = %" PRIuHSIZE "\n",
heap_stats.man_alloc_size, state->man_alloc_size);
TEST_ERROR
} /* end if */
if (heap_stats.man_free_space != state->man_free_space) {
- HDfprintf(stdout, "heap_stats.man_free_space = %Hu, state->man_free_space = %Hu\n",
+ HDfprintf(stdout,
+ "heap_stats.man_free_space = %" PRIuHSIZE ", state->man_free_space = %" PRIuHSIZE "\n",
heap_stats.man_free_space, state->man_free_space);
TEST_ERROR
} /* end if */
if (heap_stats.huge_nobjs != state->huge_nobjs) {
- HDfprintf(stdout, "heap_stats.huge_nobjs = %Hu, state->huge_nobjs = %Zu\n", heap_stats.huge_nobjs,
- state->huge_nobjs);
+ HDfprintf(stdout, "heap_stats.huge_nobjs = %" PRIuHSIZE ", state->huge_nobjs = %zu\n",
+ heap_stats.huge_nobjs, state->huge_nobjs);
TEST_ERROR
} /* end if */
if (heap_stats.huge_size != state->huge_size) {
- HDfprintf(stdout, "heap_stats.huge_size = %Hu, state->huge_size = %Hu\n", heap_stats.huge_size,
- state->huge_size);
+ HDfprintf(stdout, "heap_stats.huge_size = %" PRIuHSIZE ", state->huge_size = %" PRIuHSIZE "\n",
+ heap_stats.huge_size, state->huge_size);
TEST_ERROR
} /* end if */
if (heap_stats.tiny_nobjs != state->tiny_nobjs) {
- HDfprintf(stdout, "heap_stats.tiny_nobjs = %Hu, state->tiny_nobjs = %Zu\n", heap_stats.tiny_nobjs,
- state->tiny_nobjs);
+ HDfprintf(stdout, "heap_stats.tiny_nobjs = %" PRIuHSIZE ", state->tiny_nobjs = %zu\n",
+ heap_stats.tiny_nobjs, state->tiny_nobjs);
TEST_ERROR
} /* end if */
if (heap_stats.tiny_size != state->tiny_size) {
- HDfprintf(stdout, "heap_stats.tiny_size = %Hu, state->tiny_size = %Hu\n", heap_stats.tiny_size,
- state->tiny_size);
+ HDfprintf(stdout, "heap_stats.tiny_size = %" PRIuHSIZE ", state->tiny_size = %" PRIuHSIZE "\n",
+ heap_stats.tiny_size, state->tiny_size);
TEST_ERROR
} /* end if */
@@ -318,15 +322,15 @@ error:
} /* check_stats() */
/*-------------------------------------------------------------------------
- * Function: op_memcpy
+ * Function: op_memcpy
*
- * Purpose: Perform 'memcpy' for an object
+ * Purpose: Perform 'memcpy' for an object
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, September 11, 2006
*
*-------------------------------------------------------------------------
@@ -341,9 +345,9 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data)
} /* op_memcpy() */
/*-------------------------------------------------------------------------
- * Function: add_obj
+ * Function: add_obj
*
- * Purpose: Add an object to heap
+ * Purpose: Add an object to heap
*
* Note: The following fields in the 'state' structure are set to
* the values expected _after_ any block created for the object:
@@ -355,11 +359,11 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data)
* the current state, before any block has been created:
* nobjs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -420,7 +424,7 @@ add_obj(H5HF_t *fh, size_t obj_off, size_t obj_size, fheap_heap_state_t *state,
TEST_ERROR
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(obj, shared_robj_g, obj_size))
+ if (HDmemcmp(obj, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* If the heap IDs are to be retained, append them to the list */
@@ -463,15 +467,15 @@ error:
} /* add_obj() */
/*-------------------------------------------------------------------------
- * Function: get_del_string
+ * Function: get_del_string
*
- * Purpose: Return string describing the kind of deletion to perform
+ * Purpose: Return string describing the kind of deletion to perform
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -499,14 +503,14 @@ get_del_string(const fheap_test_param_t *tparam)
} /* get_del_string() */
/*-------------------------------------------------------------------------
- * Function: get_fill_size
+ * Function: get_fill_size
*
- * Purpose: Retrieve the size of objects to "bulk" fill blocks with
+ * Purpose: Retrieve the size of objects to "bulk" fill blocks with
*
- * Return: Size of object to pass down to "fill_heap" routine on
+ * Return: Size of object to pass down to "fill_heap" routine on
* success/can't fail
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Thursday, July 27, 2006
*
*-------------------------------------------------------------------------
@@ -530,15 +534,15 @@ get_fill_size(const fheap_test_param_t *tparam)
} /* get_fill_size() */
/*-------------------------------------------------------------------------
- * Function: begin_test
+ * Function: begin_test
*
- * Purpose: Perform common "test being" operations
+ * Purpose: Perform common "test being" operations
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -561,8 +565,11 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *
*/
del_str = get_del_string(tparam);
HDassert(del_str);
- TESTING(base_desc, del_str);
+ test_desc = (char *)H5MM_malloc(HDstrlen(del_str) + HDstrlen(base_desc));
+ HDsprintf(test_desc, base_desc, del_str);
+ TESTING(test_desc);
H5MM_xfree(del_str);
+ H5MM_xfree(test_desc);
/* Initialize the heap ID structure */
HDmemset(keep_ids, 0, sizeof(fheap_heap_ids_t));
@@ -577,14 +584,14 @@ begin_test(fheap_test_param_t *tparam, const char *base_desc, fheap_heap_ids_t *
H5_GCC_DIAG_ON("format-nonliteral")
/*-------------------------------------------------------------------------
- * Function: reopen_file
+ * Function: reopen_file
*
- * Purpose: Perform common "re-open" operations on file & heap for testing
+ * Purpose: Perform common "re-open" operations on file & heap for testing
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -632,15 +639,15 @@ error:
} /* end reopen_file() */
/*-------------------------------------------------------------------------
- * Function: open_heap
+ * Function: open_heap
*
- * Purpose: Perform common "open" operations on file & heap for testing
+ * Purpose: Perform common "open" operations on file & heap for testing
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -743,15 +750,15 @@ error:
} /* end open_heap() */
/*-------------------------------------------------------------------------
- * Function: reopen_heap
+ * Function: reopen_heap
*
- * Purpose: Perform common "re-open" operations on heap for testing
+ * Purpose: Perform common "re-open" operations on heap for testing
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -779,14 +786,14 @@ error:
} /* end reopen_heap() */
/*-------------------------------------------------------------------------
- * Function: close_heap
+ * Function: close_heap
*
- * Purpose: Perform common "close" operations on file & heap for testing
+ * Purpose: Perform common "close" operations on file & heap for testing
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 4, 2006
*
*-------------------------------------------------------------------------
@@ -844,15 +851,15 @@ error:
} /* end close_heap() */
/*-------------------------------------------------------------------------
- * Function: del_objs_half_refill
+ * Function: del_objs_half_refill
*
- * Purpose: Remove half of objects from heap and refill
+ * Purpose: Remove half of objects from heap and refill
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -936,15 +943,15 @@ error:
} /* del_objs_half_refill() */
/*-------------------------------------------------------------------------
- * Function: del_objs
+ * Function: del_objs
*
- * Purpose: Remove objects from heap
+ * Purpose: Remove objects from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -1017,9 +1024,9 @@ error:
} /* del_objs() */
/*-------------------------------------------------------------------------
- * Function: fill_heap
+ * Function: fill_heap
*
- * Purpose: Insert (small) objects to fill up the free space in a heap block
+ * Purpose: Insert (small) objects to fill up the free space in a heap block
*
* Note: The following fields in the 'state' structure are set to
* the values expected _after_ the block has been created:
@@ -1031,11 +1038,11 @@ error:
* the current state, before the block has been created:
* nobjs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -1185,7 +1192,7 @@ fill_heap(H5HF_t *fh, unsigned block_row, size_t obj_size, fheap_heap_state_t *s
/* Check that object is correct */
wobj = &shared_wobj_g[*curr_off_ptr];
- if (HDmemcmp(wobj, shared_robj_g, *curr_len_ptr))
+ if (HDmemcmp(wobj, shared_robj_g, *curr_len_ptr) != 0)
TEST_ERROR
/* Adjust object & ID pointers */
@@ -1227,15 +1234,15 @@ error:
} /* fill_heap() */
/*-------------------------------------------------------------------------
- * Function: fill_root_row
+ * Function: fill_root_row
*
- * Purpose: Fill up a row of direct blocks in the root indirect block
+ * Purpose: Fill up a row of direct blocks in the root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1323,15 +1330,15 @@ error:
} /* fill_root_row() */
/*-------------------------------------------------------------------------
- * Function: fill_partial row
+ * Function: fill_partial row
*
- * Purpose: Fill up part of a row of direct blocks in an non-root indirect block
+ * Purpose: Fill up part of a row of direct blocks in an non-root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 11, 2006
*
*-------------------------------------------------------------------------
@@ -1368,15 +1375,15 @@ error:
} /* fill_partial_row() */
/*-------------------------------------------------------------------------
- * Function: fill_row
+ * Function: fill_row
*
- * Purpose: Fill up entire row of direct blocks in an non-root indirect block
+ * Purpose: Fill up entire row of direct blocks in an non-root indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1400,18 +1407,18 @@ error:
} /* fill_row() */
/*-------------------------------------------------------------------------
- * Function: fill_root_direct
+ * Function: fill_root_direct
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in the root indirect block
* (Generally used to create & fill up direct blocks in a new
* indirect block)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -1439,17 +1446,17 @@ error:
} /* fill_root_direct() */
/*-------------------------------------------------------------------------
- * Function: fill_2nd_indirect
+ * Function: fill_2nd_indirect
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a second-level indirect block (which only has
* direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1478,16 +1485,16 @@ error:
} /* fill_2nd_direct() */
/*-------------------------------------------------------------------------
- * Function: fill_all_direct
+ * Function: fill_all_direct
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks up to the maximum direct block size
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1515,17 +1522,17 @@ error:
} /* fill_all_direct() */
/*-------------------------------------------------------------------------
- * Function: fill_2nd_indirect_row
+ * Function: fill_2nd_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of second-level indirect block (which only
* have direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1553,17 +1560,17 @@ error:
} /* fill_2nd_direct_row() */
/*-------------------------------------------------------------------------
- * Function: fill_all_2nd_indirect_rows
+ * Function: fill_all_2nd_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of second-level indirect blocks (which only
* have direct blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1590,17 +1597,17 @@ error:
} /* fill_2nd_direct_row() */
/*-------------------------------------------------------------------------
- * Function: fill_3rd_indirect
+ * Function: fill_3rd_indirect
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a third-level indirect block (which
* has one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -1628,17 +1635,17 @@ error:
} /* fill_3rd_indirect() */
/*-------------------------------------------------------------------------
- * Function: fill_3rd_indirect_row
+ * Function: fill_3rd_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of third-level indirect block (which
* have one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1667,17 +1674,17 @@ error:
} /* fill_3rd_direct_row() */
/*-------------------------------------------------------------------------
- * Function: fill_all_3rd_indirect_rows
+ * Function: fill_all_3rd_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of third-level indirect blocks (which
* have one more level of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1705,17 +1712,17 @@ error:
} /* fill_all_3rd_direct_rows() */
/*-------------------------------------------------------------------------
- * Function: fill_4th_indirect_row
+ * Function: fill_4th_indirect_row
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in a row of fourth-level indirect blocks (which
* have two more levels of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1754,17 +1761,17 @@ error:
} /* fill_4th_direct_row() */
/*-------------------------------------------------------------------------
- * Function: fill_all_4th_indirect_rows
+ * Function: fill_all_4th_indirect_rows
*
- * Purpose: Insert (small) objects to fill up the free space in all direct
+ * Purpose: Insert (small) objects to fill up the free space in all direct
* heap blocks in all rows of fourth-level indirect blocks (which
* have two more levels of indirect blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 10, 2006
*
*-------------------------------------------------------------------------
@@ -1810,14 +1817,14 @@ error:
} /* fill_all_4th_direct_rows() */
/*-------------------------------------------------------------------------
- * Function: test_create
+ * Function: test_create
*
- * Purpose: Create fractal heap
+ * Purpose: Create fractal heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -1929,14 +1936,14 @@ error:
} /* test_create() */
/*-------------------------------------------------------------------------
- * Function: test_reopen
+ * Function: test_reopen
*
- * Purpose: Create & reopen a fractal heap
+ * Purpose: Create & reopen a fractal heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -2082,14 +2089,14 @@ error:
} /* test_reopen() */
/*-------------------------------------------------------------------------
- * Function: test_open_twice
+ * Function: test_open_twice
*
- * Purpose: Open a fractal heap twice
+ * Purpose: Open a fractal heap twice
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -2260,14 +2267,14 @@ error:
} /* test_open_twice() */
/*-------------------------------------------------------------------------
- * Function: test_delete_open
+ * Function: test_delete_open
*
- * Purpose: Delete opened fractal heap (& open deleted heap)
+ * Purpose: Delete opened fractal heap (& open deleted heap)
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, January 5, 2007
*
*-------------------------------------------------------------------------
@@ -2438,14 +2445,14 @@ error:
} /* test_delete_open() */
/*-------------------------------------------------------------------------
- * Function: test_id_limits
+ * Function: test_id_limits
*
- * Purpose: Test limits for heap ID lengths
+ * Purpose: Test limits for heap ID lengths
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -2776,14 +2783,14 @@ error:
} /* test_id_limits() */
/*-------------------------------------------------------------------------
- * Function: test_filtered_create
+ * Function: test_filtered_create
*
- * Purpose: Test creating a heap with I/O filters
+ * Purpose: Test creating a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -2898,14 +2905,14 @@ error:
} /* test_filtered_create() */
/*-------------------------------------------------------------------------
- * Function: test_size
+ * Function: test_size
*
- * Purpose: Test querying heap size
+ * Purpose: Test querying heap size
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, August 14, 2007
*
*-------------------------------------------------------------------------
@@ -3171,17 +3178,15 @@ error:
return (1);
} /* test_reopen_hdr() */
-#ifndef QAK2
-
/*-------------------------------------------------------------------------
- * Function: test_man_insert_weird
+ * Function: test_man_insert_weird
*
- * Purpose: Test inserting "weird" sized objects into absolute heap
+ * Purpose: Test inserting "weird" sized objects into absolute heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 18, 2006
*
*-------------------------------------------------------------------------
@@ -3288,15 +3293,15 @@ error:
#ifdef ALL_INSERT_TESTS
/*-------------------------------------------------------------------------
- * Function: test_man_insert_first
+ * Function: test_man_insert_first
*
- * Purpose: Test inserting first object into absolute heap
+ * Purpose: Test inserting first object into absolute heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -3389,15 +3394,15 @@ error:
} /* test_man_insert_first() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_second
+ * Function: test_man_insert_second
*
- * Purpose: Test inserting two objects into absolute heap
+ * Purpose: Test inserting two objects into absolute heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3484,16 +3489,16 @@ error:
} /* test_man_insert_second() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_root_mult
+ * Function: test_man_insert_root_mult
*
- * Purpose: Test inserting mult. objects into absolute heap, up to the
+ * Purpose: Test inserting mult. objects into absolute heap, up to the
* limit of a root direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3582,17 +3587,17 @@ error:
} /* test_man_insert_root_mult() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_force_indirect
+ * Function: test_man_insert_force_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block and forcing the root block to be converted
* into an indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 6, 2006
*
*-------------------------------------------------------------------------
@@ -3688,17 +3693,17 @@ error:
} /* test_man_insert_force_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_fill_second
+ * Function: test_man_insert_fill_second
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block, forcing the root block to be converted
* into an indirect block and filling the secnod indirect block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -3794,18 +3799,18 @@ error:
} /* test_man_insert_fill_second() */
/*-------------------------------------------------------------------------
- * Function: test_man_insert_third_direct
+ * Function: test_man_insert_third_direct
*
- * Purpose: Test inserting mult. objects into absolute heap, filling the
+ * Purpose: Test inserting mult. objects into absolute heap, filling the
* root direct block, forcing the root block to be converted
* into an indirect block, filling the secnod indirect block and
* creating a third direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 7, 2006
*
*-------------------------------------------------------------------------
@@ -3906,17 +3911,17 @@ error:
} /* test_man_insert_third_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_row
+ * Function: test_man_fill_first_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 13, 2006
*
*-------------------------------------------------------------------------
@@ -4002,17 +4007,17 @@ error:
} /* test_man_fill_first_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_second_row
+ * Function: test_man_start_second_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, then add another object to start second row.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 14, 2006
*
*-------------------------------------------------------------------------
@@ -4105,17 +4110,17 @@ error:
} /* test_man_start_second_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_second_row
+ * Function: test_man_fill_second_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, then fill the second row also.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 14, 2006
*
*-------------------------------------------------------------------------
@@ -4205,18 +4210,18 @@ error:
} /* test_man_fill_second_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_third_row
+ * Function: test_man_start_third_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first row of root indirect
* block, fill the second row also, then add another object to
* start the third row.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4316,17 +4321,17 @@ error:
} /* test_man_start_third_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_fourth_row
+ * Function: test_man_fill_fourth_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill first four rows of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4414,17 +4419,17 @@ error:
} /* test_man_fill_fourth_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_root_direct
+ * Function: test_man_fill_all_root_direct
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4510,17 +4515,17 @@ error:
} /* test_man_fill_all_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_first_recursive_indirect
+ * Function: test_man_first_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block and create first recursive indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 20, 2006
*
*-------------------------------------------------------------------------
@@ -4611,18 +4616,18 @@ error:
} /* test_man_first_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_second_direct_recursive_indirect
+ * Function: test_man_second_direct_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block and start second
* direct block in that indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4721,18 +4726,18 @@ error:
} /* test_man_second_direct_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_recursive_indirect
+ * Function: test_man_fill_first_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block and filling all
* direct blocks in that indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4823,19 +4828,19 @@ error:
} /* test_man_fill_first_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_second_recursive_indirect
+ * Function: test_man_second_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and adding another
* object to force creation of second recursive indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -4933,20 +4938,20 @@ error:
} /* test_man_second_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_second_recursive_indirect
+ * Function: test_man_fill_second_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and then create second
* recursive indirect block and fill all direct blocks in that
* indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -5041,20 +5046,20 @@ error:
} /* test_man_fill_second_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_recursive_indirect_row
+ * Function: test_man_fill_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, create first recursive indirect block, filling all
* direct blocks in that indirect block and then create second
* recursive indirect block and fill all direct blocks in that
* indirect block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 21, 2006
*
*-------------------------------------------------------------------------
@@ -5141,18 +5146,18 @@ error:
} /* test_man_fill_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_2nd_recursive_indirect
+ * Function: test_man_start_2nd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the first row of indirect
* blocks and start on first block in second row of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5250,18 +5255,18 @@ error:
} /* test_man_start_2nd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_recursive_indirect_two_deep
+ * Function: test_man_recursive_indirect_two_deep
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5352,19 +5357,19 @@ error:
} /* test_man_recursive_indirect_two_deep() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_3rd_recursive_indirect
+ * Function: test_man_start_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and start first direct block
* in 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5462,19 +5467,19 @@ error:
} /* test_man_start_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_3rd_recursive_indirect
+ * Function: test_man_fill_first_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill first indirect block
* in 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5573,19 +5578,19 @@ error:
} /* test_man_fill_first_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_recursive_indirect_row
+ * Function: test_man_fill_3rd_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill all indirect blocks
* first row of 3rd level of indirect blocks
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5681,19 +5686,19 @@ error:
} /* test_man_fill_3rd_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_3rd_recursive_indirect
+ * Function: test_man_fill_all_3rd_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep and fill all indirect blocks
* that are three levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5789,20 +5794,20 @@ error:
} /* test_man_fill_all_3rd_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_start_4th_recursive_indirect
+ * Function: test_man_start_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and start first direct block that
* is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -5904,20 +5909,20 @@ error:
} /* test_man_start_4th_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_first_4th_recursive_indirect
+ * Function: test_man_fill_first_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill the first (3rd level)
* indirect block that is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6025,20 +6030,20 @@ error:
} /* test_man_fill_first_4th_recursive_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_4th_recursive_indirect_row
+ * Function: test_man_fill_4th_recursive_indirect_row
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill the first row of
* indirect block that is four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6137,20 +6142,20 @@ error:
} /* test_man_fill_4th_recursive_indirect_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_all_4th_recursive_indirect
+ * Function: test_man_fill_all_4th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
* that are three levels deep and fill all rows of
* indirect blocks that are four levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6249,12 +6254,10 @@ error:
} /* test_man_fill_all_4th_recursive_indirect() */
#endif /* ALL_INSERT_TESTS */
-#ifndef QAK
-
/*-------------------------------------------------------------------------
- * Function: test_man_start_5th_recursive_indirect
+ * Function: test_man_start_5th_recursive_indirect
*
- * Purpose: Test inserting mult. objects into absolute heap, creating
+ * Purpose: Test inserting mult. objects into absolute heap, creating
* enough direct blocks to fill all direct rows of root indirect
* block, fill all direct blocks in the row of indirect
* blocks that are 2 levels deep, fill all indirect blocks
@@ -6262,11 +6265,11 @@ error:
* that are four levels deep and start first direct block in
* indirect blocks five levels deep
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -6383,20 +6386,17 @@ error:
H5E_END_TRY;
return (1);
} /* test_man_start_5th_recursive_indirect() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_man_remove_bogus
+ * Function: test_man_remove_bogus
*
- * Purpose: Test removing bogus heap IDs
+ * Purpose: Test removing bogus heap IDs
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -6462,10 +6462,10 @@ test_man_remove_bogus(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpa
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
- /* seed = (unsigned long)1155438845; */
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#if 0
+/* seed = (unsigned long)1155438845; */
+HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+#endif
HDsrandom((unsigned)seed);
/* Set heap ID to random (non-null) value */
@@ -6548,15 +6548,15 @@ error:
} /* test_man_remove_bogus() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_one
+ * Function: test_man_remove_one
*
- * Purpose: Test removing single object from heap
+ * Purpose: Test removing single object from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -6712,15 +6712,15 @@ error:
} /* test_man_remove_one() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two
+ * Function: test_man_remove_two
*
- * Purpose: Test removing two objects from heap
+ * Purpose: Test removing two objects from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -6905,16 +6905,16 @@ error:
} /* test_man_remove_two() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_one_larger
+ * Function: test_man_remove_one_larger
*
- * Purpose: Test removing single larger (but < standalone size) object
+ * Purpose: Test removing single larger (but < standalone size) object
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 6, 2006
*
*-------------------------------------------------------------------------
@@ -7074,16 +7074,16 @@ error:
} /* test_man_remove_one_larger() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two_larger
+ * Function: test_man_remove_two_larger
*
- * Purpose: Test removing two larger (but < standalone size) objects
+ * Purpose: Test removing two larger (but < standalone size) objects
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, June 10, 2006
*
*-------------------------------------------------------------------------
@@ -7293,11 +7293,7 @@ test_man_remove_two_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
- /* Verify the file is correct size */
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
+ /* Verify the file is correct size */
if (file_size != empty_size)
TEST_ERROR
@@ -7318,16 +7314,16 @@ error:
} /* test_man_remove_two_larger() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_three_larger
+ * Function: test_man_remove_three_larger
*
- * Purpose: Test removing three larger (but < standalone size) objects
+ * Purpose: Test removing three larger (but < standalone size) objects
* from heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 12, 2006
*
*-------------------------------------------------------------------------
@@ -7597,11 +7593,7 @@ test_man_remove_three_larger(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
- /* Verify the file is correct size */
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
+ /* Verify the file is correct size */
if (file_size != empty_size)
TEST_ERROR
@@ -7622,14 +7614,14 @@ error:
} /* test_man_remove_three_larger() */
/*-------------------------------------------------------------------------
- * Function: test_man_incr_insert_remove
+ * Function: test_man_incr_insert_remove
*
- * Purpose: Test incremental insert & removal of objects in heap
+ * Purpose: Test incremental insert & removal of objects in heap
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Sunday, April 1, 2012
*
*-------------------------------------------------------------------------
@@ -7748,21 +7740,18 @@ error:
return 1;
} /* test_man_incr_insert_remove() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_man_remove_root_direct
+ * Function: test_man_remove_root_direct
*
- * Purpose: Test filling and removing all objects from root direct block in
+ * Purpose: Test filling and removing all objects from root direct block in
* heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -7779,8 +7768,8 @@ test_man_remove_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from root direct block of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from root direct block of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7826,16 +7815,16 @@ error:
} /* test_man_remove_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_two_direct
+ * Function: test_man_remove_two_direct
*
- * Purpose: Test filling and removing all objects from (first) two direct
+ * Purpose: Test filling and removing all objects from (first) two direct
* blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 22, 2006
*
*-------------------------------------------------------------------------
@@ -7852,8 +7841,8 @@ test_man_remove_two_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from two direct blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from two direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7914,16 +7903,16 @@ error:
} /* test_man_remove_two_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_row
+ * Function: test_man_remove_first_row
*
- * Purpose: Test filling and removing all objects from first row of direct
+ * Purpose: Test filling and removing all objects from first row of direct
* blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 5, 2006
*
*-------------------------------------------------------------------------
@@ -7940,8 +7929,8 @@ test_man_remove_first_row(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from first row of direct blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from first row of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -7984,16 +7973,16 @@ error:
} /* test_man_remove_first_row() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_two_rows
+ * Function: test_man_remove_first_two_rows
*
- * Purpose: Test filling and removing all objects from first two rows of
+ * Purpose: Test filling and removing all objects from first two rows of
* direct blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, June 12, 2006
*
*-------------------------------------------------------------------------
@@ -8010,9 +7999,8 @@ test_man_remove_first_two_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_par
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from first two rows of direct blocks of absolute heap %s"; /* Test description
- */
+ /* Test description */
+ const char *base_desc = "removing all objects from first two rows of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8057,16 +8045,16 @@ error:
} /* test_man_remove_first_two_rows() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_first_four_rows
+ * Function: test_man_remove_first_four_rows
*
- * Purpose: Test filling and removing all objects from first four rows of
+ * Purpose: Test filling and removing all objects from first four rows of
* direct blocks in heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8083,9 +8071,8 @@ test_man_remove_first_four_rows(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from first four rows of direct blocks of absolute heap %s"; /* Test description
- */
+ /* Test description */
+ const char *base_desc = "removing all objects from first four rows of direct blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8134,16 +8121,16 @@ error:
} /* test_man_remove_first_four_rows() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_all_root_direct
+ * Function: test_man_remove_all_root_direct
*
- * Purpose: Test filling and removing all objects from all direct blocks
+ * Purpose: Test filling and removing all objects from all direct blocks
* in root indirect block of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8160,9 +8147,8 @@ test_man_remove_all_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from all direct blocks of root group in absolute heap %s"; /* Test description
- */
+ /* Test description */
+ const char *base_desc = "removing all objects from all direct blocks of root group in absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8205,16 +8191,16 @@ error:
} /* test_man_remove_all_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_2nd_indirect
+ * Function: test_man_remove_2nd_indirect
*
- * Purpose: Test filling and removing all objects up to 2nd level indirect
+ * Purpose: Test filling and removing all objects up to 2nd level indirect
* blocks of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, June 13, 2006
*
*-------------------------------------------------------------------------
@@ -8231,8 +8217,8 @@ test_man_remove_2nd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from 2nd level indirect blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from 2nd level indirect blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8279,16 +8265,16 @@ error:
} /* test_man_remove_2nd_indirect() */
/*-------------------------------------------------------------------------
- * Function: test_man_remove_3rd_indirect
+ * Function: test_man_remove_3rd_indirect
*
- * Purpose: Test filling and removing all objects up to 3rd level indirect
+ * Purpose: Test filling and removing all objects up to 3rd level indirect
* blocks of heap
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 24, 2006
*
*-------------------------------------------------------------------------
@@ -8305,8 +8291,8 @@ test_man_remove_3rd_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_param
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "removing all objects from 3rd level indirect blocks of absolute heap %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "removing all objects from 3rd level indirect blocks of absolute heap %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8355,24 +8341,21 @@ error:
H5E_END_TRY;
return (1);
} /* test_man_remove_3rd_indirect() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block
+ * Function: test_man_skip_start_block
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, March 27, 2006
*
*-------------------------------------------------------------------------
@@ -8389,9 +8372,9 @@ test_man_skip_start_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "inserting object that is too large for starting block, then remove all objects %s"; /* Test
- description */
+ /* Test description */
+ const char *base_desc =
+ "inserting object that is too large for starting block, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8441,17 +8424,17 @@ error:
} /* test_man_skip_start_block() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block_add_back
+ * Function: test_man_skip_start_block_add_back
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation, then add object which fits in skipped direct block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 28, 2006
*
*-------------------------------------------------------------------------
@@ -8468,10 +8451,9 @@ test_man_skip_start_block_add_back(hid_t fapl, H5HF_create_t *cparam, fheap_test
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "skipping starting block, then adding object back to first block, then remove "
- "all objects %s"; /* Test
- description
- */
+ /* Test description */
+ const char *base_desc =
+ "skipping starting block, then adding object back to first block, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8540,18 +8522,18 @@ error:
} /* test_man_skip_start_block_add_back() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_start_block_add_skipped
+ * Function: test_man_skip_start_block_add_skipped
*
- * Purpose: Test inserting object into absolute heap which is too large
+ * Purpose: Test inserting object into absolute heap which is too large
* for starting block size, which forces root indirect block
* creation, then add objects to fill skipped direct blocks
* and add another object to start on next "normal" block
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, March 28, 2006
*
*-------------------------------------------------------------------------
@@ -8569,8 +8551,9 @@ test_man_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "skipping starting block, then adding objects to backfill and extend, then "
- "remove all objects %s"; /* Test description */
+ /* Test description */
+ const char *base_desc =
+ "skipping starting block, then adding objects to backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8649,18 +8632,18 @@ error:
} /* test_man_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_2nd_block
+ * Function: test_man_skip_2nd_block
*
- * Purpose: Test inserting object into absolute heap which is small
+ * Purpose: Test inserting object into absolute heap which is small
* enough for starting block size, then add object too large
* for any blocks in first row of direct blocks, to force
* early creation of indirect block (and range of skipped blocks)
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 1, 2006
*
*-------------------------------------------------------------------------
@@ -8677,8 +8660,9 @@ test_man_skip_2nd_block(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *t
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
+ /* Test description */
const char *base_desc = "insert object to initial block, then add object too large for starting direct "
- "blocks, then remove all objects %s"; /* Test description */
+ "blocks, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -8742,9 +8726,9 @@ error:
} /* test_man_skip_2nd_block() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_2nd_block_add_skipped
+ * Function: test_man_skip_2nd_block_add_skipped
*
- * Purpose: Test inserting object into absolute heap which is small
+ * Purpose: Test inserting object into absolute heap which is small
* enough for starting block size, then add object too large
* for any blocks in first row of direct blocks, to force
* early creation of indirect block (and range of skipped blocks).
@@ -8752,11 +8736,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 1, 2006
*
*-------------------------------------------------------------------------
@@ -8774,10 +8758,10 @@ test_man_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_tes
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "insert object to initial block, then add object too large for starting direct blocks, then backfill "
- "and extend, then remove all objects %s"; /* Test description */
- unsigned v; /* Local index variables */
+ unsigned v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "insert object to initial block, then add object too large for starting direct "
+ "blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -8885,9 +8869,9 @@ error:
} /* test_man_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped
+ * Function: test_man_fill_one_partial_skip_2nd_block_add_skipped
*
- * Purpose: Test filling initial direct block, then add object small enough
+ * Purpose: Test filling initial direct block, then add object small enough
* for initial block size (to create root indirect block), then
* add object too large for any blocks in first three rows of
* direct blocks, to force extension of indirect block (and range
@@ -8897,11 +8881,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -8920,11 +8904,10 @@ test_man_fill_one_partial_skip_2nd_block_add_skipped(hid_t fapl, H5HF_create_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "skipping blocks with indirect root, then backfill and extend, then remove all "
- "objects %s"; /* Test
- description
- */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc =
+ "skipping blocks with indirect root, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9054,9 +9037,9 @@ error:
} /* test_man_fill_one_partial_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_row_skip_add_skipped
+ * Function: test_man_fill_row_skip_add_skipped
*
- * Purpose: Test filling first row of direct blocks, then
+ * Purpose: Test filling first row of direct blocks, then
* add object too large for any blocks in first three rows of
* direct blocks, to force extension of indirect block (and range
* of skipped blocks).
@@ -9065,11 +9048,11 @@ error:
* block and all the skipped blocks, and one more object (to
* start next "normal" block).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -9087,10 +9070,9 @@ test_man_fill_row_skip_add_skipped(hid_t fapl, H5HF_create_t *cparam, fheap_test
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling first row, then skipping rows, then backfill and extend, then remove "
- "all objects %s"; /* Test
- description
- */
+ /* Test description */
+ const char *base_desc =
+ "filling first row, then skipping rows, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9185,19 +9167,19 @@ error:
} /* test_man_fill_row_skip_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped
+ * Function: test_man_skip_direct_skip_indirect_two_rows_add_skipped
*
- * Purpose: Test adding object too large for all but the last row in the
+ * Purpose: Test adding object too large for all but the last row in the
* direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -9217,10 +9199,10 @@ test_man_skip_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "skipping direct blocks to last row and skipping two rows of root indirect block, then backfill and "
- "extend, then remove all objects %s"; /* Test description */
- unsigned v; /* Local index variables */
+ unsigned v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "skipping direct blocks to last row and skipping two rows of root indirect "
+ "block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -9314,18 +9296,18 @@ error:
} /* test_man_skip_direct_skip_indirect_two_rows_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first row of direct
* blocks in indirect block, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -9344,8 +9326,9 @@ test_man_fill_direct_skip_indirect_start_block_add_skipped(hid_t fapl, H5HF_crea
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
+ /* Test description */
const char *base_desc = "filling direct blocks and skipping blocks in non-root indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9437,19 +9420,19 @@ error:
} /* test_man_fill_direct_skip_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped
+ * Function: test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for all direct blocks in first row of
* indirect blocks, to force skipping a row of indirect blocks
* (and range of skipped blocks), then backfill all direct blocks
* skipped and extend to next "normal" direct block.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 3, 2006
*
*-------------------------------------------------------------------------
@@ -9464,16 +9447,17 @@ test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H5HF_
H5HF_t * fh = NULL; /* Fractal heap wrapper */
haddr_t fh_addr; /* Address of fractal heap */
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
- unsigned
- num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */
- unsigned row; /* Current row in indirect block */
- h5_stat_size_t empty_size; /* Size of a file with an empty heap */
- size_t obj_size; /* Size of object */
- size_t fill_size; /* Size of objects for "bulk" filled blocks */
- fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u; /* Local index variable */
+ unsigned num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the */
+ /* first indirect blocks */
+ unsigned row; /* Current row in indirect block */
+ h5_stat_size_t empty_size; /* Size of a file with an empty heap */
+ size_t obj_size; /* Size of object */
+ size_t fill_size; /* Size of objects for "bulk" filled blocks */
+ fheap_heap_state_t state; /* State of fractal heap */
+ unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then "
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9567,20 +9551,20 @@ error:
} /* test_man_fill_direct_skip_2nd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, except the last
* one, then insert object insert object that is too large to
* hold in row of 2nd level indirect blocks (forcing the use of
* the next row of 2nd level blocks), then backfill all skipped
* direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -9601,13 +9585,11 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, except last one, and "
- "insert object too "
- "large for 2nd level indirect blocks, then backfill and extend, then remove all "
- "objects %s"; /* Test
- description
- */
- unsigned u; /* Local index variables */
+ unsigned u; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
+ "filling direct blocks, filling 2nd level indirect blocks, except last one, and insert object too "
+ "large for 2nd level indirect blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9643,9 +9625,6 @@ test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped(hid_t fapl, H5HF_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9715,9 +9694,9 @@ error:
} /* test_man_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped
+ * Function: test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for all direct blocks in first row of
* indirect blocks, to force skipping a row of indirect blocks
* (and range of skipped blocks), then add object that is too
@@ -9727,11 +9706,11 @@ error:
* too large for initial block size in skipped indirect block
* row's direct blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -9753,10 +9732,10 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "filling direct blocks and skipping row of non-root indirect blocks, then skip row of direct blocks, "
- "then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u; /* Local index variable */
+ unsigned u; /* Local index variable */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping row of non-root indirect blocks, then skip "
+ "row of direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -9782,9 +9761,6 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9804,9 +9780,6 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
/* Insert object too large for initial block size in skipped indirect blocks */
obj_size = (size_t)DBLOCK_SIZE(fh, 3) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, 4);
if (add_obj(fh, (size_t)10, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9817,9 +9790,6 @@ test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped(hid_t fapl, H5
/* Insert object to fill space in (medium) block just created */
obj_size = (size_t)DBLOCK_FREE(fh, 4) - obj_size;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -9892,18 +9862,18 @@ error:
} /* test_man_fill_direct_skip_2nd_indirect_skip_2nd_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_two_rows_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block (and range of skipped blocks).
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -9925,9 +9895,10 @@ test_man_fill_direct_skip_indirect_two_rows_add_skipped(hid_t fapl, H5HF_create_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "filling direct blocks and skipping two rows of root indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks and skipping two rows of root indirect block, then "
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10045,20 +10016,20 @@ error:
} /* test_man_fill_direct_skip_indirect_two_rows_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped
+ * Function: test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* add object too large for initial block in first two rows of
* indirect blocks, to force extension of non-root
* indirect block, then add object too large for first row of
* indirect blocks, (and ranges of skipped blocks), then backfill
* and extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 11, 2006
*
*-------------------------------------------------------------------------
@@ -10080,10 +10051,11 @@ test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped(hid_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks and skipping two rows of root indirect block, skip one row of root indirect "
- "block, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10229,19 +10201,19 @@ error:
} /* test_man_fill_direct_skip_indirect_two_rows_skip_indirect_row_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_skip_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, the insert object
* that is too large to hold in first row of direct blocks of
* 3rd level indirect block, then backfill & extend all skipped
* 3rd level indirect block's direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10260,10 +10232,10 @@ test_man_fill_2nd_direct_skip_start_block_add_skipped(hid_t fapl, H5HF_create_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, and skip first rows of direct blocks of "
- "3rd level indirect block, then backfill and extend, then remove all objects %s"; /* Test description
- */
+ "3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10358,9 +10330,9 @@ error:
} /* test_man_fill_2nd_direct_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first row of direct blocks of
@@ -10368,11 +10340,11 @@ error:
* backfill & extend all skipped 2nd level indirect block's direct
* blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10391,10 +10363,11 @@ test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped(hid_t fapl, H
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct "
"blocks, and skip first rows of direct blocks of 3rd level indirect block's 2nd level indirect "
- "block, then backfill and extend, then remove all objects %s"; /* Test description */
+ "block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10499,20 +10472,20 @@ error:
} /* test_man_fill_2nd_direct_skip_2nd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first row of 2nd level indirect
* blocks of 3rd level indirect block, then backfill & extend all
* skipped direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10534,11 +10507,11 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct "
- "blocks, and skip first row of indirect blocks of 3rd level indirect block, then backfill and "
- "extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level "
+ "indirect block's direct blocks, and skip first row of indirect blocks of 3rd "
+ "level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10580,9 +10553,6 @@ test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped(h
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10654,21 +10624,21 @@ error:
} /* test_man_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks in 3rd level indirect block, then insert object
* that is too large to hold in first & second rows of 2nd level
* indirect blocks (although this 3rd level indirect block only
* has one row of 2nd level indirect blocks) of 3rd level indirect
- * block, then backfill & extend all skipped direct blocks.
+ * block, then backfill & extend all skipped direct blocks.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, April 11, 2006
*
*-------------------------------------------------------------------------
@@ -10690,11 +10660,11 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect block's direct "
- "blocks, and skip first two rows of indirect blocks of 3rd level indirect block, then backfill and "
- "extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level "
+ "indirect block's direct blocks, and skip first two rows of indirect blocks of "
+ "3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10706,9 +10676,6 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
/* Retrieve info about heap */
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
-#ifdef QAK
- HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
-#endif /* QAK */
/* Fill direct blocks in root indirect block */
if (fill_root_direct(fh, fill_size, &state, &keep_ids))
@@ -10739,9 +10706,6 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows + 1);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10752,9 +10716,6 @@ test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped(
/* Insert object to fill space in (large) block created */
obj_size = (size_t)DBLOCK_FREE(fh, num_first_indirect_rows + 1) - obj_size;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10820,9 +10781,9 @@ error:
} /* test_man_fill_2nd_direct_fill_direct_skip2_3rd_indirect_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, all 3rd level
* indirect blocks in first row except the last one, fill direct
* blocks in last 3rd level indirect block, then insert object
@@ -10831,11 +10792,11 @@ error:
* use of the next row of 3rd level blocks), then backfill all
* skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tues, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -10856,12 +10817,12 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd "
- "level indirect blocks, except last one, fill all direct blocks in last 3rd level "
- "indirect block, and insert object too large for it's 2nd level indirect blocks, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
+ "filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect "
+ "blocks, except last one, fill all direct blocks in last 3rd level indirect block, and insert object "
+ "too large for it's 2nd level indirect blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -10913,9 +10874,6 @@ test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped(hid_t
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -10986,9 +10944,9 @@ error:
} /* test_man_fill_3rd_direct_less_one_fill_direct_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped
+ * Function: test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, all 3rd level
* indirect blocks in first row, fill direct blocks in 2nd row 3rd
* level indirect block, fill all direct blocks in 1st row of
@@ -10998,11 +10956,11 @@ error:
* next row of 2nd level blocks), then backfill all skipped direct
* blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tues, April 18, 2006
*
*-------------------------------------------------------------------------
@@ -11019,16 +10977,16 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
fheap_heap_ids_t keep_ids; /* Structure to retain heap IDs */
unsigned
num_first_indirect_rows; /* Number of rows (of direct blocks) in each of the first indirect blocks */
- h5_stat_size_t empty_size; /* Size of a file with an empty heap */
- size_t obj_size; /* Size of object */
- size_t fill_size; /* Size of objects for "bulk" filled blocks */
- fheap_heap_state_t state; /* State of fractal heap */
+ h5_stat_size_t empty_size; /* Size of a file with an empty heap */
+ size_t obj_size; /* Size of object */
+ size_t fill_size; /* Size of objects for "bulk" filled blocks */
+ fheap_heap_state_t state; /* State of fractal heap */
+ unsigned u; /* Local index variables */ /* Test description */
const char * base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling first row of 3rd level indirect "
"blocks, fill all direct blocks in next 3rd level indirect block, fill all 1st row of 2nd level "
"indirect blocks, except last one, and insert object too large for 2nd level indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u; /* Local index variables */
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11087,9 +11045,6 @@ test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_s
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11159,9 +11114,9 @@ error:
} /* test_man_fill_1st_row_3rd_direct_fill_2nd_direct_less_one_wrap_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, then
* fill all direct blocks in 4th level indirect block, then
@@ -11169,11 +11124,11 @@ error:
* level indirect blocks of 4th level indirect block, then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Saturday, April 15, 2006
*
*-------------------------------------------------------------------------
@@ -11194,11 +11149,12 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"4th level indirect block's direct blocks, and skip first row of 2nd indirect blocks of 4th level "
- "indirect block, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11248,9 +11204,6 @@ test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped(hid_t fapl, H5
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11322,9 +11275,9 @@ error:
} /* test_man_fill_3rd_direct_fill_direct_skip_start_block_add_skipped() */
/*-------------------------------------------------------------------------
- * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
+ * Function: test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, then
* fill all direct blocks and 2nd level indirect blocks in 4th
@@ -11334,11 +11287,11 @@ error:
* 3rd level indirect block, then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11359,12 +11312,13 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"4th level indirect block's direct, 2nd level indirect blocks and 3rd level direct block, and skip "
"first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11430,9 +11384,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_start_blo
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11507,7 +11458,7 @@ error:
* Function:
*test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in first row of 4th level indirect
@@ -11519,11 +11470,11 @@ error:
* 3rd level indirect block (in 4th level indirect block), then
* backfill all skipped direct blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11544,13 +11495,14 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"first row of 4th level indirect blocks, fill 2nd row 4th level indirect block's direct, 2nd level "
"indirect blocks, first row of 3rd level indirect blocks, 3rd level direct block in 2nd row, and "
"skip first row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect block, then "
- "backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11649,9 +11601,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_two_rows_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11727,7 +11676,7 @@ error:
* Function:
*test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in 4th level indirect
@@ -11741,11 +11690,11 @@ error:
* 4th level block), then backfill all skipped direct blocks &
* extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11766,17 +11715,13 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level "
- "indirect blocks, fill "
- "first row of 3rd level indirect blocks in 4th level indirect block except last "
- "3rd level block, "
- "fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of "
- "4th level indirect "
- "block's 3rd level indirect block, then backfill and extend, then remove all "
- "objects %s"; /* Test
- description
- */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
+ "filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
+ "first row of 3rd level indirect blocks in 4th level indirect block except last 3rd level block, "
+ "fill direct blocks in 3rd level block, and skip row of 2nd indirect blocks of 4th level indirect "
+ "block's 3rd level indirect block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -11857,9 +11802,6 @@ test_man_fill_3rd_direct_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_star
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -11934,7 +11876,7 @@ error:
* Function:
*test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped
*
- * Purpose: Test filling all direct blocks in root indirect block and all
+ * Purpose: Test filling all direct blocks in root indirect block and all
* direct blocks in 2nd level indirect blocks, fill all direct
* blocks and indirect blocks in 3rd level indirect block, fill all
* direct & indirect blocks in first row of 4th level indirect
@@ -11948,11 +11890,11 @@ error:
* next row of 4th level blocks), then backfill all skipped direct
* blocks & extend.
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, April 17, 2006
*
*-------------------------------------------------------------------------
@@ -11973,13 +11915,14 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"filling direct blocks, filling 2nd level indirect blocks, filling 3rd level indirect blocks, fill "
"first row of 4th level indirect blocks, except last one, fill first row of 3rd level indirect "
"blocks in last 4th level indirect block except last 3rd level block, fill direct blocks in 3rd "
"level block, and skip row of 2nd indirect blocks of 4th level indirect block's 3rd level indirect "
- "block, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "block, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -12096,9 +12039,6 @@ test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_
* object
*/
obj_size = (size_t)DBLOCK_SIZE(fh, num_first_indirect_rows - 1) + 1;
-#ifdef QAK
- HDfprintf(stderr, "obj_size = %Zu\n", obj_size);
-#endif /* QAK */
state.man_alloc_size += DBLOCK_SIZE(fh, num_first_indirect_rows);
if (add_obj(fh, (size_t)20, obj_size, &state, &keep_ids))
TEST_ERROR
@@ -12169,25 +12109,22 @@ error:
return (1);
} /* test_man_fill_4th_direct_less_one_fill_2nd_direct_fill_direct_skip_3rd_indirect_wrap_start_block_add_skipped()
*/
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_man_frag_simple
+ * Function: test_man_frag_simple
*
- * Purpose: Test inserting objects small enough to fit into first row of
+ * Purpose: Test inserting objects small enough to fit into first row of
* direct blocks, but not to share a block with another object,
* until start-block-size * 2 blocks are reached. Then, go back
* and fill in the space in the blocks skipped.
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, July 24, 2006
*
*-------------------------------------------------------------------------
@@ -12204,10 +12141,9 @@ test_man_frag_simple(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "fragmenting small blocks, then backfill and extend, then remove all objects %s"; /* Test description
- */
- unsigned u; /* Local index variables */
+ unsigned u; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fragmenting small blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12307,19 +12243,19 @@ error:
} /* test_man_frag_simple() */
/*-------------------------------------------------------------------------
- * Function: test_man_frag_direct
+ * Function: test_man_frag_direct
*
- * Purpose: Test inserting small object to fit into each direct block
+ * Purpose: Test inserting small object to fit into each direct block
* in root block, but not to share a block with another object,
* Then, go back and fill in the space in the blocks skipped.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12337,10 +12273,9 @@ test_man_frag_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
h5_stat_size_t empty_size; /* Size of a file with an empty heap */
size_t obj_size; /* Size of object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "fragmenting direct blocks, then backfill and extend, then remove all objects %s"; /* Test description
- */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fragmenting direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12477,9 +12412,9 @@ error:
} /* test_man_frag_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_frag_2nd_direct
+ * Function: test_man_frag_2nd_direct
*
- * Purpose: Test filling all direct blocks in root indirect block, then
+ * Purpose: Test filling all direct blocks in root indirect block, then
* inserting small object to fit into each direct block
* in 2nd level indirect block, but not to share a block with
* another object.
@@ -12487,11 +12422,11 @@ error:
*
* Then, go back and remove all the objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12511,10 +12446,10 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "fill root direct blocks, then fragment 2nd level indirect block's direct blocks, then backfill and "
- "extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc = "fill root direct blocks, then fragment 2nd level indirect block's direct "
+ "blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -12526,9 +12461,6 @@ test_man_frag_2nd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
/* Compute # of bits used in first row */
num_first_indirect_rows = IBLOCK_MAX_DROWS(fh, 1);
-#ifdef QAK
- HDfprintf(stderr, "num_first_indirect_rows = %u\n", num_first_indirect_rows);
-#endif /* QAK */
/* Fill direct blocks in root indirect block */
if (fill_root_direct(fh, fill_size, &state, &keep_ids))
@@ -12591,9 +12523,9 @@ error:
} /* test_man_frag_2nd_direct() */
/*-------------------------------------------------------------------------
- * Function: test_man_frag_3rd_direct
+ * Function: test_man_frag_3rd_direct
*
- * Purpose: Test filling all direct blocks in root indirect block and
+ * Purpose: Test filling all direct blocks in root indirect block and
* all 2nd level indirect blocks, then
* inserting small object to fit into each direct block
* in 3rd level indirect block, but not to share a block with
@@ -12602,11 +12534,11 @@ error:
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, July 25, 2006
*
*-------------------------------------------------------------------------
@@ -12625,10 +12557,11 @@ test_man_frag_3rd_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *
size_t obj_size; /* Size of object */
size_t fill_size; /* Size of objects for "bulk" filled blocks */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
+ unsigned u, v; /* Local index variables */
+ /* Test description */
+ const char *base_desc =
"fill root direct blocks and 2nd level indirect blocks, then fragment 3rd level indirect block's "
- "direct blocks, then backfill and extend, then remove all objects %s"; /* Test description */
- unsigned u, v; /* Local index variables */
+ "direct blocks, then backfill and extend, then remove all objects %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, &fill_size) < 0)
@@ -12708,21 +12641,18 @@ error:
H5E_END_TRY;
return (1);
} /* test_man_frag_3rd_direct() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_one
+ * Function: test_huge_insert_one
*
- * Purpose: Test inserting one huge object in the heap
+ * Purpose: Test inserting one huge object in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 7, 2006
*
*-------------------------------------------------------------------------
@@ -12744,7 +12674,8 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert one huge object, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one huge object, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12791,7 +12722,7 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -12830,9 +12761,6 @@ test_huge_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -12865,16 +12793,16 @@ error:
} /* test_huge_insert_one() */
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_two
+ * Function: test_huge_insert_two
*
- * Purpose: Test inserting two huge objects in the heap
+ * Purpose: Test inserting two huge objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -12897,7 +12825,8 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert two huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two huge objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -12946,7 +12875,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object too large for managed heap blocks */
@@ -12976,7 +12905,7 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13060,9 +12989,6 @@ test_huge_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -13097,16 +13023,16 @@ error:
} /* test_huge_insert_two() */
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_three
+ * Function: test_huge_insert_three
*
- * Purpose: Test inserting three huge objects in the heap
+ * Purpose: Test inserting three huge objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -13130,7 +13056,8 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert three huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert three huge objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -13181,7 +13108,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object too large for managed heap blocks */
@@ -13211,7 +13138,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert third object too large for managed heap blocks */
@@ -13241,7 +13168,7 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13365,9 +13292,6 @@ test_huge_insert_three(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tp
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -13404,16 +13328,16 @@ error:
} /* test_huge_insert_three() */
/*-------------------------------------------------------------------------
- * Function: test_huge_insert_mix
+ * Function: test_huge_insert_mix
*
- * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap
+ * Purpose: Test inserting a mix of 'normal' & 'huge' objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, August 11, 2006
*
*-------------------------------------------------------------------------
@@ -13439,7 +13363,8 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char *base_desc = "insert mix of normal & huge objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert mix of normal & huge objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -13494,7 +13419,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object too large for managed heap blocks */
@@ -13524,7 +13449,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert third object too large for managed heap blocks */
@@ -13554,7 +13479,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert fourth object small enough to fit into 'normal' heap blocks */
@@ -13591,7 +13516,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id4, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert fifth object small enough to fit into 'normal' heap blocks */
@@ -13629,7 +13554,7 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id5, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -13788,9 +13713,6 @@ test_huge_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -13831,14 +13753,14 @@ error:
} /* test_huge_insert_mix() */
/*-------------------------------------------------------------------------
- * Function: test_filtered_huge
+ * Function: test_filtered_huge
*
- * Purpose: Test storing 'huge' object in a heap with I/O filters
+ * Purpose: Test storing 'huge' object in a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, August 15, 2006
*
*-------------------------------------------------------------------------
@@ -13865,8 +13787,8 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
size_t old_actual_id_len = 0; /* Old actual ID length */
hbool_t huge_ids_direct; /* Are 'huge' objects directly acccessed? */
hbool_t pline_init = FALSE; /* Whether the I/O pipeline has been initialized */
- const char * base_desc =
- "insert 'huge' object into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert 'huge' object into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -13929,7 +13851,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
if (reopen_heap(f, &fh, fh_addr, tparam) < 0)
TEST_ERROR
-/* QAK */
#ifdef QAK
/* Close the fractal heap */
if (H5HF_close(fh) < 0)
@@ -13956,7 +13877,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
if (NULL == (fh = H5HF_open(f, fh_addr)))
FAIL_STACK_ERROR
#endif /* QAK */
- /* QAK */
/* Check up on heap... */
state.huge_size = obj_size;
@@ -13972,7 +13892,7 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14011,10 +13931,6 @@ test_filtered_huge(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size,
- (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -14046,21 +13962,18 @@ error:
H5E_END_TRY;
return (1);
} /* test_filtered_huge() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_one
+ * Function: test_tiny_insert_one
*
- * Purpose: Test inserting one tiny object in the heap
+ * Purpose: Test inserting one tiny object in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -14082,7 +13995,8 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert one tiny object, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one tiny object, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -14129,7 +14043,7 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14168,9 +14082,6 @@ test_tiny_insert_one(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -14203,16 +14114,16 @@ error:
} /* test_tiny_insert_one() */
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_two
+ * Function: test_tiny_insert_two
*
- * Purpose: Test inserting two tiny objects in the heap
+ * Purpose: Test inserting two tiny objects in the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -14235,7 +14146,8 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc = "insert two tiny objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two tiny objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -14284,7 +14196,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object small enough to encode in heap ID */
@@ -14314,7 +14226,7 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14398,9 +14310,6 @@ test_tiny_insert_two(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -14435,17 +14344,17 @@ error:
} /* test_tiny_insert_two() */
/*-------------------------------------------------------------------------
- * Function: test_tiny_insert_mix
+ * Function: test_tiny_insert_mix
*
- * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in
+ * Purpose: Test inserting a mix of 'normal', 'huge' & 'tiny' objects in
* the heap
*
* Then, remove all the objects, in various ways
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -14473,8 +14382,8 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
size_t robj_size; /* Size of object read */
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
- const char * base_desc =
- "insert mix of normal, huge & tiny objects, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert mix of normal, huge & tiny objects, then remove %s";
/* Perform common test initialization operations */
if (begin_test(tparam, base_desc, &keep_ids, NULL) < 0)
@@ -14533,14 +14442,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on first huge object */
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert second object too large for managed heap blocks */
@@ -14570,14 +14479,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on second huge object */
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id2, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert third object too large for managed heap blocks */
@@ -14607,14 +14516,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id3, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on third huge object */
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id3, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert fourth object small enough to fit into 'normal' heap blocks */
@@ -14651,14 +14560,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id4, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on fourth ('normal') object */
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id4, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert fifth object small enough to fit into 'normal' heap blocks */
@@ -14696,14 +14605,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id5, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on fifth ('normal') object */
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id5, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert sixth object small enough to encode in heap ID */
@@ -14733,14 +14642,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id6, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on sixth ('tiny') object */
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id6, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Insert seventh object small enough to encode in heap ID */
@@ -14770,14 +14679,14 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id7, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Check 'op' functionality on seventh ('tiny') object */
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_op(fh, heap_id7, op_memcpy, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -14998,9 +14907,6 @@ test_tiny_insert_mix(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tpar
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15043,20 +14949,16 @@ error:
H5E_END_TRY;
return (1);
} /* test_tiny_insert_mix() */
-#endif /* QAK */
-#endif /* QAK2 */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_filtered_man_root_direct
+ * Function: test_filtered_man_root_direct
*
- * Purpose: Test storing one 'managed' object in a heap with I/O filters
+ * Purpose: Test storing one 'managed' object in a heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, August 14, 2006
*
*-------------------------------------------------------------------------
@@ -15081,8 +14983,8 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
unsigned deflate_level; /* Deflation level */
- const char * base_desc =
- "insert one 'managed' object into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert one 'managed' object into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -15154,7 +15056,7 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -15196,10 +15098,6 @@ test_filtered_man_root_direct(hid_t fapl, H5HF_create_t *cparam, fheap_test_para
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size,
- (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15226,14 +15124,14 @@ error:
} /* test_filtered_man_root_direct() */
/*-------------------------------------------------------------------------
- * Function: test_filtered_man_root_indirect
+ * Function: test_filtered_man_root_indirect
*
- * Purpose: Test storing several objects in a 'managed heap with I/O filters
+ * Purpose: Test storing several objects in a 'managed heap with I/O filters
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, October 24, 2006
*
*-------------------------------------------------------------------------
@@ -15259,8 +15157,8 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
unsigned char obj_type; /* Type of storage for object */
fheap_heap_state_t state; /* State of fractal heap */
unsigned deflate_level; /* Deflation level */
- const char * base_desc =
- "insert two 'managed' objects into heap with I/O filters, then remove %s"; /* Test description */
+ /* Test description */
+ const char *base_desc = "insert two 'managed' objects into heap with I/O filters, then remove %s";
/* Copy heap creation properties */
HDmemcpy(&tmp_cparam, cparam, sizeof(H5HF_create_t));
@@ -15341,7 +15239,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id1, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Read in ('normal') object #2 */
@@ -15352,7 +15250,7 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
HDmemset(shared_robj_g, 0, obj_size);
if (H5HF_read(fh, heap_id2, shared_robj_g) < 0)
FAIL_STACK_ERROR
- if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size))
+ if (HDmemcmp(shared_wobj_g, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Delete individual objects, if we won't be deleting the entire heap later */
@@ -15526,10 +15424,6 @@ test_filtered_man_root_indirect(hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu, file_size = %lu\n", (unsigned long)empty_size,
- (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15554,23 +15448,20 @@ error:
H5E_END_TRY;
return (1);
} /* test_filtered_man_root_indirect() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_random
+ * Function: test_random
*
- * Purpose: Test inserting random sized objects into a heap, and read
+ * Purpose: Test inserting random sized objects into a heap, and read
* them back.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, May 9, 2006
*
*-------------------------------------------------------------------------
@@ -15642,10 +15533,10 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
- /* seed = (unsigned long)1156158635; */
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#if 0
+/* seed = (unsigned long)1156158635; */
+HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+#endif
HDsrandom((unsigned)seed);
/* Loop over adding objects to the heap, until the size limit is reached */
@@ -15666,10 +15557,6 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Increment the amount of objects added */
total_obj_added += obj_size;
} /* end while */
-#ifdef QAK
- HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %Hu\n", keep_ids.num_ids,
- total_obj_added, size_limit);
-#endif /* QAK */
/* Randomize the order of the IDs kept */
for (u = 0; u < keep_ids.num_ids; u++) {
@@ -15728,9 +15615,6 @@ test_random(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_test_pa
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15769,19 +15653,19 @@ error:
} /* test_random() */
/*-------------------------------------------------------------------------
- * Function: test_random_pow2
+ * Function: test_random_pow2
*
- * Purpose: Test inserting random sized objects with a "power of 2
+ * Purpose: Test inserting random sized objects with a "power of 2
* distribution" (which favors small objects) into a heap,
* and read them back.
*
* Then, go back and remove all objects
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: 1
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, May 15, 2006
*
*-------------------------------------------------------------------------
@@ -15855,10 +15739,10 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
/* Choose random # seed */
seed = (unsigned long)HDtime(NULL);
-#ifdef QAK
- /* seed = (unsigned long)1155181717; */
- HDfprintf(stderr, "Random # seed was: %lu\n", seed);
-#endif /* QAK */
+#if 0
+/* seed = (unsigned long)1155181717; */
+HDfprintf(stderr, "Random # seed was: %lu\n", seed);
+#endif
HDsrandom((unsigned)seed);
/* Loop over adding objects to the heap, until the size limit is reached */
@@ -15891,10 +15775,6 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
/* Increment the amount of objects added */
total_obj_added += obj_size;
} /* end while */
-#ifdef QAK
- HDfprintf(stderr, "keep_ids.num_ids = %Zu, total_obj_added = %Hu, size_limit = %Hu\n", keep_ids.num_ids,
- total_obj_added, size_limit);
-#endif /* QAK */
/* Randomize the order of the IDs kept */
for (u = 0; u < keep_ids.num_ids; u++) {
@@ -15953,10 +15833,6 @@ test_random_pow2(hsize_t size_limit, hid_t fapl, H5HF_create_t *cparam, fheap_te
/* Get the size of the file */
if ((file_size = h5_get_file_size(filename, fapl)) < 0)
TEST_ERROR
-#ifdef QAK
- HDfprintf(stderr, "empty_size = %lu\n", (unsigned long)empty_size);
- HDfprintf(stderr, "file_size = %lu\n", (unsigned long)file_size);
-#endif /* QAK */
/* Verify the file is correct size */
if (file_size != empty_size)
@@ -15992,19 +15868,16 @@ error:
H5E_END_TRY;
return (1);
} /* test_random_pow2() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_write
+ * Function: test_write
*
- * Purpose: Test inserting objects, then changing the value for them.
+ * Purpose: Test inserting objects, then changing the value for them.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Monday, December 18, 2006
*
*-------------------------------------------------------------------------
@@ -16189,7 +16062,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Compare data read in */
- if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size))
+ if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Change size of data to write */
@@ -16238,7 +16111,7 @@ test_write(hid_t fapl, H5HF_create_t *cparam, fheap_test_param_t *tparam)
FAIL_STACK_ERROR
/* Compare data read in */
- if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size))
+ if (HDmemcmp(rewrite_obj, shared_robj_g, obj_size) != 0)
TEST_ERROR
/* Change size of data to write */
@@ -16286,21 +16159,18 @@ error:
H5E_END_TRY;
return (1);
} /* test_write() */
-#endif /* QAK */
-
-#ifndef QAK
/*-------------------------------------------------------------------------
- * Function: test_bug1
+ * Function: test_bug1
*
- * Purpose: Test inserting several objects, then deleting one and
+ * Purpose: Test inserting several objects, then deleting one and
* re-inserting an object, along with opening and closing
* the file.
*
- * Return: Success: 0
- * Failure: 1
+ * Return: Success: 0
+ * Failure: 1
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Tuesday, November 28, 2006
*
*-------------------------------------------------------------------------
@@ -16461,18 +16331,17 @@ error:
H5E_END_TRY;
return (1);
} /* test_bug1() */
-#endif /* QAK */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test the fractal heap code
+ * Purpose: Test the fractal heap code
*
- * Return: Success:
+ * Return: Success:
*
- * Failure:
+ * Failure:
*
- * Programmer: Quincey Koziol
+ * Programmer: Quincey Koziol
* Friday, February 24, 2006
*
*-------------------------------------------------------------------------
@@ -16501,7 +16370,7 @@ main(void)
envval = "nomatch";
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(envval, "split") != 0 && HDstrcmp(envval, "multi") != 0);
/* Reset library */
h5_reset();
diff --git a/test/fillval.c b/test/fillval.c
index 673b267..4215c89 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -935,7 +935,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
HDfprintf(stdout,
- " Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %u, "
+ " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE
+ "}, read: %u, "
"Fill value: %u\n",
hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], val_rd,
fillval);
@@ -952,7 +953,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
HDfprintf(stdout,
- " Elmt={%Hu,%Hu,%Hu,%Hu,%Hu}, read: %f, %d, %f, %c"
+ " Elmt={%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE ",%" PRIuHSIZE
+ "}, read: %f, %d, %f, %c"
"Fill value: %f, %d, %f, %c\n",
hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4],
(double)rd_c.a, rd_c.x, rd_c.y, rd_c.z, (double)fill_c.a, fill_c.x, fill_c.y,
@@ -994,7 +996,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
HDfprintf(stdout,
- " Elmt={%Hu, %Hu, %Hu, %Hu, %Hu}, read: %u, "
+ " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ ", %" PRIuHSIZE "}, read: %u, "
"Fill value: %u\n",
hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4], buf[u],
fillval);
@@ -1020,7 +1023,8 @@ test_rdwr_cases(hid_t file, hid_t dcpl, const char *dname, void *_fillval, H5D_f
H5_FAILED();
HDfprintf(stdout, "%u: Value read was not a fill value.\n", (unsigned)__LINE__);
HDfprintf(stdout,
- " Elmt={%Hu, %Hu, %Hu, %Hu, %Hu}, read: %f, %d, %f, %c"
+ " Elmt={%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ ", %" PRIuHSIZE "}, read: %f, %d, %f, %c"
"Fill value: %f, %d, %f, %c\n",
hs_offset[0], hs_offset[1], hs_offset[2], hs_offset[3], hs_offset[4],
(double)buf_c[u].a, buf_c[u].x, buf_c[u].y, buf_c[u].z, (double)fill_c.a,
@@ -1445,7 +1449,8 @@ test_extend_verify_integer(unsigned lineno, const hsize_t *offset, const void *_
if (*test_val != *compare_val) {
HDfprintf(stdout, "%u: Value read was not expected.\n", lineno);
HDfprintf(stdout,
- " Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: %d, "
+ " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ "}, read: %d, "
"expected: %d\n",
offset[0], offset[1], offset[2], offset[3], offset[4], *test_val, *compare_val);
goto error;
@@ -1536,7 +1541,8 @@ test_extend_verify_cmpd_vl(unsigned lineno, const hsize_t *offset, const void *_
HDstrcmp(test_val->b, compare_val->b) != 0 || (test_val->y != compare_val->y)) {
HDfprintf(stdout, "%u: Value read was not expected.\n", lineno);
HDfprintf(stdout,
- " Elmt = {%Hu, %Hu, %Hu, %Hu, %Hu}, read: {%d, '%s', '%s', %d} "
+ " Elmt = {%" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE ", %" PRIuHSIZE
+ "}, read: {%d, '%s', '%s', %d} "
"expected: {%d, '%s', '%s', %d}\n",
offset[0], offset[1], offset[2], offset[3], offset[4], test_val->x, test_val->a,
test_val->b, test_val->y, compare_val->x, compare_val->a, compare_val->b, compare_val->y);
diff --git a/test/filter_plugin1_dsets.c b/test/filter_plugin1_dsets.c
index 7f9a664..5d6c1ef 100644
--- a/test/filter_plugin1_dsets.c
+++ b/test/filter_plugin1_dsets.c
@@ -26,14 +26,14 @@ static size_t add_sub_value(unsigned int flags, size_t cd_nelmts, const unsigned
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER1_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 1", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)add_sub_value, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER1_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 1", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ add_sub_value, /* The actual filter function */
}};
H5PL_type_t
diff --git a/test/filter_plugin2_dsets.c b/test/filter_plugin2_dsets.c
index 08be78c..d2011d4 100644
--- a/test/filter_plugin2_dsets.c
+++ b/test/filter_plugin2_dsets.c
@@ -27,14 +27,14 @@ static size_t mult_div_value(unsigned int flags, size_t cd_nelmts, const unsigne
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER2_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 2", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)mult_div_value, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER2_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 2", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ mult_div_value, /* The actual filter function */
}};
H5PL_type_t
@@ -73,7 +73,7 @@ mult_div_value(unsigned int flags, size_t cd_nelmts, const unsigned int *cd_valu
return 0;
/* Assignment to eliminate unused parameter warning */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) {
/* READ - Divide the original value by MULTIPLIER */
diff --git a/test/filter_plugin3_dsets.c b/test/filter_plugin3_dsets.c
index 5d8d57f..618ce06 100644
--- a/test/filter_plugin3_dsets.c
+++ b/test/filter_plugin3_dsets.c
@@ -30,14 +30,14 @@ static size_t add_sub_value_hdf5(unsigned int flags, size_t cd_nelmts, const uns
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER3_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 3", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)add_sub_value_hdf5, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER3_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 3", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ add_sub_value_hdf5, /* The actual filter function */
}};
H5PL_type_t
diff --git a/test/filter_plugin4_groups.c b/test/filter_plugin4_groups.c
index 237642d..630dcd6 100644
--- a/test/filter_plugin4_groups.c
+++ b/test/filter_plugin4_groups.c
@@ -29,14 +29,14 @@ static size_t append_to_group_name(unsigned int flags, size_t cd_nelmts, const u
/* Filter class struct */
const H5Z_class2_t FILTER_INFO[1] = {{
- H5Z_CLASS_T_VERS, /* H5Z_class_t version */
- FILTER4_ID, /* Filter ID number */
- 1, /* Encoding enabled */
- 1, /* Decoding enabled */
- "test filter plugin 4", /* Filter name for debugging */
- NULL, /* The "can apply" callback */
- NULL, /* The "set local" callback */
- (H5Z_func_t)append_to_group_name, /* The actual filter function */
+ H5Z_CLASS_T_VERS, /* H5Z_class_t version */
+ FILTER4_ID, /* Filter ID number */
+ 1, /* Encoding enabled */
+ 1, /* Decoding enabled */
+ "test filter plugin 4", /* Filter name for debugging */
+ NULL, /* The "can apply" callback */
+ NULL, /* The "set local" callback */
+ append_to_group_name, /* The actual filter function */
}};
H5PL_type_t
@@ -74,7 +74,7 @@ append_to_group_name(unsigned int flags, size_t cd_nelmts, const unsigned int *c
return 0;
/* Assignment to eliminate unused parameter warning. */
- cd_values = cd_values;
+ (void)cd_values;
if (flags & H5Z_FLAG_REVERSE) {
/* READ - Remove the suffix from the group name */
diff --git a/test/freespace.c b/test/freespace.c
index 52fd097..e888b2b 100644
--- a/test/freespace.c
+++ b/test/freespace.c
@@ -400,22 +400,27 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, frspace_state_t *state)
FAIL_STACK_ERROR
if (frspace_stats.tot_space != state->tot_space) {
- HDfprintf(stdout, "frspace_stats.tot_space = %Hu, state->tot_space = %Zu\n", frspace_stats.tot_space,
- state->tot_space);
+ HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
+ frspace_stats.tot_space, state->tot_space);
TEST_ERROR
} /* end if */
if (frspace_stats.tot_sect_count != state->tot_sect_count) {
- HDfprintf(stdout, "frspace_stats.tot_sect_count = %Hu, state->tot_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
frspace_stats.tot_sect_count, state->tot_sect_count);
TEST_ERROR
} /* end if */
if (frspace_stats.serial_sect_count != state->serial_sect_count) {
- HDfprintf(stdout, "frspace_stats.serial_sect_count = %Hu, state->serial_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
+ "\n",
frspace_stats.serial_sect_count, state->serial_sect_count);
TEST_ERROR
} /* end if */
if (frspace_stats.ghost_sect_count != state->ghost_sect_count) {
- HDfprintf(stdout, "frspace_stats.ghost_sect_count = %Hu, state->ghost_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE
+ "\n",
frspace_stats.ghost_sect_count, state->ghost_sect_count);
TEST_ERROR
} /* end if */
diff --git a/test/gen_new_array.c b/test/gen_new_array.c
index 7fe4686..5811106 100644
--- a/test/gen_new_array.c
+++ b/test/gen_new_array.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, November 09, 2000
*
* Purpose: Create a two datasets, one with a compound datatypes with array
diff --git a/test/gen_new_fill.c b/test/gen_new_fill.c
index 58afecb..2c18f59 100644
--- a/test/gen_new_fill.c
+++ b/test/gen_new_fill.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu <slu@ncsa.uiuc.edu>
+ * Programmer: Raymond Lu
* Feb 27, 2002
*
* Purpose: This program is run to generate a HDF5 data file with fill
diff --git a/test/gen_new_group.c b/test/gen_new_group.c
index 489f409..3557192 100644
--- a/test/gen_new_group.c
+++ b/test/gen_new_group.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Oct 24, 2005
*
* Purpose: This program is run to generate an HDF5 data file with both
diff --git a/test/gen_new_mtime.c b/test/gen_new_mtime.c
index baf4dd0..bb977ad 100644
--- a/test/gen_new_mtime.c
+++ b/test/gen_new_mtime.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 3, 2003
*
* Purpose: Create a dataset, which should have the newer mtime information
diff --git a/test/gen_new_super.c b/test/gen_new_super.c
index ec2e93b..ce2f88a 100644
--- a/test/gen_new_super.c
+++ b/test/gen_new_super.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, July 15, 2003
*
* Purpose: Create a file which will have the newer superblock format.
diff --git a/test/gen_old_array.c b/test/gen_old_array.c
index ad798a8..9755896 100644
--- a/test/gen_old_array.c
+++ b/test/gen_old_array.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, November 09, 2000
*
* Purpose: Create a two datasets with compound datatypes, one with no array
diff --git a/test/gen_old_group.c b/test/gen_old_group.c
index faa9532..1b4e0b2 100644
--- a/test/gen_old_group.c
+++ b/test/gen_old_group.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Oct 24, 2005
*
* Purpose: This program is run to generate an HDF5 data file with an
diff --git a/test/gen_old_layout.c b/test/gen_old_layout.c
index 34eb2f5..4412078 100644
--- a/test/gen_old_layout.c
+++ b/test/gen_old_layout.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Thursday, May 27, 2004
*
* Purpose: Create two datasets (one for version 1 and one for version 2 of
diff --git a/test/gen_old_mtime.c b/test/gen_old_mtime.c
index 90fc561..0ec3486 100644
--- a/test/gen_old_mtime.c
+++ b/test/gen_old_mtime.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Friday, January 3, 2003
*
* Purpose: Create a dataset, which should have the older mtime information
diff --git a/test/gen_plist.c b/test/gen_plist.c
index 8bae408..7a67c56 100644
--- a/test/gen_plist.c
+++ b/test/gen_plist.c
@@ -459,7 +459,7 @@ encode_plist(hid_t plist_id, int little_endian, int word_length, const char *fil
if ((ret = H5Pencode2(plist_id, NULL, &temp_size, H5P_DEFAULT)) < 0)
HDassert(ret > 0);
- temp_buf = HDcalloc(1, temp_size);
+ temp_buf = (void *)HDmalloc(temp_size);
HDassert(temp_buf);
if ((ret = H5Pencode2(plist_id, temp_buf, &temp_size, H5P_DEFAULT)) < 0)
diff --git a/test/gen_sizes_lheap.c b/test/gen_sizes_lheap.c
index a94789b..8f090e8 100644
--- a/test/gen_sizes_lheap.c
+++ b/test/gen_sizes_lheap.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Thursday, July 15, 2010
*
* Purpose: Creates a file with non-default sizes of lengths and addresses.
diff --git a/test/gen_specmetaread.c b/test/gen_specmetaread.c
index 0664390..5ec1f98 100644
--- a/test/gen_specmetaread.c
+++ b/test/gen_specmetaread.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@hdfgroup.org>
+ * Programmer: Quincey Koziol
* Thursday, October 8, 2009
*
* Purpose: Create a file with a dataset who's raw data immediately follows
diff --git a/test/gen_udlinks.c b/test/gen_udlinks.c
index 4b68647..d41625a 100644
--- a/test/gen_udlinks.c
+++ b/test/gen_udlinks.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: James Laird <jlaird@hdfgroup.org>
+ * Programmer: James Laird
* Tuesday, June 6, 2006
*
* This program creates HDF5 files with user-defined links. These files
diff --git a/test/hyperslab.c b/test/hyperslab.c
index a867430..41528ad 100644
--- a/test/hyperslab.c
+++ b/test/hyperslab.c
@@ -1114,8 +1114,8 @@ test_array_offset_n_calc(size_t n, size_t x, size_t y, size_t z)
/* Check computed coordinates */
for (v = 0; v < ARRAY_OFFSET_NDIMS; v++)
if (coords[v] != new_coords[v]) {
- HDfprintf(stderr, "coords[%u]=%Hu, new_coords[%u]=%Hu\n", (unsigned)v, coords[v], (unsigned)v,
- new_coords[v]);
+ HDfprintf(stderr, "coords[%zu]=%" PRIuHSIZE ", new_coords[%zu]=%" PRIuHSIZE "\n", v,
+ coords[v], v, new_coords[v]);
TEST_ERROR;
} /* end if */
} /* end for */
diff --git a/test/links_env.c b/test/links_env.c
index 250e786..590be20 100644
--- a/test/links_env.c
+++ b/test/links_env.c
@@ -69,7 +69,7 @@ external_link_env(hid_t fapl, hbool_t new_format)
if ((envval = HDgetenv("HDF5_EXT_PREFIX")) == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, ".:tmp_links_env"))
+ if (HDstrcmp(envval, ".:tmp_links_env") != 0)
TEST_ERROR
/* Set up name for main file:"extlinks_env0" */
@@ -115,7 +115,7 @@ external_link_env(hid_t fapl, hbool_t new_format)
/* Should be able to find the target file from pathnames set via HDF5_EXT_PREFIX */
if (gid < 0) {
H5_FAILED();
- puts(" Should have found the file in tmp_links_env directory.");
+ HDputs(" Should have found the file in tmp_links_env directory.");
goto error;
}
diff --git a/test/mf.c b/test/mf.c
index c53b6f1..c753c2b 100644
--- a/test/mf.c
+++ b/test/mf.c
@@ -168,22 +168,27 @@ check_stats(const H5F_t *f, const H5FS_t *frsp, H5FS_stat_t *state)
FAIL_STACK_ERROR
if (frspace_stats.tot_space != state->tot_space) {
- HDfprintf(stdout, "frspace_stats.tot_space = %Hu, state->tot_space = %Zu\n", frspace_stats.tot_space,
- state->tot_space);
+ HDfprintf(stdout, "frspace_stats.tot_space = %" PRIuHSIZE ", state->tot_space = %" PRIuHSIZE "\n",
+ frspace_stats.tot_space, state->tot_space);
TEST_ERROR
} /* end if */
if (frspace_stats.tot_sect_count != state->tot_sect_count) {
- HDfprintf(stdout, "frspace_stats.tot_sect_count = %Hu, state->tot_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.tot_sect_count = %" PRIuHSIZE ", state->tot_sect_count = %" PRIuHSIZE "\n",
frspace_stats.tot_sect_count, state->tot_sect_count);
TEST_ERROR
} /* end if */
if (frspace_stats.serial_sect_count != state->serial_sect_count) {
- HDfprintf(stdout, "frspace_stats.serial_sect_count = %Hu, state->serial_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.serial_sect_count = %" PRIuHSIZE ", state->serial_sect_count = %" PRIuHSIZE
+ "\n",
frspace_stats.serial_sect_count, state->serial_sect_count);
TEST_ERROR
} /* end if */
if (frspace_stats.ghost_sect_count != state->ghost_sect_count) {
- HDfprintf(stdout, "frspace_stats.ghost_sect_count = %Hu, state->ghost_sect_count = %Hu\n",
+ HDfprintf(stdout,
+ "frspace_stats.ghost_sect_count = %" PRIuHSIZE ", state->ghost_sect_count = %" PRIuHSIZE
+ "\n",
frspace_stats.ghost_sect_count, state->ghost_sect_count);
TEST_ERROR
} /* end if */
@@ -225,7 +230,7 @@ test_mf_eoa(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -373,7 +378,7 @@ test_mf_eoa_shrink(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -660,7 +665,7 @@ test_mf_eoa_extend(const char *env_h5_drvr, hid_t fapl)
/* Skip test when using VFDs that has different address spaces for each
* type of metadata allocation.
*/
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -867,7 +872,8 @@ test_mf_tmp(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("'temporary' file space allocation with old library format")
/* Can't run this test with multi-file VFDs */
- if (HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") && HDstrcmp(env_h5_drvr, "family")) {
+ if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0) {
char filename[FILENAME_LEN]; /* Filename to use */
H5F_t * f = NULL; /* Internal file object pointer */
h5_stat_size_t file_size, new_file_size; /* file size */
@@ -2011,7 +2017,7 @@ test_mf_fs_absorb(const char *env_h5_drvr, hid_t fapl)
TESTING("A free-space section absorbs an aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2187,7 +2193,7 @@ test_mf_aggr_alloc1(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2338,7 +2344,7 @@ test_mf_aggr_alloc2(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 2");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2496,7 +2502,7 @@ test_mf_aggr_alloc3(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator: test 3");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2664,7 +2670,7 @@ test_mf_aggr_alloc4(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 4");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2813,7 +2819,7 @@ test_mf_aggr_alloc5(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 5");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -2951,7 +2957,7 @@ test_mf_aggr_alloc6(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 6");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3125,7 +3131,7 @@ test_mf_aggr_alloc7(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_alloc() of meta/sdata aggregator:test 7");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3296,7 +3302,7 @@ test_mf_aggr_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_try_extend() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3594,7 +3600,7 @@ test_mf_aggr_absorb(const char *env_h5_drvr, hid_t fapl)
TESTING("H5MF_try_shrink() of meta/sdata aggregator: test 1");
/* Skip test when using VFDs that don't use the metadata aggregator */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -3848,8 +3854,8 @@ test_mf_align_eoa(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4292,8 +4298,8 @@ test_mf_align_fs(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
if ((file_size = h5_get_file_size(filename, new_fapl)) < 0)
TEST_ERROR
@@ -4498,8 +4504,8 @@ test_mf_align_alloc1(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -4760,8 +4766,8 @@ test_mf_align_alloc2(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5105,8 +5111,8 @@ test_mf_align_alloc3(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5418,8 +5424,8 @@ test_mf_align_alloc4(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5636,8 +5642,8 @@ test_mf_align_alloc5(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -5906,8 +5912,8 @@ test_mf_align_alloc6(const char *env_h5_drvr, hid_t fapl, hid_t new_fapl)
/* Skip test when using VFDs that have their own 'alloc' callback, which
* don't push mis-aligned space fragments on the file free space list
*/
- have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") && HDstrcmp(env_h5_drvr, "split") &&
- HDstrcmp(env_h5_drvr, "multi"));
+ have_alloc_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "stdio") != 0 && HDstrcmp(env_h5_drvr, "split") != 0 &&
+ HDstrcmp(env_h5_drvr, "multi") != 0);
if (have_alloc_vfd) {
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -6176,7 +6182,7 @@ test_mf_bug1(const char *env_h5_drvr, hid_t fapl)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- free(memb_name[mt]);
+ HDfree(memb_name[mt]);
} /* end else */
/* Close memb_fapl */
@@ -6923,7 +6929,7 @@ test_mf_fs_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
else
TESTING("File's free-space is persistent with old library format")
- if (HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi")) {
+ if (HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0) {
/* File creation property list template */
if ((fcpl = H5Pcreate(H5P_FILE_CREATE)) < 0)
@@ -7100,7 +7106,7 @@ test_mf_fs_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format)
TESTING("File's free-space is going away with old library format")
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -7291,7 +7297,7 @@ test_mf_strat_thres_persist(const char *env_h5_drvr, hid_t fapl, hbool_t new_for
TESTING("File space strategy/persisting/threshold with old library format")
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7461,7 +7467,7 @@ test_mf_strat_thres_gone(const char *env_h5_drvr, hid_t fapl, hbool_t new_format
TESTING("File space merge/shrink for section size < threshold with old library format")
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Set the filename to use for this test (dependent on fapl) */
h5_fixname(FILENAME[0], fapl, filename, sizeof(filename));
@@ -7755,7 +7761,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t is_multi_or_split)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- free(memb_name[mt]);
+ HDfree(memb_name[mt]);
return 0;
@@ -8018,7 +8024,7 @@ test_page_try_shrink(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_shrink()");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8147,8 +8153,8 @@ test_page_small_try_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_extend() a small block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi") &&
- HDstrcmp(env_h5_drvr, "family"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
+ HDstrcmp(env_h5_drvr, "family") != 0);
if (contig_addr_vfd) {
@@ -8326,7 +8332,7 @@ test_page_large_try_extend(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: H5MF_try_extend() a large block");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8490,7 +8496,7 @@ test_page_large(const char *env_h5_drvr, hid_t fapl)
TESTING("Paged aggregation for file space: large allocations and de-allocations");
/* Current VFD that does not support continuous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
if (contig_addr_vfd) {
@@ -8906,7 +8912,7 @@ test_page_alignment(const char *env_h5_drvr, hid_t fapl)
/* Free memb_name */
for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++)
- free(memb_name[mt]);
+ HDfree(memb_name[mt]);
/* Close memb_fapl */
if (H5Pclose(memb_fapl) < 0)
diff --git a/test/mount.c b/test/mount.c
index d59f458..c5ac9b3 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Wednesday, October 7, 1998
*
* Purpose: Tests file mounting.
@@ -1583,7 +1583,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABMX, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/A/B/M/X"))
+ if (HDstrcmp(objname, "/A/B/M/X") != 0)
TEST_ERROR
/* Close object in mounted file */
@@ -1598,7 +1598,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABC, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/A/B/C"))
+ if (HDstrcmp(objname, "/A/B/C") != 0)
TEST_ERROR
/* Close object in mounted file */
@@ -1613,7 +1613,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidABT, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/A/B/T"))
+ if (HDstrcmp(objname, "/A/B/T") != 0)
TEST_ERROR
/* Close object in original file */
@@ -1628,7 +1628,7 @@ test_mount_after_close(hid_t fapl)
*objname = '\0';
if (H5Iget_name(didABMXYD, objname, (size_t)NAME_BUF_SIZE) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(objname, "/A/B/M/X/Y/D"))
+ if (HDstrcmp(objname, "/A/B/M/X/Y/D") != 0)
TEST_ERROR
/* Close object in mounted file */
@@ -1801,7 +1801,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXX, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/M/X/X"))
+ if (HDstrcmp(objname, "/A/M/X/X") != 0)
TEST_ERROR
/* Open group in mounted file #2 */
@@ -1821,7 +1821,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/A/M/X/M/Y"))
+ if (HDstrcmp(objname, "/A/M/X/M/Y") != 0)
TEST_ERROR
/* Unmount second file */
@@ -1832,7 +1832,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/X/M/Y"))
+ if (HDstrcmp(objname, "/X/M/Y") != 0)
TEST_ERROR
/* Rename object in file #3 that is "disconnected" from name hiearchy */
@@ -1852,7 +1852,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidAMXMY, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/X/M/Z"))
+ if (HDstrcmp(objname, "/X/M/Z") != 0)
TEST_ERROR
/* Mount fourth file */
@@ -1868,7 +1868,7 @@ test_mount_after_unmount(hid_t fapl)
*objname = '\0';
if (H5Iget_name(gidBMZ, objname, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(objname, "/B/M/Z"))
+ if (HDstrcmp(objname, "/B/M/Z") != 0)
TEST_ERROR
/* Unmount third file */
@@ -3140,7 +3140,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMT, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(name, "/A/M/T"))
+ if (HDstrcmp(name, "/A/M/T") != 0)
TEST_ERROR
/* Create object in file #3 */
@@ -3158,7 +3158,7 @@ test_mult_mount(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidBS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(name, "/B/S"))
+ if (HDstrcmp(name, "/B/S") != 0)
TEST_ERROR
/* Re-open object created in file #3 through file #1 mount path */
@@ -3339,7 +3339,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/A/M"))
+ if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
TEST_ERROR
/* Unmount file #2 from file #1 */
@@ -3350,7 +3350,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidAM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len != 0 || HDstrcmp(name, ""))
+ if (name_len != 0 || HDstrcmp(name, "") != 0)
TEST_ERROR
/* Open object in file #3 through file #1 mount path (should fail) */
@@ -3370,7 +3370,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(name, "/M/S"))
+ if (HDstrcmp(name, "/M/S") != 0)
TEST_ERROR
/* Close group in file #3 */
@@ -3389,7 +3389,7 @@ test_nested_survive(hid_t fapl)
*name = '\0';
if (H5Iget_name(gidAMS, name, (size_t)NAME_BUF_SIZE) < 0)
TEST_ERROR
- if (HDstrcmp(name, "/A/M/S"))
+ if (HDstrcmp(name, "/A/M/S") != 0)
TEST_ERROR
/* Close group in file #3 */
@@ -3538,7 +3538,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/A/M"))
+ if (name_len == 0 || HDstrcmp(name, "/A/M") != 0)
TEST_ERROR
/* Unmount file #2 from file #1, closing file #1 */
@@ -3549,7 +3549,7 @@ test_close_parent(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/M"))
+ if (name_len == 0 || HDstrcmp(name, "/M") != 0)
TEST_ERROR
/* Just file #2's underlying shared file should be open still */
@@ -3816,7 +3816,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/A/E/M"))
+ if (name_len == 0 || HDstrcmp(name, "/A/E/M") != 0)
TEST_ERROR
/* Open object in file #7 */
@@ -3827,7 +3827,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q"))
+ if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
TEST_ERROR
/* Close file #1 */
@@ -3887,7 +3887,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidK, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/D/K"))
+ if (name_len == 0 || HDstrcmp(name, "/D/K") != 0)
TEST_ERROR
if (H5Gclose(gidK) < 0)
@@ -3910,7 +3910,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/B/H/O"))
+ if (name_len == 0 || HDstrcmp(name, "/B/H/O") != 0)
TEST_ERROR
if (H5Gclose(gidO) < 0)
@@ -3920,14 +3920,14 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidM, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/E/M"))
+ if (name_len == 0 || HDstrcmp(name, "/E/M") != 0)
TEST_ERROR
/* Check the name of "Q" is still defined */
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/B/I/Q"))
+ if (name_len == 0 || HDstrcmp(name, "/B/I/Q") != 0)
TEST_ERROR
/* Check that all seven underlying files are still opened */
@@ -3952,7 +3952,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidQ, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/I/Q"))
+ if (name_len == 0 || HDstrcmp(name, "/I/Q") != 0)
TEST_ERROR
/* Open object in file #6 from file #7 */
@@ -3963,7 +3963,7 @@ test_cut_graph(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidO, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/H/O"))
+ if (name_len == 0 || HDstrcmp(name, "/H/O") != 0)
TEST_ERROR
if (H5Gclose(gidO) < 0)
@@ -4132,7 +4132,7 @@ test_symlink(hid_t fapl)
*name = '\0';
if ((name_len = H5Iget_name(gidL, name, (size_t)NAME_BUF_SIZE)) < 0)
TEST_ERROR
- if (name_len == 0 || HDstrcmp(name, "/L"))
+ if (name_len == 0 || HDstrcmp(name, "/L") != 0)
TEST_ERROR
/* Close file #1 */
diff --git a/test/mtime.c b/test/mtime.c
index 7172dea..78f9065 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Thursday, July 30, 1998
*
* Purpose: Determines if the modification time message is working
@@ -147,7 +147,7 @@ main(void)
H5_FAILED();
/* If this fails, examine H5Omtime.c. Modification time is very
* system dependent (e.g., on Windows DST must be hardcoded). */
- puts(" Old modification time incorrect");
+ HDputs(" Old modification time incorrect");
goto error;
}
if (H5Fclose(file) < 0)
diff --git a/test/ntypes.c b/test/ntypes.c
index 541670b..13cc72a 100644
--- a/test/ntypes.c
+++ b/test/ntypes.c
@@ -12,10 +12,10 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Raymond Lu
+ * Programmer: Raymond Lu
* October 14, 2001
*
- * Purpose: Tests the H5Tget_native_type function.
+ * Purpose: Tests the H5Tget_native_type function.
*/
#include "h5test.h"
@@ -57,16 +57,16 @@ int ipoints3[DIM0][DIM1][5], icheck3[DIM0][DIM1][5];
#define BITFIELD_ENUMB 8
/*-------------------------------------------------------------------------
- * Function: test_atomic_dtype
+ * Function: test_atomic_dtype
*
- * Purpose: Test H5Tget_native_type for atomic datatype
+ * Purpose: Test H5Tget_native_type for atomic datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -291,16 +291,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype2
+ * Function: test_compound_dtype2
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -621,16 +621,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype
+ * Function: test_compound_dtype
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -834,16 +834,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_compound_dtype3
+ * Function: test_compound_dtype3
*
- * Purpose: Test H5Tget_native_type for compound datatype
+ * Purpose: Test H5Tget_native_type for compound datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1075,16 +1075,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_compound_opaque
+ * Function: test_compound_opaque
*
- * Purpose: Test H5Tget_native_type for compound datatype with opaque field
+ * Purpose: Test H5Tget_native_type for compound datatype with opaque field
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Quincey Koziol
- * January 31, 2004
+ * Programmer: Quincey Koziol
+ * January 31, 2004
*
* Modifications:
*
@@ -1302,16 +1302,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_enum_dtype
+ * Function: test_enum_dtype
*
- * Purpose: Test H5Tget_native_type for enumerate datatype
+ * Purpose: Test H5Tget_native_type for enumerate datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1446,16 +1446,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_array_dtype
+ * Function: test_array_dtype
*
- * Purpose: Test H5Tget_native_type for array datatype
+ * Purpose: Test H5Tget_native_type for array datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1634,16 +1634,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_array_dtype2
+ * Function: test_array_dtype2
*
- * Purpose: Test H5Tget_native_type for array datatype
+ * Purpose: Test H5Tget_native_type for array datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1769,16 +1769,16 @@ error:
}
/*-------------------------------------------------------------------------
- * Function: test_vl_dtype
+ * Function: test_vl_dtype
*
- * Purpose: Test H5Tget_native_type for variable length datatype
+ * Purpose: Test H5Tget_native_type for variable length datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1975,16 +1975,16 @@ error:
} /* end test_vl_type() */
/*-------------------------------------------------------------------------
- * Function: test_vlstr_dtype
+ * Function: test_vlstr_dtype
*
- * Purpose: Test H5Tget_native_type for variable length string datatype
+ * Purpose: Test H5Tget_native_type for variable length string datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -1993,21 +1993,17 @@ error:
static herr_t
test_vlstr_dtype(hid_t file)
{
+ /* Information to write */
const char *wdata[SPACE1_DIM1] = {
- "Four score and seven years ago our forefathers brought forth on this continent a new "
- "nation,",
+ "Four score and seven years ago our forefathers brought forth on this continent a new nation,",
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
- "testing whether that nation or any nation so conceived and so dedicated can long "
- "endure."}; /* Information
- to
- write
- */
+ "testing whether that nation or any nation so conceived and so dedicated can long endure."};
char * rdata[SPACE1_DIM1]; /* Information read in */
hbool_t rdata_alloc = FALSE; /* Whether the read data is allocated */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hid_t dataset = -1; /* Dataset ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
@@ -2119,16 +2115,16 @@ error:
} /* end test_vlstr_dtype() */
/*-------------------------------------------------------------------------
- * Function: test_str_dtype
+ * Function: test_str_dtype
*
- * Purpose: Test H5Tget_native_type for fixed-length string datatype
+ * Purpose: Test H5Tget_native_type for fixed-length string datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2139,9 +2135,9 @@ test_str_dtype(hid_t file)
{
const char wdata[SPACE1_DIM1][4] = {"one", "two", "3rd", "4th"}; /* Information to write */
char rdata[SPACE1_DIM1][4]; /* Information read in */
- hid_t dataset = -1; /* Dataset ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hid_t dataset = -1; /* Dataset ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
hsize_t dims1[] = {SPACE1_DIM1};
unsigned i; /* counting variable */
@@ -2241,16 +2237,16 @@ error:
} /* end test_str_dtype() */
/*-------------------------------------------------------------------------
- * Function: test_refer_dtype
+ * Function: test_refer_dtype
*
- * Purpose: Test H5Tget_native_type for reference datatype
+ * Purpose: Test H5Tget_native_type for reference datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2266,10 +2262,10 @@ test_refer_dtype(hid_t file)
float c;
} s1_t;
- hid_t dataset = -1; /* Dataset ID */
+ hid_t dataset = -1; /* Dataset ID */
hid_t group = -1; /* Group ID */
- hid_t sid1 = -1; /* Dataspace ID */
- hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
+ hid_t sid1 = -1; /* Dataspace ID */
+ hid_t tid1 = -1, dtype = -1, native_type = -1; /* Datatype ID */
hsize_t dims1[] = {1};
H5O_type_t obj_type; /* Object type */
hobj_ref_t *wbuf = NULL, /* buffer to write to disk */
@@ -2414,16 +2410,16 @@ error:
} /* test_refer_dtype() */
/*-------------------------------------------------------------------------
- * Function: test_refer_dtype2
+ * Function: test_refer_dtype2
*
- * Purpose: Test H5Tget_native_type for reference
+ * Purpose: Test H5Tget_native_type for reference
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2432,10 +2428,10 @@ error:
static herr_t
test_refer_dtype2(hid_t file)
{
- hid_t dset1 = -1, /* Dataset ID */
+ hid_t dset1 = -1, /* Dataset ID */
dset2 = -1; /* Dereferenced dataset ID */
- hid_t sid1 = -1, /* Dataspace ID #1 */
- sid2 = -1; /* Dataspace ID #2 */
+ hid_t sid1 = -1, /* Dataspace ID #1 */
+ sid2 = -1; /* Dataspace ID #2 */
hid_t dtype = -1, native_type = -1;
hsize_t dims1[] = {1}, dims2[] = {SPACE2_DIM1, SPACE2_DIM2};
hsize_t start[SPACE2_RANK]; /* Starting location of hyperslab */
@@ -2628,16 +2624,16 @@ error:
} /* test_refer_dtype2() */
/*-------------------------------------------------------------------------
- * Function: test_opaque_dtype
+ * Function: test_opaque_dtype
*
- * Purpose: Test H5Tget_native_type for opaque datatype
+ * Purpose: Test H5Tget_native_type for opaque datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
@@ -2727,16 +2723,16 @@ error:
} /* test_opaque_dtype */
/*-------------------------------------------------------------------------
- * Function: test_bitfield_dtype
+ * Function: test_bitfield_dtype
*
- * Purpose: Test H5Tget_native_type for bitfield datatype
+ * Purpose: Test H5Tget_native_type for bitfield datatype
*
- * Return: Success: 0
+ * Return: Success: 0
*
- * Failure: -1
+ * Failure: -1
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
* Raymond Lu
@@ -2894,7 +2890,7 @@ error:
* Return: Success: 0
* Failure: -1
*
- * Programmer: pvn@ncsa.uiuc.edu
+ * Programmer: Pedro Vicente
* September 3, 2004
*
* Modifications:
@@ -3102,12 +3098,12 @@ error:
} /* end test_ninteger() */
/*-------------------------------------------------------------------------
- * Function: main
+ * Function: main
*
- * Purpose: Test H5Tget_native_type for different datatype
+ * Purpose: Test H5Tget_native_type for different datatype
*
- * Programmer: Raymond Lu
- * October 15, 2002
+ * Programmer: Raymond Lu
+ * October 15, 2002
*
* Modifications:
*
diff --git a/test/pool.c b/test/pool.c
index b6e3765..9ce1846 100644
--- a/test/pool.c
+++ b/test/pool.c
@@ -11,7 +11,7 @@
* help@hdfgroup.org. *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
-/* Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+/* Programmer: Quincey Koziol
* Tuesday, May 3, 2005
*/
#include "h5test.h"
@@ -660,10 +660,10 @@ test_allocate_random(void)
/* Initialize random number seed */
curr_time = HDtime(NULL);
-#ifdef QAK
- curr_time = 1115412944;
- HDfprintf(stderr, "curr_time=%lu\n", (unsigned long)curr_time);
-#endif /* QAK */
+#if 0
+curr_time=1115412944;
+HDfprintf(stderr,"curr_time=%lu\n",(unsigned long)curr_time);
+#endif
HDsrandom((unsigned)curr_time);
/* Create a memory pool */
@@ -784,11 +784,11 @@ main(void)
if (nerrors)
goto error;
- puts("All memory pool tests passed.");
+ HDputs("All memory pool tests passed.");
return 0;
error:
- puts("*** TESTS FAILED ***");
+ HDputs("*** TESTS FAILED ***");
return 1;
}
diff --git a/test/reserved.c b/test/reserved.c
index 1ea73a6..6e41a16 100644
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -126,7 +126,7 @@ rsrv_heap(void)
/* If we can read a dataset from the file, the file has been flushed to disk
* (if the heap or object headers weren't flushed, the file would be empty).
*/
- if (dataset_id == H5I_BADID)
+ if (dataset_id == H5I_INVALID_HID)
TEST_ERROR;
if (H5Dclose(dataset_id) < 0)
@@ -268,7 +268,7 @@ rsrv_ohdr(void)
/* If we can read the dataset from the file, the file has been flushed to disk
* (if the heap or object headers weren't flushed, the file would be empty).
*/
- if (dataset_id == H5I_BADID)
+ if (dataset_id == H5I_INVALID_HID)
TEST_ERROR;
if (H5Dclose(dataset_id) < 0)
@@ -432,7 +432,7 @@ rsrv_vlen(void)
/* If we can read the dataset from the file, the file has been flushed to disk
* (if the heap or object headers weren't flushed, the file would be empty).
*/
- if (dataset_id == H5I_BADID)
+ if (dataset_id == H5I_INVALID_HID)
TEST_ERROR;
if (H5Dclose(dataset_id) < 0)
diff --git a/test/ros3.c b/test/ros3.c
index 9eb8768..54518f4 100644
--- a/test/ros3.c
+++ b/test/ros3.c
@@ -20,7 +20,7 @@
*
* Demonstrates basic use cases and fapl/dxpl interaction.
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2017-10-11
*/
@@ -193,15 +193,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_long(long expected, long actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ }
+}
+
#define JSERR_LONG(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if (reason != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
- } \
+ jserr_long((long)(expected), (long)(actual), (reason)); \
}
/*----------------------------------------------------------------------------
@@ -232,15 +238,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_str(const char *expected, const char *actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ }
+}
+
#define JSERR_STR(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
- } \
+ jserr_str((expected), (actual), (reason)); \
}
#ifdef JSVERIFY_EXP_ACT
@@ -306,7 +318,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -351,7 +363,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -548,8 +560,8 @@ test_fapl_config_validation(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -829,8 +841,8 @@ test_vfd_open(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -972,15 +984,15 @@ test_eof_eoa(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1083,15 +1095,15 @@ test_H5FDread_without_eoa_set_fails(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1257,15 +1269,15 @@ test_read(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1401,8 +1413,8 @@ test_noops_and_autofails(void)
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1438,15 +1450,6 @@ test_noops_and_autofails(void)
H5E_BEGIN_TRY{
JSVERIFY(FAIL, H5FDtruncate(file, H5P_DEFAULT, TRUE), "truncate must fail (closing)")} H5E_END_TRY;
- /* no-op calls to `lock()` and `unlock()`
- */
- JSVERIFY(SUCCEED, H5FDlock(file, TRUE), "lock always succeeds; has no effect")
- JSVERIFY(SUCCEED, H5FDlock(file, FALSE), NULL)
- JSVERIFY(SUCCEED, H5FDunlock(file), NULL)
- /* Lock/unlock with null file or similar error crashes tests.
- * HDassert in calling heirarchy, `H5FD[un]lock()` and `H5FD_[un]lock()`
- */
-
/************
* TEARDOWN *
************/
@@ -1530,15 +1533,15 @@ test_cmp(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1654,15 +1657,15 @@ test_H5F_integration(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1709,7 +1712,7 @@ error:
* CLEANUP *
***********/
HDprintf("\nerror!");
- fflush(stdout);
+ HDfflush(stdout);
if (fapl_id >= 0) {
H5E_BEGIN_TRY
diff --git a/test/s3comms.c b/test/s3comms.c
index 6ddb8a3..6202af3 100644
--- a/test/s3comms.c
+++ b/test/s3comms.c
@@ -15,7 +15,7 @@
*
* Purpose: Unit tests for the S3 Communications (s3comms) module.
*
- * Programmer: Jacob Smith <jake.smith@hdfgroup.org>
+ * Programmer: Jacob Smith
* 2017-10-11
*/
@@ -181,15 +181,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_long(long expected, long actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf(" ! Expected %ld\n ! Actual %ld\n", expected, actual);
+ }
+}
+
#define JSERR_LONG(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if (reason != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf(" ! Expected %ld\n ! Actual %ld\n", (long)(expected), (long)(actual)); \
- } \
+ jserr_long((long)(expected), (long)(actual), reason); \
}
/*----------------------------------------------------------------------------
@@ -220,15 +226,21 @@
*
*----------------------------------------------------------------------------
*/
+static inline void
+jserr_str(const char *expected, const char *actual, const char *reason)
+{
+ if (reason != NULL) {
+ HDprintf("%s\n", reason);
+ }
+ else {
+ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", expected, actual);
+ }
+}
+
#define JSERR_STR(expected, actual, reason) \
{ \
JSFAILED_AT() \
- if ((reason) != NULL) { \
- HDprintf("%s\n", (reason)); \
- } \
- else { \
- HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \
- } \
+ jserr_str((expected), (actual), (reason)); \
}
#ifdef JSVERIFY_EXP_ACT
@@ -299,7 +311,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -347,7 +359,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -1269,10 +1281,10 @@ test_HMAC_SHA256(void)
cases[i].msg);
if (cases[i].ret == SUCCEED) {
#ifdef VERBOSE
- if (0 != strncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) {
+ if (0 != HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp))) {
/* print out how wrong things are, and then fail
*/
- dest = (char *)realloc(dest, cases[i].dest_size + 1);
+ dest = (char *)HDrealloc(dest, cases[i].dest_size + 1);
HDassert(dest != NULL);
dest[cases[i].dest_size] = 0;
HDfprintf(stdout, "ERROR:\n!!! \"%s\"\n != \"%s\"\n", cases[i].exp, dest);
@@ -1281,17 +1293,17 @@ test_HMAC_SHA256(void)
#else /* VERBOSE not defined */
/* simple pass/fail test
*/
- JSVERIFY(0, strncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL);
+ JSVERIFY(0, HDstrncmp(cases[i].exp, dest, HDstrlen(cases[i].exp)), NULL);
#endif /* VERBOSE */
}
- free(dest);
+ HDfree(dest);
}
PASSED();
return 0;
error:
- free(dest);
+ HDfree(dest);
return -1;
} /* end test_HMAC_SHA256() */
@@ -1357,9 +1369,9 @@ test_nlowercase(void)
JSVERIFY(SUCCEED, H5FD_s3comms_nlowercase(dest, cases[i].in, cases[i].len), cases[i].in)
if (cases[i].len > 0) {
- JSVERIFY(0, strncmp(dest, cases[i].exp, cases[i].len), NULL)
+ JSVERIFY(0, HDstrncmp(dest, cases[i].exp, cases[i].len), NULL)
}
- free(dest);
+ HDfree(dest);
} /* end for each testcase */
JSVERIFY(FAIL, H5FD_s3comms_nlowercase(NULL, cases[0].in, cases[0].len), "null distination should fail")
@@ -1368,7 +1380,7 @@ test_nlowercase(void)
return 0;
error:
- free(dest);
+ HDfree(dest);
return -1;
} /* end test_nlowercase() */
@@ -1729,7 +1741,7 @@ test_percent_encode_char(void)
JSVERIFY(SUCCEED, H5FD_s3comms_percent_encode_char(dest, (const unsigned char)cases[i].c, &dest_len),
NULL)
JSVERIFY(cases[i].exp_len, dest_len, NULL)
- JSVERIFY(0, strncmp(dest, cases[i].exp, dest_len), NULL)
+ JSVERIFY(0, HDstrncmp(dest, cases[i].exp, dest_len), NULL)
JSVERIFY_STR(cases[i].exp, dest, NULL)
}
@@ -1768,8 +1780,8 @@ test_s3r_get_filesize(void)
*/
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1828,14 +1840,14 @@ test_s3r_open(void)
if (s3_test_credentials_loaded == 0) {
SKIPPED();
- puts(" s3 credentials are not loaded");
- fflush(stdout);
+ HDputs(" s3 credentials are not loaded");
+ HDfflush(stdout);
return 0;
}
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -1861,7 +1873,7 @@ test_s3r_open(void)
FAIL_IF(purl->port == NULL);
FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
}
- else if (strcmp(purl->port, "9000") != 0) {
+ else if (HDstrcmp(purl->port, "9000") != 0) {
FAIL_IF(5 < HDsnprintf(purl->port, 5, "9000"))
}
else {
@@ -2032,8 +2044,8 @@ test_s3r_read(void)
*/
if (FALSE == s3_test_bucket_defined) {
SKIPPED();
- puts(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
- fflush(stdout);
+ HDputs(" environment variable HDF5_ROS3_TEST_BUCKET_URL not defined");
+ HDfflush(stdout);
return 0;
}
@@ -2093,7 +2105,7 @@ test_s3r_read(void)
JSVERIFY(SUCCEED, H5FD_s3comms_s3r_read(handle, (haddr_t)6370, (size_t)0, buffer), NULL)
JSVERIFY(
0,
- strncmp(
+ HDstrncmp(
buffer,
"And my soul from out that shadow that lies floating on the floor\nShall be lifted—nevermore!\n",
94),
@@ -2110,7 +2122,7 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)6400, (size_t)100, /* 6400+100 > 6464 */
buffer),
NULL)
- JSVERIFY(0, strcmp("", buffer), NULL)
+ JSVERIFY(0, HDstrcmp("", buffer), NULL)
/************************
* read starts past eof *
@@ -2120,14 +2132,14 @@ test_s3r_read(void)
H5FD_s3comms_s3r_read(handle, (haddr_t)1200699, /* 1200699 > 6464 */
(size_t)100, buffer),
NULL)
- JSVERIFY(0, strcmp("", buffer), NULL)
+ JSVERIFY(0, HDstrcmp("", buffer), NULL)
/**********************
* read starts on eof *
**********************/
JSVERIFY(FAIL, H5FD_s3comms_s3r_read(handle, (haddr_t)6464, (size_t)0, buffer), NULL)
- JSVERIFY(0, strcmp("", buffer), NULL)
+ JSVERIFY(0, HDstrcmp("", buffer), NULL)
/*************
* TEAR DOWN *
@@ -2217,10 +2229,10 @@ test_signing_key(void)
JSVERIFY(SUCCEED, H5FD_s3comms_signing_key(key, cases[i].secret_key, cases[i].region, cases[i].when),
NULL)
- JSVERIFY(0, strncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
- cases[i].exp)
+ JSVERIFY(0, HDstrncmp((const char *)cases[i].exp, (const char *)key, SHA256_DIGEST_LENGTH),
+ (const char *)cases[i].exp)
- free(key);
+ HDfree(key);
key = NULL;
}
@@ -2243,7 +2255,7 @@ test_signing_key(void)
JSVERIFY(FAIL, H5FD_s3comms_signing_key(key, cases[0].secret_key, cases[0].region, NULL),
"time string cannot be NULL")
- free(key);
+ HDfree(key);
key = NULL;
PASSED();
@@ -2251,7 +2263,7 @@ test_signing_key(void)
error:
if (key != NULL) {
- free(key);
+ HDfree(key);
}
return -1;
@@ -2399,9 +2411,9 @@ test_trim(void)
JSVERIFY(SUCCEED, H5FD_s3comms_trim(dest, str, cases[i].in_len, &dest_len), NULL)
JSVERIFY(cases[i].exp_len, dest_len, cases[i].in)
if (dest_len > 0) {
- JSVERIFY(0, strncmp(cases[i].exp, dest, dest_len), cases[i].exp)
+ JSVERIFY(0, HDstrncmp(cases[i].exp, dest, dest_len), cases[i].exp)
}
- free(str);
+ HDfree(str);
str = NULL;
} /* end for each testcase */
@@ -2412,9 +2424,9 @@ test_trim(void)
HDassert(str == NULL);
str = (char *)HDmalloc(sizeof(char *) * 11);
HDassert(str != NULL);
- memcpy(str, "some text ", 11); /* string with null terminator */
+ HDmemcpy(str, "some text ", 11); /* string with null terminator */
JSVERIFY(FAIL, H5FD_s3comms_trim(NULL, str, 10, &dest_len), "destination for trim cannot be NULL");
- free(str);
+ HDfree(str);
str = NULL;
PASSED();
@@ -2422,7 +2434,7 @@ test_trim(void)
error:
if (str != NULL) {
- free(str);
+ HDfree(str);
}
return -1;
@@ -2513,9 +2525,9 @@ test_uriencode(void)
H5FD_s3comms_uriencode(dest, cases[i].str, str_len, cases[i].encode_slash, &dest_written),
NULL);
JSVERIFY(HDstrlen(cases[i].expected), dest_written, NULL)
- JSVERIFY(0, strncmp(dest, cases[i].expected, dest_written), cases[i].expected);
+ JSVERIFY(0, HDstrncmp(dest, cases[i].expected, dest_written), cases[i].expected);
- free(dest);
+ HDfree(dest);
dest = NULL;
} /* end for each testcase */
@@ -2526,12 +2538,12 @@ test_uriencode(void)
dest = (char *)HDmalloc(sizeof(char) * 15);
HDassert(dest != NULL);
- JSVERIFY(FAIL, H5FD_s3comms_uriencode(NULL, "word$", 5, false, &dest_written),
+ JSVERIFY(FAIL, H5FD_s3comms_uriencode(NULL, "word$", 5, FALSE, &dest_written),
"destination cannot be NULL");
- JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, false, &dest_written),
+ JSVERIFY(FAIL, H5FD_s3comms_uriencode(dest, NULL, 5, FALSE, &dest_written),
"source string cannot be NULL");
- free(dest);
+ HDfree(dest);
dest = NULL;
PASSED();
@@ -2539,7 +2551,7 @@ test_uriencode(void)
error:
if (dest != NULL) {
- free(dest);
+ HDfree(dest);
}
return -1;
diff --git a/test/set_extent.c b/test/set_extent.c
index fc22137..5a07362 100644
--- a/test/set_extent.c
+++ b/test/set_extent.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Pedro Vicente <pvn@ncsa.uiuc.edu>
+ * Programmer: Pedro Vicente
* April 12, 2002
*
* Purpose: Tests the H5Dset_extent call
@@ -121,7 +121,7 @@ main(void)
if (env_h5_drvr == NULL)
env_h5_drvr = "nomatch";
/* Current VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Initialize random number seed */
HDsrandom((unsigned)HDtime(NULL));
@@ -2086,7 +2086,6 @@ test_layouts(H5D_layout_t layout, hid_t fapl)
H5E_BEGIN_TRY
{
-
ret = H5Dset_extent(did, dims_e);
}
H5E_END_TRY;
@@ -2136,7 +2135,6 @@ test_layouts(H5D_layout_t layout, hid_t fapl)
H5E_BEGIN_TRY
{
-
ret = H5Dset_extent(did, dims_s);
}
H5E_END_TRY;
@@ -2638,7 +2636,7 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab
TEST_ERROR
if (H5Treclaim(type, mspace, H5P_DEFAULT, wbuf) < 0)
TEST_ERROR
- free(fill_value.p);
+ HDfree(fill_value.p);
if (H5Sclose(mspace) < 0)
TEST_ERROR
if (H5Pclose(my_dcpl) < 0)
@@ -2694,6 +2692,4 @@ test_random_rank4_dump(unsigned ndim_sets, hsize_t dim_log[][4], hsize_t cdims[4
(unsigned)dim_log[i][1], (unsigned)dim_log[i][2], (unsigned)dim_log[i][3]);
if (j >= 0)
HDprintf(" First incorrect value read: ( %d, %d, %d, %d )\n", j, k, l, m);
-
- return;
} /* end test_random_rank4_dump */
diff --git a/test/space_overflow.c b/test/space_overflow.c
index 720e9d0..f235670 100644
--- a/test/space_overflow.c
+++ b/test/space_overflow.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Monday, October 26, 1998
*
* Purpose: Create a dataset with a simple data space that has the
diff --git a/test/stab.c b/test/stab.c
index 682ed84..798619d 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Tuesday, November 24, 1998
*/
@@ -134,7 +134,7 @@ test_misc(hid_t fcpl, hid_t fapl, hbool_t new_format)
TEST_ERROR
if (H5Oget_comment_by_name(g3, "././.", comment, sizeof comment, H5P_DEFAULT) < 0)
TEST_ERROR
- if (HDstrcmp(comment, "hello world")) {
+ if (HDstrcmp(comment, "hello world") != 0) {
H5_FAILED();
HDputs(" Read the wrong comment string from the group.");
HDprintf(" got: \"%s\"\n ans: \"hello world\"\n", comment);
@@ -190,7 +190,7 @@ error:
*
* Failure: number of errors
*
- * Programmer: Robb Matzke <matzke@llnl.gov> 2002-03-28
+ * Programmer: Robb Matzke 2002-03-28
*
* Modifications:
*-------------------------------------------------------------------------
@@ -1279,7 +1279,7 @@ old_api(hid_t fapl)
PASSED();
#else /* H5_NO_DEPRECATED_SYMBOLS */
/* Shut compiler up */
- fapl = fapl;
+ (void)fapl;
SKIPPED();
HDputs(" Deprecated API symbols not enabled");
@@ -1425,7 +1425,7 @@ main(void)
env_h5_drvr = "nomatch";
/* VFD that does not support contigous address space */
- contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") && HDstrcmp(env_h5_drvr, "multi"));
+ contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0);
/* Reset library */
h5_reset();
diff --git a/test/tarray.c b/test/tarray.c
index c8fc45b..8b518cf 100644
--- a/test/tarray.c
+++ b/test/tarray.c
@@ -157,8 +157,8 @@ test_array_atomic_1d(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -490,8 +490,8 @@ test_array_array_atomic(void)
/* Check the array dimensions */
for (i = 0; i < ndims1; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -668,8 +668,8 @@ test_array_compound_atomic(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -889,8 +889,8 @@ test_array_compound_array(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -951,8 +951,9 @@ test_array_compound_array(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Nested array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf(
+ "Nested array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -1092,7 +1093,6 @@ test_array_free_custom(void *_mem, void *info)
HDfree(mem);
} /* end if */
- return;
} /* end test_array_free_custom() */
/*-------------------------------------------------------------------------
@@ -1210,8 +1210,8 @@ test_array_vlen_atomic(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -1440,8 +1440,8 @@ test_array_vlen_array(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -1472,8 +1472,8 @@ test_array_vlen_array(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -2081,8 +2081,9 @@ test_compat(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf(
+ "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -2128,8 +2129,9 @@ test_compat(void)
/* Check the array dimensions */
for (i = 0; i < ndims; i++)
if (rdims1[i] != tdims1[i]) {
- TestErrPrintf("Array dimension information doesn't match!, rdims1[%d]=%d, tdims1[%d]=%d\n",
- (int)i, (int)rdims1[i], (int)i, (int)tdims1[i]);
+ TestErrPrintf(
+ "Array dimension information doesn't match!, rdims1[%d]=%llu, tdims1[%d]=%llu\n", i,
+ rdims1[i], i, tdims1[i]);
continue;
} /* end if */
@@ -2228,5 +2230,5 @@ test_array(void)
void
cleanup_array(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
} /* end cleanup_array() */
diff --git a/test/tattr.c b/test/tattr.c
index 8429477..c30b0f5 100644
--- a/test/tattr.c
+++ b/test/tattr.c
@@ -859,8 +859,8 @@ test_attr_compound_read(hid_t fapl)
VERIFY(fields, 3, "H5Tget_nmembers");
for (i = 0; i < fields; i++) {
fieldname = H5Tget_member_name(type, (unsigned)i);
- if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) || HDstrcmp(fieldname, ATTR4_FIELDNAME2) ||
- HDstrcmp(fieldname, ATTR4_FIELDNAME3)))
+ if (!(HDstrcmp(fieldname, ATTR4_FIELDNAME1) != 0 || HDstrcmp(fieldname, ATTR4_FIELDNAME2) != 0 ||
+ HDstrcmp(fieldname, ATTR4_FIELDNAME3) != 0))
TestErrPrintf("invalid field name for field #%d: %s\n", i, fieldname);
H5free_memory(fieldname);
} /* end for */
@@ -907,7 +907,7 @@ test_attr_compound_read(hid_t fapl)
/* Verify values read in */
for (i = 0; i < ATTR4_DIM1; i++)
for (j = 0; j < ATTR4_DIM2; j++)
- if (HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct))) {
+ if (HDmemcmp(&attr_data4[i][j], &read_data4[i][j], sizeof(struct attr4_struct)) != 0) {
HDprintf("%d: attribute data different: attr_data4[%d][%d].i=%d, read_data4[%d][%d].i=%d\n",
__LINE__, i, j, attr_data4[i][j].i, i, j, read_data4[i][j].i);
HDprintf("%d: attribute data different: attr_data4[%d][%d].d=%f, read_data4[%d][%d].d=%f\n",
@@ -920,7 +920,7 @@ test_attr_compound_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR4_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR4_NAME))
+ if (HDstrcmp(attr_name, ATTR4_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR4_NAME);
/* Close attribute datatype */
@@ -1279,7 +1279,7 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME))
+ if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Verify Name with too small of a buffer */
@@ -1287,7 +1287,7 @@ test_attr_mult_read(hid_t fapl)
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
HDstrcpy(temp_name, ATTR1_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR1_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name))
+ if (HDstrcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1337,7 +1337,7 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR2_NAME))
+ if (HDstrcmp(attr_name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR2_NAME);
/* Verify Name with too small of a buffer */
@@ -1345,7 +1345,7 @@ test_attr_mult_read(hid_t fapl)
VERIFY(name_len, HDstrlen(ATTR2_NAME), "H5Aget_name");
HDstrcpy(temp_name, ATTR2_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR2_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name))
+ if (HDstrcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1399,7 +1399,7 @@ test_attr_mult_read(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME))
+ if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Verify Name with too small of a buffer */
@@ -1407,7 +1407,7 @@ test_attr_mult_read(hid_t fapl)
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
HDstrcpy(temp_name, ATTR3_NAME); /* make a copy of the name */
temp_name[HDstrlen(ATTR3_NAME) - 1] = '\0'; /* truncate it to match the one retrieved */
- if (HDstrcmp(attr_name, temp_name))
+ if (HDstrcmp(attr_name, temp_name) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, temp_name);
/* Close attribute */
@@ -1436,19 +1436,19 @@ attr_op1(hid_t H5_ATTR_UNUSED loc_id, const char *name, const H5A_info_t H5_ATTR
switch (*count) {
case 0:
- if (HDstrcmp(name, ATTR1_NAME))
+ if (HDstrcmp(name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR1_NAME);
(*count)++;
break;
case 1:
- if (HDstrcmp(name, ATTR2_NAME))
+ if (HDstrcmp(name, ATTR2_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR2_NAME);
(*count)++;
break;
case 2:
- if (HDstrcmp(name, ATTR3_NAME))
+ if (HDstrcmp(name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: name=%s, should be %s\n", name, ATTR3_NAME);
(*count)++;
break;
@@ -1590,7 +1590,7 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR1_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR1_NAME))
+ if (HDstrcmp(attr_name, ATTR1_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR1_NAME);
/* Close attribute */
@@ -1605,7 +1605,7 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME))
+ if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -1629,7 +1629,7 @@ test_attr_delete(hid_t fapl)
/* Verify Name */
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, attr_name);
VERIFY(name_len, HDstrlen(ATTR3_NAME), "H5Aget_name");
- if (HDstrcmp(attr_name, ATTR3_NAME))
+ if (HDstrcmp(attr_name, ATTR3_NAME) != 0)
TestErrPrintf("attribute name different: attr_name=%s, should be %s\n", attr_name, ATTR3_NAME);
/* Close attribute */
@@ -2123,7 +2123,7 @@ test_attr_dense_verify(hid_t loc_id, unsigned max_attr)
HDsprintf(attrname, "attr %02u", u);
name_len = H5Aget_name(attr, (size_t)ATTR_NAME_LEN, check_name);
VERIFY(name_len, HDstrlen(attrname), "H5Aget_name");
- if (HDstrcmp(check_name, attrname))
+ if (HDstrcmp(check_name, attrname) != 0)
TestErrPrintf("attribute name different: attrname = '%s', should be '%s'\n", check_name,
attrname);
@@ -4206,8 +4206,8 @@ test_attr_deprec(hid_t fcpl, hid_t fapl)
CHECK(ret, FAIL, "H5Fclose");
#else /* H5_NO_DEPRECATED_SYMBOLS */
/* Shut compiler up */
- fcpl = fcpl;
- fapl = fapl;
+ (void)fcpl;
+ (void)fapl;
/* Output message about test being skipped */
MESSAGE(5, ("Skipping Test On Deprecated Attribute Routines\n"));
@@ -5658,7 +5658,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order if there is no creation order index, since
@@ -5684,7 +5684,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_NATIVE, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
} /* end if */
@@ -5705,7 +5705,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_CRT_ORDER, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Verify the information for first attribute, in increasing name order */
@@ -5725,7 +5725,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_INC, n, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Don't test "native" order queries on link name order, since there's not
@@ -5749,7 +5749,7 @@ attr_info_by_idx_check(hid_t obj_id, const char *attrname, hsize_t n, hbool_t us
ret = (herr_t)H5Aget_name_by_idx(obj_id, ".", H5_INDEX_NAME, H5_ITER_DEC, (hsize_t)0, tmpname,
(size_t)NAME_BUF_SIZE, H5P_DEFAULT);
CHECK(ret, FAIL, "H5Aget_name_by_idx");
- if (HDstrcmp(attrname, tmpname))
+ if (HDstrcmp(attrname, tmpname) != 0)
TestErrPrintf("Line %d: attribute name size wrong!\n", __LINE__);
/* Retrieve current # of errors */
@@ -6778,13 +6778,6 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
char attrname[NAME_BUF_SIZE]; /* Object name */
H5A_info_t my_info; /* Local attribute info */
-#ifdef QAK
- HDfprintf(stderr, "attr_name = '%s'\n", attr_name);
- if (info)
- HDfprintf(stderr, "info->corder = %u\n", (unsigned)info->corder);
- HDfprintf(stderr, "op_data->curr = %Hd\n", op_data->curr);
-#endif /* QAK */
-
/* Increment # of times the callback was called */
op_data->ncalled++;
@@ -6813,7 +6806,7 @@ attr_iterate2_cb(hid_t loc_id, const char *attr_name, const H5A_info_t *info, vo
/* Verify name of link */
HDsprintf(attrname, "attr %02u", (unsigned)my_info.corder);
- if (HDstrcmp(attr_name, attrname))
+ if (HDstrcmp(attr_name, attrname) != 0)
return (H5_ITER_ERROR);
/* Check if we've visited this link before */
diff --git a/test/tchecksum.c b/test/tchecksum.c
index 15667e3..f96d810 100644
--- a/test/tchecksum.c
+++ b/test/tchecksum.c
@@ -15,7 +15,7 @@
*
* Created: tchecksum.c
* Aug 21 2006
- * Quincey Koziol <koziol@hdfgroup.org>
+ * Quincey Koziol
*
* Purpose: Test internal checksum routine(s)
*
diff --git a/test/tcoords.c b/test/tcoords.c
index 855b383..fef8689 100644
--- a/test/tcoords.c
+++ b/test/tcoords.c
@@ -87,10 +87,10 @@ test_singleEnd_selElements(hid_t file, hbool_t is_chunked)
}
/* Construct dataset's name */
- memset(dset_name, 0, (size_t)NAME_LEN);
- strcat(dset_name, SINGLE_END_DSET);
+ HDmemset(dset_name, 0, (size_t)NAME_LEN);
+ HDstrcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- strcat(dset_name, "_chunked");
+ HDstrcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -259,10 +259,10 @@ test_singleEnd_selHyperslab(hid_t file, hbool_t is_chunked)
hsize_t mem3_block[4] = {1, 3, 6, 1};
/* Construct dataset's name */
- memset(dset_name, 0, NAME_LEN);
- strcat(dset_name, SINGLE_END_DSET);
+ HDmemset(dset_name, 0, NAME_LEN);
+ HDstrcat(dset_name, SINGLE_END_DSET);
if (is_chunked)
- strcat(dset_name, "_chunked");
+ HDstrcat(dset_name, "_chunked");
/* Dataspace for the dataset in file */
sid = H5Screate_simple(4, da_dims, da_dims);
@@ -436,10 +436,10 @@ test_multiple_ends(hid_t file, hbool_t is_chunked)
}
/* Construct dataset's name */
- memset(dset_name, 0, NAME_LEN);
- strcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
+ HDmemset(dset_name, 0, NAME_LEN);
+ HDstrcat(dset_name, MULTI_ENDS_SEL_HYPER_DSET);
if (is_chunked)
- strcat(dset_name, "_chunked");
+ HDstrcat(dset_name, "_chunked");
did = H5Dcreate2(file, dset_name, H5T_NATIVE_INT, sid, H5P_DEFAULT, plid, H5P_DEFAULT);
CHECK(did, FAIL, "H5Dcreate2");
@@ -687,5 +687,5 @@ test_coords(void)
void
cleanup_coords(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
}
diff --git a/test/testerror.sh.in b/test/testerror.sh.in
index d284355..4fb2a81 100644
--- a/test/testerror.sh.in
+++ b/test/testerror.sh.in
@@ -64,6 +64,12 @@ TEST() {
# Skip the plugin for testing missing filter.
$ENVCMD $RUNSERIAL $TEST_ERR_BIN
) >$actual 2>$actual_err
+
+ # Check for core dump
+ if [ $? != 0 ]; then
+ nerrors=`expr $nerrors + 1`
+ fi
+
# Extract file name, line number, version and thread IDs because they may be different
sed -e 's/thread [0-9]*/thread (IDs)/' -e 's/: .*\.c /: (file name) /' \
-e 's/line [0-9]*/line (number)/' \
diff --git a/test/testexternal_env.sh.in b/test/testexternal_env.sh.in
index 618c4ff..94fbb88 100644
--- a/test/testexternal_env.sh.in
+++ b/test/testexternal_env.sh.in
@@ -34,9 +34,9 @@ ENVCMD="env HDF5_EXTFILE_PREFIX=\${ORIGIN}" # The environment variable & valu
$ENVCMD $RUNSERIAL $TEST_BIN
exitcode=$?
if [ $exitcode -eq 0 ]; then
- echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED"
- else
- nerrors="`expr $nerrors + 1`"
- echo "***Error encountered for HDF5_EXTFILE_PREFIX test***"
+ echo "Test prefix for HDF5_EXTFILE_PREFIX PASSED"
+else
+ nerrors="`expr $nerrors + 1`"
+ echo "***Error encountered for HDF5_EXTFILE_PREFIX test***"
fi
exit $nerrors
diff --git a/test/testflushrefresh.sh.in b/test/testflushrefresh.sh.in
index 06a5031..83685e8 100644
--- a/test/testflushrefresh.sh.in
+++ b/test/testflushrefresh.sh.in
@@ -82,7 +82,7 @@ fi
# different, occasionally the wrong file is deleted, interrupting the flow of
# the test. Running each of these tests in its own directory should eliminate
# the problem.
-mkdir flushrefresh_test
+mkdir -p flushrefresh_test
cp flushrefresh flushrefresh_test
# With the --disable-shared option, flushrefresh is built in the test directory,
@@ -90,7 +90,7 @@ cp flushrefresh flushrefresh_test
# the test directory. test/flushrefresh should always be copied,
# .libs/flushrefresh should be copied only if it exists.
if [ -f .libs/flushrefresh ]; then
- mkdir flushrefresh_test/.libs
+ mkdir -p flushrefresh_test/.libs
for FILE in .libs/flushrefresh*; do
case "$FILE" in
*.o) continue ;; ## don't copy the .o files
@@ -156,6 +156,12 @@ until [ $verification_done -eq 1 ]; do
echo "all flush verification complete" > $endsignal
else
./flushrefresh $param1 $param2
+
+ # Check for core dump
+ if [ $? -gt 0 ]; then
+ nerrors=`expr $nerrors + 1`
+ fi
+
echo "verification flush process done" > $endsignal
fi
@@ -195,6 +201,12 @@ if [ $timedout -eq 0 ]; then
echo "all refresh verification complete" > $endsignal
else
./flushrefresh $param1
+
+ # Check for core dump
+ if [ $? -gt 0 ]; then
+ nerrors=`expr $nerrors + 1`
+ fi
+
echo "refresh verifiction process done" > $endsignal
fi
diff --git a/test/testframe.c b/test/testframe.c
index ff7cdc5..f805997 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Quincey Koziol <koziol@ncsa.uiuc.edu>
+ * Programmer: Quincey Koziol
* Tuesday, January 6, 2004
*
* Purpose: Provides support functions for the testing framework.
@@ -442,15 +442,15 @@ GetTestExpress(void)
/* set it here for now. Should be done in something like h5test_init(). */
if (TestExpress == -1) {
- env_val = getenv("HDF5TestExpress");
+ env_val = HDgetenv("HDF5TestExpress");
if (env_val == NULL)
SetTestExpress(1);
- else if (strcmp(env_val, "0") == 0)
+ else if (HDstrcmp(env_val, "0") == 0)
SetTestExpress(0);
- else if (strcmp(env_val, "1") == 0)
+ else if (HDstrcmp(env_val, "1") == 0)
SetTestExpress(1);
- else if (strcmp(env_val, "2") == 0)
+ else if (HDstrcmp(env_val, "2") == 0)
SetTestExpress(2);
else
SetTestExpress(3);
@@ -521,7 +521,7 @@ ParseTestVerbosity(char *argv)
else if (*argv == 'h')
SetTestVerbosity(VERBO_HI);
else
- SetTestVerbosity(atoi(argv));
+ SetTestVerbosity(HDatoi(argv));
}
/*
diff --git a/test/testlinks_env.sh.in b/test/testlinks_env.sh.in
index dd83d7b..09074c3 100644
--- a/test/testlinks_env.sh.in
+++ b/test/testlinks_env.sh.in
@@ -34,8 +34,8 @@ echo "$ENVCMD $RUNSERIAL $TEST_BIN"
$ENVCMD $RUNSERIAL $TEST_BIN
exitcode=$?
if [ $exitcode -eq 0 ]; then
- echo "Test for HDF5_EXT_PREFIX PASSED"
- else
+ echo "Test for HDF5_EXT_PREFIX PASSED"
+else
nerrors="`expr $nerrors + 1`"
echo "***Error encountered for HDF5_EXT_PREFIX test***"
fi
diff --git a/test/testmeta.c b/test/testmeta.c
index 370547b..c59c6cb 100644
--- a/test/testmeta.c
+++ b/test/testmeta.c
@@ -83,7 +83,7 @@ main(void)
for (i = 0; i < NEXTARRAYS; i++) {
/* Create dataset */
- sprintf(name, "/ExtArray%06d", i);
+ HDsprintf(name, "/ExtArray%06d", i);
dataset_id =
H5Dcreate2(file_id, name, H5T_NATIVE_FLOAT, dataspace_id, H5P_DEFAULT, prop_id, H5P_DEFAULT);
@@ -103,7 +103,7 @@ main(void)
/* Removed print statement as it would lock system resources on Windows */
/*
* HDprintf("\rWriting Object #%d of %d", j+1, NDATAOBJECTS);
- * fflush(stdout);
+ * HDfflush(stdout);
*/
floatval = (float)j;
diff --git a/test/testvds_env.sh.in b/test/testvds_env.sh.in
index 7ba0e42..39f13a5 100644
--- a/test/testvds_env.sh.in
+++ b/test/testvds_env.sh.in
@@ -35,8 +35,8 @@ UNENVCMD="unset HDF5_VDS_PREFIX" # Unset the environment variable
$ENVCMD $RUNSERIAL $TEST_BIN
exitcode=$?
if [ $exitcode -eq 0 ]; then
- echo "Test prefix for HDF5_VDS_PREFIX PASSED"
- else
+ echo "Test prefix for HDF5_VDS_PREFIX PASSED"
+else
nerrors="`expr $nerrors + 1`"
echo "***Error encountered for HDF5_VDS_PREFIX test***"
fi
diff --git a/test/tselect.c b/test/tselect.c
index 73cc771..612b927 100644
--- a/test/tselect.c
+++ b/test/tselect.c
@@ -1533,7 +1533,7 @@ test_select_hyper_contig(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 30 * 12))
+ if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 30 * 12) != 0)
TestErrPrintf("hyperslab values don't match! Line=%d\n", __LINE__);
/* Close memory dataspace */
@@ -1676,7 +1676,7 @@ test_select_hyper_contig2(hid_t dset_type, hid_t xfer_plist)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 2 * SPACE8_DIM3 * SPACE8_DIM2 * SPACE8_DIM1))
+ if (HDmemcmp(rbuf, wbuf, sizeof(uint16_t) * 2 * SPACE8_DIM3 * SPACE8_DIM2 * SPACE8_DIM1) != 0)
TestErrPrintf("Error: hyperslab values don't match!\n");
/* Close memory dataspace */
@@ -2579,7 +2579,7 @@ test_select_hyper_contig_dr(hid_t dset_type, hid_t xfer_plist)
static void
test_select_hyper_checker_board_dr__select_checker_board(hid_t tgt_n_cube_sid, unsigned tgt_n_cube_rank,
unsigned edge_size, unsigned checker_edge_size,
- unsigned sel_rank, hsize_t sel_start[])
+ unsigned sel_rank, const hsize_t sel_start[])
{
hbool_t first_selection = TRUE;
unsigned n_cube_offset;
@@ -3783,7 +3783,7 @@ test_select_hyper_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2))
+ if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
TestErrPrintf("hyperslab values don't match! Line=%d\n", __LINE__);
/* Close memory dataspace */
@@ -3996,7 +3996,7 @@ test_select_point_copy(void)
CHECK(ret, FAIL, "H5Dread");
/* Compare data read with data written out */
- if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2))
+ if (HDmemcmp(rbuf, rbuf2, sizeof(uint16_t) * SPACE3_DIM1 * SPACE3_DIM2) != 0)
TestErrPrintf("point values don't match!\n");
/* Close memory dataspace */
@@ -5257,7 +5257,7 @@ test_select_hyper_union_stagger(void)
CHECK(error, FAIL, "H5Fclose");
/* Initialize intput buffer */
- memset(data_out, 0, 7 * 7 * sizeof(int));
+ HDmemset(data_out, 0, 7 * 7 * sizeof(int));
/* Open file */
file_id = H5Fopen(FILENAME, H5F_ACC_RDONLY, H5P_DEFAULT);
@@ -5381,9 +5381,9 @@ test_select_hyper_union_3d(void)
/* Allocate write & read buffers */
wbuf = (uint8_t *)HDmalloc(sizeof(uint8_t) * SPACE4_DIM1 * SPACE4_DIM2 * SPACE4_DIM3);
- CHECK(wbuf, NULL, "HDmalloc");
+ CHECK_PTR(wbuf, "HDmalloc");
rbuf = (uint8_t *)HDcalloc(sizeof(uint8_t), SPACE3_DIM1 * SPACE3_DIM2);
- CHECK(rbuf, NULL, "HDcalloc");
+ CHECK_PTR(rbuf, "HDcalloc");
/* Initialize write buffer */
for (i = 0, tbuf = wbuf; i < SPACE4_DIM1; i++)
@@ -5555,7 +5555,7 @@ test_select_hyper_valid_combination(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Selection Combination Validity\n"));
- assert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for single point selection */
single_pt_sid = H5Screate_simple(SPACE9_RANK, dims2D, NULL);
@@ -8401,7 +8401,7 @@ test_shape_same(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Same Shape Comparisons\n"));
- assert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for "all" selection */
all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
@@ -14277,18 +14277,18 @@ test_hyper_unlim_check(hid_t sid, hsize_t *dims, hssize_t enpoints, hssize_t enb
/* Verify blocklist */
if (nblocks == (hssize_t)1) {
- if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])))
+ if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end if */
else {
HDassert(nblocks == (hssize_t)2);
- if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0]))) {
- if (HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])))
+ if (HDmemcmp(blocklist, eblock1, 6 * sizeof(eblock1[0])) != 0) {
+ if (HDmemcmp(blocklist, eblock2, 6 * sizeof(eblock2[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
- if (HDmemcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0])))
+ if (HDmemcmp(&blocklist[6], eblock1, 6 * sizeof(eblock1[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end if */
- else if (HDmemcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0])))
+ else if (HDmemcmp(&blocklist[6], eblock2, 6 * sizeof(eblock2[0])) != 0)
ERROR("H5Sget_select_hyper_blocklist");
} /* end else */
} /* end if */
@@ -14705,7 +14705,7 @@ test_internal_consistency(void)
/* Output message about test being performed */
MESSAGE(6, ("Testing Consistency of Internal States\n"));
- assert(SPACE9_DIM2 >= POINT1_NPOINTS);
+ HDassert(SPACE9_DIM2 >= POINT1_NPOINTS);
/* Create dataspace for "all" selection */
all_sid = H5Screate_simple(SPACE9_RANK, dims, NULL);
diff --git a/test/tunicode.c b/test/tunicode.c
index 6483e13..52341bb 100644
--- a/test/tunicode.c
+++ b/test/tunicode.c
@@ -532,7 +532,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(attr_id, FAIL, "H5Acreate2");
size = H5Aget_name(attr_id, (size_t)MAX_STRING_LENGTH, read_buf);
CHECK(size, FAIL, "H5Aget_name");
- ret = strcmp(read_buf, string);
+ ret = HDstrcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
read_buf[0] = '\0';
@@ -541,7 +541,7 @@ test_attrname(hid_t fid, const char *string)
CHECK(ret, FAIL, "H5Awrite");
ret = H5Aread(attr_id, dtype_id, read_buf);
CHECK(ret, FAIL, "H5Aread");
- ret = strcmp(read_buf, string);
+ ret = HDstrcmp(read_buf, string);
VERIFY(ret, 0, "strcmp");
/* Clean up */
@@ -682,7 +682,7 @@ test_enum(hid_t H5_ATTR_UNUSED fid, const char *string)
VERIFY(val, E1_WHITE, "H5Tenum_valueof");
ret = H5Tenum_nameof(type_id, &val, readbuf, (size_t)MAX_STRING_LENGTH);
CHECK(ret, FAIL, "H5Tenum_nameof");
- ret = strcmp(readbuf, string);
+ ret = HDstrcmp(readbuf, string);
VERIFY(ret, 0, "strcmp");
/* Close the datatype */
@@ -709,7 +709,7 @@ test_opaque(hid_t H5_ATTR_UNUSED fid, const char *string)
/* Read the tag back. */
read_buf = H5Tget_tag(type_id);
- ret = strcmp(read_buf, string);
+ ret = HDstrcmp(read_buf, string);
VERIFY(ret, 0, "H5Tget_tag");
H5free_memory(read_buf);
diff --git a/test/tvlstr.c b/test/tvlstr.c
index fb6a876..7e47c7b 100644
--- a/test/tvlstr.c
+++ b/test/tvlstr.c
@@ -110,16 +110,13 @@ test_vlstr_free_custom(void *_mem, void *info)
static void
test_vlstrings_basic(void)
{
+ /* Information to write */
const char *wdata[SPACE1_DIM1] = {
- "Four score and seven years ago our forefathers brought forth on this continent a new "
- "nation,",
+ "Four score and seven years ago our forefathers brought forth on this continent a new nation,",
"conceived in liberty and dedicated to the proposition that all men are created equal.",
"Now we are engaged in a great civil war,",
- "testing whether that nation or any nation so conceived and so dedicated can long "
- "endure."}; /* Information
- to
- write
- */
+ "testing whether that nation or any nation so conceived and so dedicated can long endure."};
+
char * rdata[SPACE1_DIM1]; /* Information read in */
char * wdata2;
hid_t dataspace, dataset2;
@@ -206,7 +203,7 @@ test_vlstrings_basic(void)
for (i = 0; i < SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
continue;
} /* end if */
if (HDstrcmp(wdata[i], rdata[i]) != 0) {
@@ -310,7 +307,7 @@ test_vlstrings_special(void)
for (i = 0; i < SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
continue;
} /* end if */
if ((wdata[i] == NULL && rdata[i] != NULL) || (rdata[i] == NULL && wdata[i] != NULL)) {
@@ -539,7 +536,7 @@ test_compact_vlstring(void)
for (i = 0; i < SPACE1_DIM1; i++) {
if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) {
TestErrPrintf("VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", (int)i,
- (int)strlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
+ (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i]));
continue;
} /* end if */
if (HDstrcmp(wdata[i], rdata[i]) != 0) {
@@ -662,8 +659,6 @@ test_write_vl_string_attribute(void)
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
-
- return;
}
/****************************************************************
@@ -742,8 +737,6 @@ test_read_vl_string_attribute(void)
ret = H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
-
- return;
}
/* Helper routine for test_vl_rewrite() */
@@ -780,7 +773,7 @@ read_scalar_dset(hid_t file, hid_t type, hid_t space, char *name, char *data)
ret = H5Dclose(dset);
CHECK(ret, FAIL, "H5Dclose");
- if (HDstrcmp(data, data_read))
+ if (HDstrcmp(data, data_read) != 0)
TestErrPrintf("Expected %s for dataset %s but read %s\n", data, name, data_read);
ret = H5Treclaim(type, space, H5P_DEFAULT, &data_read);
@@ -867,8 +860,6 @@ test_vl_rewrite(void)
ret = H5Fclose(file2);
CHECK(ret, FAIL, "H5Fclose");
-
- return;
} /* end test_vl_rewrite() */
/****************************************************************
diff --git a/test/tvltypes.c b/test/tvltypes.c
index 514da53..50b2d7a 100644
--- a/test/tvltypes.c
+++ b/test/tvltypes.c
@@ -1385,7 +1385,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata[i].v.p), t2 = (s2 *)(rdata[i].v.p), j = 0; j < rdata[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string)) {
+ if (HDstrcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -1446,7 +1446,7 @@ test_vltypes_compound_vlstr(void)
for (t1 = (s2 *)(wdata2[i].v.p), t2 = (s2 *)(rdata2[i].v.p), j = 0; j < rdata2[i].v.len;
j++, t1++, t2++) {
- if (HDstrcmp(t1->string, t2->string)) {
+ if (HDstrcmp(t1->string, t2->string) != 0) {
TestErrPrintf("VL data values don't match!, t1->string=%s, t2->string=%s\n", t1->string,
t2->string);
continue;
@@ -2508,8 +2508,8 @@ test_vltypes_fill_value(void)
hid_t large_dspace_id; /* Dataspace ID for large datasets */
hid_t small_select_dspace_id; /* Dataspace ID for selection in small datasets */
hid_t large_select_dspace_id; /* Dataspace ID for selection in large datasets */
- hid_t dset_dspace_id; /* Dataspace ID for a particular dataset */
- hid_t dset_select_dspace_id; /* Dataspace ID for selection in a particular dataset */
+ hid_t dset_dspace_id = -1; /* Dataspace ID for a particular dataset */
+ hid_t dset_select_dspace_id = -1; /* Dataspace ID for selection in a particular dataset */
hid_t scalar_dspace_id; /* Dataspace ID for scalar dataspace */
hid_t single_dspace_id; /* Dataspace ID for single element selection */
hsize_t single_offset[] = {2}; /* Offset of single element selection */
@@ -2525,8 +2525,8 @@ test_vltypes_fill_value(void)
hid_t dset_id;
hsize_t small_dims[] = {SPACE4_DIM_SMALL};
hsize_t large_dims[] = {SPACE4_DIM_LARGE};
- size_t dset_elmts; /* Number of elements in a particular dataset */
- const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
+ size_t dset_elmts = 0; /* Number of elements in a particular dataset */
+ const dtype1_struct fill1 = {1, 2, "foobar", "", NULL, "\0", "dead",
3, 4.0F, 100.0F, 1.0F, "liquid", "meter"};
const dtype1_struct wdata = {3, 4, "", NULL, "\0", "foo", "two", 6, 8.0F, 200.0F, 2.0F, "solid", "yard"};
dtype1_struct * rbuf = NULL; /* Buffer for reading data */
@@ -2691,13 +2691,13 @@ test_vltypes_fill_value(void)
} break;
case H5D_VIRTUAL:
- assert(0 && "Invalid layout type!");
+ HDassert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- assert(0 && "Unknown layout type!");
+ HDassert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -2799,13 +2799,13 @@ test_vltypes_fill_value(void)
break;
case H5D_VIRTUAL:
- assert(0 && "Invalid layout type!");
+ HDassert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- assert(0 && "Unknown layout type!");
+ HDassert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -2819,10 +2819,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2842,10 +2842,11 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2876,10 +2877,10 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 || HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2899,10 +2900,11 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -2984,13 +2986,13 @@ test_vltypes_fill_value(void)
break;
case H5D_VIRTUAL:
- assert(0 && "Invalid layout type!");
+ HDassert(0 && "Invalid layout type!");
break;
case H5D_LAYOUT_ERROR:
case H5D_NLAYOUTS:
default:
- assert(0 && "Unknown layout type!");
+ HDassert(0 && "Unknown layout type!");
break;
} /* end switch */
@@ -3017,21 +3019,22 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit)) {
+ if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3052,22 +3055,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit)) {
+ if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3103,21 +3107,22 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit)) {
+ if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3138,22 +3143,23 @@ test_vltypes_fill_value(void)
/* Compare data read in */
for (i = 0; i < dset_elmts; i++) {
if (i == single_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, wdata.str_id) || rbuf[i].str_name ||
- HDstrcmp(rbuf[i].str_desc, wdata.str_desc) ||
- HDstrcmp(rbuf[i].str_orig, wdata.str_orig) ||
- HDstrcmp(rbuf[i].str_stat, wdata.str_stat) ||
- HDstrcmp(rbuf[i].str_form, wdata.str_form) ||
- HDstrcmp(rbuf[i].str_unit, wdata.str_unit)) {
+ if (HDstrcmp(rbuf[i].str_id, wdata.str_id) != 0 || rbuf[i].str_name ||
+ HDstrcmp(rbuf[i].str_desc, wdata.str_desc) != 0 ||
+ HDstrcmp(rbuf[i].str_orig, wdata.str_orig) != 0 ||
+ HDstrcmp(rbuf[i].str_stat, wdata.str_stat) != 0 ||
+ HDstrcmp(rbuf[i].str_form, wdata.str_form) != 0 ||
+ HDstrcmp(rbuf[i].str_unit, wdata.str_unit) != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i)=%d\n", __LINE__, (int)i);
continue;
} /* end if */
} /* end if */
else {
if ((i % 2) == select_offset[0]) {
- if (HDstrcmp(rbuf[i].str_id, "foobar") || HDstrcmp(rbuf[i].str_name, "") ||
- rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") ||
- HDstrcmp(rbuf[i].str_stat, "dead") || HDstrcmp(rbuf[i].str_form, "liquid") ||
- HDstrcmp(rbuf[i].str_unit, "meter")) {
+ if (HDstrcmp(rbuf[i].str_id, "foobar") != 0 || HDstrcmp(rbuf[i].str_name, "") != 0 ||
+ rbuf[i].str_desc || HDstrcmp(rbuf[i].str_orig, "\0") != 0 ||
+ HDstrcmp(rbuf[i].str_stat, "dead") != 0 ||
+ HDstrcmp(rbuf[i].str_form, "liquid") != 0 ||
+ HDstrcmp(rbuf[i].str_unit, "meter") != 0) {
TestErrPrintf("%d: VL data doesn't match!, index(i) = %d\n", __LINE__, (int)i);
continue;
} /* end if */
@@ -3256,5 +3262,5 @@ test_vltypes(void)
void
cleanup_vltypes(void)
{
- remove(FILENAME);
+ HDremove(FILENAME);
}
diff --git a/test/twriteorder.c b/test/twriteorder.c
index 4097c80..e792487 100644
--- a/test/twriteorder.c
+++ b/test/twriteorder.c
@@ -61,11 +61,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#define DATAFILE "twriteorder.dat"
/* #define READERS_MAX 10 */ /* max number of readers */
@@ -141,21 +139,21 @@ parse_option(int argc, char *const argv[])
HDexit(EXIT_SUCCESS);
break;
case 'b': /* number of planes to write/read */
- if ((blocksize_g = atoi(optarg)) <= 0) {
+ if ((blocksize_g = HDatoi(optarg)) <= 0) {
HDfprintf(stderr, "bad blocksize %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'n': /* number of planes to write/read */
- if ((nlinkedblock_g = atoi(optarg)) < 2) {
+ if ((nlinkedblock_g = HDatoi(optarg)) < 2) {
HDfprintf(stderr, "bad number of linked blocks %s, must be greater than 1.\n", optarg);
usage(progname_g);
Hgoto_error(-1);
};
break;
case 'p': /* number of planes to write/read */
- if ((part_size_g = atoi(optarg)) <= 0) {
+ if ((part_size_g = HDatoi(optarg)) <= 0) {
HDfprintf(stderr, "bad partition size %s, must be a positive integer\n", optarg);
usage(progname_g);
Hgoto_error(-1);
@@ -404,7 +402,7 @@ main(int argc, char *argv[])
Hgoto_error(1);
};
};
- mypid = getpid();
+ mypid = HDgetpid();
/* ============= */
/* launch reader */
@@ -440,7 +438,7 @@ main(int argc, char *argv[])
/* If readwrite, collect exit code of child process */
/* ================================================ */
if (launch_g == UC_READWRITE) {
- if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
+ if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0) {
HDperror("waitpid");
Hgoto_error(1);
}
@@ -468,7 +466,7 @@ done:
return ret_value;
}
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -477,4 +475,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/unlink.c b/test/unlink.c
index 40f7a00..73e3b25 100644
--- a/test/unlink.c
+++ b/test/unlink.c
@@ -12,7 +12,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Robb Matzke <matzke@llnl.gov>
+ * Programmer: Robb Matzke
* Friday, September 25, 1998
*
* Purpose: Test unlinking operations.
@@ -516,7 +516,7 @@ check_new_move(hid_t fapl)
/* Check soft links */
if (H5Lget_val(file, "group2/soft", linkval, sizeof(linkval), H5P_DEFAULT) < 0)
FAIL_STACK_ERROR
- if (HDstrcmp(linkval, "/group1/group_move"))
+ if (HDstrcmp(linkval, "/group1/group_move") != 0)
FAIL_PUTS_ERROR(" Soft link test failed. Wrong link value")
/* Cleanup */
@@ -581,7 +581,7 @@ test_filespace(hid_t fapl)
size_t rdcc_nbytes;
double rdcc_w0;
- puts("Testing file space gets reused:");
+ HDputs("Testing file space gets reused:");
/* Open file */
h5_fixname(FILENAME[4], fapl, filename, sizeof filename);
diff --git a/test/use_append_chunk.c b/test/use_append_chunk.c
index 3699a56..107615a 100644
--- a/test/use_append_chunk.c
+++ b/test/use_append_chunk.c
@@ -61,11 +61,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#include "use.h"
@@ -272,7 +270,7 @@ done:
return (ret_value);
}
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -281,4 +279,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/use_append_chunk_mirror.c b/test/use_append_chunk_mirror.c
index 59a7732..b19c510 100644
--- a/test/use_append_chunk_mirror.c
+++ b/test/use_append_chunk_mirror.c
@@ -91,11 +91,9 @@
#include "use.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#ifdef H5_HAVE_MIRROR_VFD
@@ -391,7 +389,7 @@ main(void)
#endif /* H5_HAVE_MIRROR_VFD */
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -400,4 +398,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/use_append_mchunks.c b/test/use_append_mchunks.c
index 705e690..47c9f92 100644
--- a/test/use_append_mchunks.c
+++ b/test/use_append_mchunks.c
@@ -53,11 +53,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#include "use.h"
@@ -165,12 +163,12 @@ main(int argc, char *argv[])
/* Fork process */
/* ============ */
if (UC_opts.launch == UC_READWRITE) {
- if ((childpid = fork()) < 0) {
- perror("fork");
+ if ((childpid = HDfork()) < 0) {
+ HDperror("fork");
Hgoto_error(1);
}
}
- mypid = getpid();
+ mypid = HDgetpid();
/* ============= */
/* launch reader */
@@ -239,8 +237,8 @@ main(int argc, char *argv[])
/* If readwrite, collect exit code of child process */
/* ================================================ */
if (UC_opts.launch == UC_READWRITE) {
- if ((tmppid = waitpid(childpid, &child_status, child_wait_option)) < 0) {
- perror("waitpid");
+ if ((tmppid = HDwaitpid(childpid, &child_status, child_wait_option)) < 0) {
+ HDperror("waitpid");
Hgoto_error(1);
}
@@ -267,7 +265,7 @@ done:
return (ret_value);
} /* end main() */
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -276,4 +274,4 @@ main(void)
return EXIT_SUCCESS;
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/use_common.c b/test/use_common.c
index b407434..0ea2c83 100644
--- a/test/use_common.c
+++ b/test/use_common.c
@@ -13,11 +13,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#include "use.h"
@@ -68,7 +66,7 @@ parse_option(int argc, char *const argv[], options_t *opts)
switch (c) {
case 'h':
usage(opts->progname);
- exit(EXIT_SUCCESS);
+ HDexit(EXIT_SUCCESS);
break;
case 'f': /* usecase data file name */
opts->filename = HDstrdup(optarg);
@@ -442,7 +440,7 @@ read_uc_file(hbool_t towait, options_t *opts)
{
hid_t fid; /* File ID for new HDF5 file */
hid_t dsid; /* dataset ID */
- UC_CTYPE *buffer, *bufptr; /* read data buffer */
+ UC_CTYPE *buffer = NULL, *bufptr = NULL; /* read data buffer */
hid_t f_sid; /* dataset file space id */
hid_t m_sid; /* memory space id */
int rank; /* rank */
@@ -605,10 +603,12 @@ read_uc_file(hbool_t towait, options_t *opts)
return -1;
}
+ HDfree(buffer);
+
if (nreadererr)
return -1;
else
return 0;
} /* end read_uc_file() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/use_disable_mdc_flushes.c b/test/use_disable_mdc_flushes.c
index 1f2976f..f28e574 100644
--- a/test/use_disable_mdc_flushes.c
+++ b/test/use_disable_mdc_flushes.c
@@ -18,11 +18,9 @@
#include "h5test.h"
/* This test uses many POSIX things that are not available on
- * Windows. We're using a check for fork(2) here as a proxy for
- * all POSIX/Unix/Linux things until this test can be made
- * more platform-independent.
+ * Windows.
*/
-#ifdef H5_HAVE_FORK
+#ifdef H5_HAVE_UNISTD_H
#define H5D_FRIEND /*suppress error about including H5Dpkg */
#define H5D_TESTING
@@ -539,7 +537,7 @@ done:
return (ret_value);
}
-#else /* H5_HAVE_FORK */
+#else /* H5_HAVE_UNISTD_H */
int
main(void)
@@ -548,4 +546,4 @@ main(void)
HDexit(EXIT_SUCCESS);
} /* end main() */
-#endif /* H5_HAVE_FORK */
+#endif /* H5_HAVE_UNISTD_H */
diff --git a/test/vds.c b/test/vds.c
index 43d1fab..56973f8 100644
--- a/test/vds.c
+++ b/test/vds.c
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Monday, February 16, 2015
*
* Purpose: Tests datasets with virtual layout.
diff --git a/test/vds_env.c b/test/vds_env.c
index ba91c69..58d90fc 100644
--- a/test/vds_env.c
+++ b/test/vds_env.c
@@ -11,7 +11,7 @@
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*
- * Programmer: Neil Fortner <nfortne2@hdfgroup.org>
+ * Programmer: Neil Fortner
* Monday, February 16, 2015
*
* Purpose: Tests datasets with virtual layout.