diff options
author | Allen Byrne <50328838+byrnHDF@users.noreply.github.com> | 2021-04-30 16:07:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-30 16:07:50 (GMT) |
commit | 27198d814a58640a6088f44b72d43d3bd4bb6629 (patch) | |
tree | 81ea462c0cd993553c7f3820d8ab288e9bea8ed5 /test | |
parent | 4155e595e2ab16d81de79ed19d7de4fab5eb3302 (diff) | |
download | hdf5-27198d814a58640a6088f44b72d43d3bd4bb6629.zip hdf5-27198d814a58640a6088f44b72d43d3bd4bb6629.tar.gz hdf5-27198d814a58640a6088f44b72d43d3bd4bb6629.tar.bz2 |
Hdf5 1 10 merge of printf specifiers and VS2015 min changes (#612)
* HDFFV-10865 - merge from dev, HDFArray perf fix.
* Remove duplicate setting
* Whitespace changes after clang format
* Undo version 11 clang format changes
* Merge CMake changes from develop
* test testing script merge from develop
* Update supported platforms
* PR#3 merge from develop
* Merge gcc 10 diagnostics option from develop
* Merge #318 OSX changes from develop
* Merge small changes from develop
* Minor non-space formatting changes
* #386 copyright corrections for java folder
* Merges from develop
#358 patches from vtk
#361 fix header guard spelling
* Merge updates
#358 patches from vtk
#361 fix header guard spelling
* format fix
* Fix missing underscore and make H5public.h closer to dev
* Merges from develop
#340 clang -Wformat-security warnings
#360 Fixed uninitialized warnings
header guard underscore cleanup
JNI cleanup
* format alignment
* Add missing test ref file
* Merge #380 from develop
* Finish java merges from develop
* Fix java issues with tests and javadoc
* Correct use of attribute access plist
* Remove debug code
* Remove unused variable
* Change file access to read only for java tests
* Split clang format operations.
* More javadoc comments
* Remove pre-split setting
* format source
* Change windows TS to use older VS.
* Mostly all javadoc fixes, one argument rename.
* synch file
* Merge of long double fix and compiler flags
* HDFFV-11229 merge changes from develop
* HDFFV-11229 correct test script
* HDFFV-11229 update autotools test script for two ref files
* HDFFV-11229 merge dev changes for long double display in tools
* Committing clang-format changes
* minor whitespace
* remove unneeded macro
* Committing clang-format changes
* Add "option" command for clang options
* Rework CMake add_custom to use the BYPRODUCTS argument
Update pkgconfig scripts for parallel builds.
Fix install COPYING file reference.
Remove unused round defines.
Change CMake default setting of BUILD_CPP to off.
* Fortran target depends
* Remove incorrect source attribute
* Revert define removal
* printf specifiers and VS2015 min changes
* Committing clang-format changes
* Add time struct
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
Diffstat (limited to 'test')
65 files changed, 920 insertions, 878 deletions
diff --git a/test/accum.c b/test/accum.c index 330c656..45cabf7 100644 --- a/test/accum.c +++ b/test/accum.c @@ -2293,7 +2293,6 @@ test_swmr_write_big(hbool_t newest_format) FAIL_STACK_ERROR; /* Pop API context */ - if (api_ctx_pushed && H5CX_pop() < 0) FAIL_STACK_ERROR api_ctx_pushed = FALSE; @@ -2357,16 +2356,18 @@ accum_printf(const H5F_t *f) HDprintf("=====================================================\n"); HDprintf(" accumulator allocated size == %zu\n", accum->alloc_size); HDprintf(" accumulated data size == %zu\n", accum->size); - HDfprintf(stdout, " accumulator dirty? == %t\n", accum->dirty); + HDfprintf(stdout, " accumulator dirty? == %s\n", accum->dirty ? "TRUE" : "FALSE"); HDprintf("=====================================================\n"); - HDfprintf(stdout, " start of accumulated data, loc = %a\n", accum->loc); + HDfprintf(stdout, " start of accumulated data, loc = %" PRIuHADDR "\n", accum->loc); if (accum->dirty) { - HDfprintf(stdout, " start of dirty region, loc = %a\n", (haddr_t)(accum->loc + accum->dirty_off)); - HDfprintf(stdout, " end of dirty region, loc = %a\n", + HDfprintf(stdout, " start of dirty region, loc = %" PRIuHADDR "\n", + (haddr_t)(accum->loc + accum->dirty_off)); + HDfprintf(stdout, " end of dirty region, loc = %" PRIuHADDR "\n", (haddr_t)(accum->loc + accum->dirty_off + accum->dirty_len)); } /* end if */ - HDfprintf(stdout, " end of accumulated data, loc = %a\n", (haddr_t)(accum->loc + accum->size)); - HDfprintf(stdout, " end of accumulator allocation, loc = %a\n", + HDfprintf(stdout, " end of accumulated data, loc = %" PRIuHADDR "\n", + (haddr_t)(accum->loc + accum->size)); + HDfprintf(stdout, " end of accumulator allocation, loc = %" PRIuHADDR "\n", (haddr_t)(accum->loc + accum->alloc_size)); HDprintf("=====================================================\n"); } @@ -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/btree2.c b/test/btree2.c index 58c45e2..ffb73de 100644 --- a/test/btree2.c +++ b/test/btree2.c @@ -10089,14 +10089,14 @@ main(void) if (nerrors) goto error; - puts("All v2 B-tree tests passed."); + HDputs("All v2 B-tree tests passed."); h5_cleanup(FILENAME, fapl); return 0; error: - puts("*** TESTS FAILED ***"); + HDputs("*** TESTS FAILED ***"); H5E_BEGIN_TRY { diff --git a/test/cache.c b/test/cache.c index cd7826e..895d301 100644 --- a/test/cache.c +++ b/test/cache.c @@ -2770,17 +2770,17 @@ write_permitted_check(int /*------------------------------------------------------------------------- * Function: check_insert_entry() * - * Purpose: Verify that H5C_insert_entry behaves as expected. - * Test the behaviour with different flags. + * Purpose: Verify that H5C_insert_entry behaves as expected. + * Test the behaviour with different flags. * - * This test was added primarily to test basic insert - * pinned entry functionallity, but I through in explicit - * tests for other functionallity that is tested implicitly - * elsewhere. + * This test was added primarily to test basic insert + * pinned entry functionallity, but I through in explicit + * tests for other functionallity that is tested implicitly + * elsewhere. * - * Return: void + * Return: void * - * Programmer: John Mainzer + * Programmer: John Mainzer * 8/10/06 * * Modifications: @@ -4448,7 +4448,7 @@ check_flush_cache__multi_entry_test(H5F_t *file_ptr, int test_num, unsigned int #if 0 /* JRM */ /* This gets used a lot, so lets leave it in. */ - HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", + HDfprintf(stdout, "check_flush_cache__multi_entry_test: test %d\n", test_num); #endif /* JRM */ @@ -8230,7 +8230,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->at_main_addr != check[i].at_main_addr ) { - HDfprintf(stdout, + HDfprintf(stdout, "(%d,%d) at main addr (expected) = %d (%d).\n", (int)(check[i].entry_type), (int)(check[i].entry_index), @@ -8240,7 +8240,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->is_dirty != check[i].is_dirty ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_dirty (expected) = %d (%d).\n", (int)(entry_ptr->is_dirty), (int)(check[i].is_dirty)); @@ -8248,7 +8248,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->header.is_dirty != check[i].is_dirty ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_dirty (expected) = %d (%d).\n", (int)(entry_ptr->header.is_dirty), (int)(check[i].is_dirty)); @@ -8256,7 +8256,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->is_protected != check[i].is_protected ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_protected (expected) = %d (%d).\n", (int)(entry_ptr->is_protected), (int)(check[i].is_protected)); @@ -8264,7 +8264,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->header.is_protected != check[i].is_protected ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_protected (expected) = %d (%d).\n", (int)(entry_ptr->is_protected), (int)(check[i].is_protected)); @@ -8272,7 +8272,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->is_pinned != check[i].is_pinned ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->is_pinned (expected) = %d (%d).\n", (int)(entry_ptr->is_pinned), (int)(check[i].is_pinned)); @@ -8280,7 +8280,7 @@ check_flush_cache__flush_op_test(H5F_t *file_ptr, int test_num, unsigned int flu if ( entry_ptr->header.is_pinned != check[i].is_pinned ) { - HDfprintf(stdout, + HDfprintf(stdout, "entry_ptr->header.is_pinned (expected) = %d (%d).\n", (int)(entry_ptr->header.is_pinned), (int)(check[i].is_pinned)); diff --git a/test/cache_api.c b/test/cache_api.c index 051ff24..60014c8 100644 --- a/test/cache_api.c +++ b/test/cache_api.c @@ -1216,9 +1216,9 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) /* do random reads on all datasets */ n = 0; while ((pass) && (n < NUM_RANDOM_ACCESSES)) { - m = rand() % NUM_DSETS; - i = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; - j = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + m = HDrand() % NUM_DSETS; + i = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + j = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; /* select on disk hyperslab */ offset[0] = (hsize_t)i; /*offset of hyperslab in file*/ @@ -1328,8 +1328,8 @@ mdc_api_call_smoke_check(int express_test, unsigned paged, hid_t fcpl_id) m = 0; n = 0; while ((pass) && (n < NUM_RANDOM_ACCESSES)) { - i = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; - j = (rand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + i = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; + j = (HDrand() % (DSET_SIZE / CHUNK_SIZE)) * CHUNK_SIZE; /* select on disk hyperslab */ offset[0] = (hsize_t)i; /*offset of hyperslab in file*/ diff --git a/test/cache_common.c b/test/cache_common.c index bf31ecd..3762196 100644 --- a/test/cache_common.c +++ b/test/cache_common.c @@ -716,9 +716,11 @@ deserialize(const void *image, size_t len, void *udata, hbool_t *dirty, int32_t else { if ((*(((const char *)image) + 2)) != (char)(idx & 0xFF)) { HDfprintf(stdout, "type = %d, idx = %d, addr = 0x%lx.\n", type, idx, (long)addr); - HDfprintf(stdout, "*image = 0x%x 0x%x 0x%x\n", (int)(*((const char *)image)), - (int)(*(((const char *)image) + 1)), (int)(*(((const char *)image) + 2))); - HDfprintf(stdout, "expected *image = 0x%x\n", (int)(idx & 0xFF), (int)((idx & 0xFF00) >> 8)); + HDfprintf(stdout, "*image = 0x%" PRIx8 " 0x%" PRIx8 " 0x%" PRIx8 "\n", + (*((const uint8_t *)image)), (*(((const uint8_t *)image) + 1)), + (*(((const uint8_t *)image) + 2))); + HDfprintf(stdout, "expected *image = 0x%02" PRIx32 "%02" PRIx32 "\n", (uint32_t)idx & 0xFF, + (((uint32_t)idx & 0xFF00) >> 8)); } /* end if */ HDassert((*((const char *)image)) == (char)(type & 0xFF)); HDassert((*(((const char *)image) + 1)) == (char)((idx & 0xFF00) >> 8)); diff --git a/test/cmpd_dset.c b/test/cmpd_dset.c index b4e60ed..e74b438 100644 --- a/test/cmpd_dset.c +++ b/test/cmpd_dset.c @@ -302,7 +302,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s2[i].c[1] || s1[i].c[2] != s2[i].c[2] || s1[i].c[3] != s2[i].c[3] || s1[i].d != s2[i].d || s1[i].e != s2[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -339,7 +339,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s3[i].c[1] || s1[i].c[2] != s3[i].c[2] || s1[i].c[3] != s3[i].c[3] || s1[i].d != s3[i].d || s1[i].e != s3[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -369,7 +369,7 @@ test_compound(char *filename, hid_t fapl) for (i = 0; i < NX * NY; i++) { if (s1[i].b != s4[i].b || s1[i].d != s4[i].d) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -413,7 +413,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s5[i].c[1] || s1[i].c[2] != s5[i].c[2] || s1[i].c[3] != s5[i].c[3] || s1[i].d != s5[i].d || s1[i].e != s5[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -423,7 +423,7 @@ test_compound(char *filename, hid_t fapl) if (s5[i].pre != 1000 + 4 * i || s5[i].mid1 != 1001 + 4 * i || s5[i].mid2 != 1002 + 4 * i || s5[i].post != 1003 + 4 * i) { H5_FAILED(); - puts(" Memory values were clobbered"); + HDputs(" Memory values were clobbered"); goto error; } } @@ -482,7 +482,7 @@ test_compound(char *filename, hid_t fapl) s1[i].c[1] != s6[i].c[1] || s1[i].c[2] != s6[i].c[2] || s1[i].c[3] != s6[i].c[3] || s1[i].d != s6[i].d || s1[i].e != s6[i].e) { H5_FAILED(); - puts(" Incorrect values read from the file"); + HDputs(" Incorrect values read from the file"); goto error; } } @@ -492,7 +492,7 @@ test_compound(char *filename, hid_t fapl) if (s6[i].pre != 1000 + 4 * i || s6[i].mid1 != 1001 + 4 * i || s6[i].mid2 != 1002 + 4 * i || s6[i].post != 1003 + 4 * i) { H5_FAILED(); - puts(" Memory values were clobbered"); + HDputs(" Memory values were clobbered"); goto error; } } @@ -561,7 +561,7 @@ test_compound(char *filename, hid_t fapl) s2[i].c[1] != s1[i].c[1] || s2[i].c[2] != s1[i].c[2] || s2[i].c[3] != s1[i].c[3] || s2[i].d != s1[i].d || s2[i].e != s1[i].e) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -590,7 +590,7 @@ test_compound(char *filename, hid_t fapl) /* Read the dataset */ s8 = (s1_t *)HDcalloc((size_t)(h_size[0] * h_size[1]), sizeof(s1_t)); - assert(s8); + HDassert(s8); if (H5Dread(dataset, s1_tid, s8_m_sid, s8_f_sid, H5P_DEFAULT, s8) < 0) { goto error; } @@ -604,7 +604,7 @@ test_compound(char *filename, hid_t fapl) if (ps8->a != ps1->a || ps8->b != ps1->b || ps8->c[0] != ps1->c[0] || ps8->c[1] != ps1->c[1] || ps8->c[2] != ps1->c[2] || ps8->c[3] != ps1->c[3] || ps8->d != ps1->d || ps8->e != ps1->e) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -643,7 +643,7 @@ test_compound(char *filename, hid_t fapl) ps2->c[1] != ps1->c[1] || ps2->c[2] != ps1->c[2] || ps2->c[3] != ps1->c[3] || ps2->d != ps1->d || ps2->e != ps1->e) { H5_FAILED(); - puts(" Memory values clobbered"); + HDputs(" Memory values clobbered"); goto error; } } @@ -652,7 +652,7 @@ test_compound(char *filename, hid_t fapl) ps2->c[1] != (unsigned)(-1) || ps2->c[2] != (unsigned)(-1) || ps2->c[3] != (unsigned)(-1) || ps2->d != (unsigned)(-1) || ps2->e != (unsigned)(-1)) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -691,7 +691,7 @@ test_compound(char *filename, hid_t fapl) ps5->c[2] != ps1->c[2] || ps5->c[3] != ps1->c[3] || ps5->mid2 != (unsigned)(-1) || ps5->d != ps1->d || ps5->e != ps1->e || ps5->post != (unsigned)(-1)) { H5_FAILED(); - puts(" Memory values clobbered"); + HDputs(" Memory values clobbered"); goto error; } } @@ -702,7 +702,7 @@ test_compound(char *filename, hid_t fapl) ps5->c[3] != (unsigned)(-1) || ps5->mid2 != (unsigned)(-1) || ps5->d != (unsigned)(-1) || ps5->e != (unsigned)(-1) || ps5->post != (unsigned)(-1)) { H5_FAILED(); - puts(" Incorrect values read from file"); + HDputs(" Incorrect values read from file"); goto error; } } @@ -723,7 +723,7 @@ test_compound(char *filename, hid_t fapl) h_size[0] = 2 * NX / 3 - f_offset[0]; h_size[1] = 2 * NY / 3 - f_offset[1]; s11 = (s4_t *)HDmalloc((size_t)h_size[0] * (size_t)h_size[1] * sizeof(s4_t)); - assert(s11); + HDassert(s11); /* Initialize */ for (i = 0; i < h_size[0] * h_size[1]; i++) { @@ -751,7 +751,7 @@ test_compound(char *filename, hid_t fapl) ps1->c[1] != 8 * (i * NY + j) + 3 || ps1->c[2] != 8 * (i * NY + j) + 4 || ps1->c[3] != 8 * (i * NY + j) + 5 || ps1->e != 8 * (i * NY + j) + 7) { H5_FAILED(); - puts(" Write clobbered values"); + HDputs(" Write clobbered values"); goto error; } @@ -759,14 +759,14 @@ test_compound(char *filename, hid_t fapl) j < f_offset[1] + h_size[1]) { if (ps1->b != (unsigned)(-1) || ps1->d != (unsigned)(-1)) { H5_FAILED(); - puts(" Wrong values written or read"); + HDputs(" Wrong values written or read"); goto error; } } else { if (ps1->b != 8 * (i * NY + j) + 1 || ps1->d != 8 * (i * NY + j) + 6) { H5_FAILED(); - puts(" Write clobbered values"); + HDputs(" Write clobbered values"); goto error; } } @@ -792,7 +792,7 @@ test_compound(char *filename, hid_t fapl) return 0; error: - puts("*** DATASET TESTS FAILED ***"); + HDputs("*** DATASET TESTS FAILED ***"); /* Release resources */ if (s1) @@ -1669,7 +1669,7 @@ test_hdf5_dst_subset(char *filename, hid_t fapl) return 0; error: - puts("*** DATASET TESTS FAILED ***"); + HDputs("*** DATASET TESTS FAILED ***"); return 1; } @@ -1684,7 +1684,7 @@ error: for (_i = 0; _i < PACK_NMEMBS; _i++) \ HDprintf(" %d", order[_i]); \ HDprintf("\n Inner compound order = %d, location = %d\n", sub_cmpd_order, order[sub_cmpd_order]); \ - fflush(stdout); \ + HDfflush(stdout); \ goto error; \ } @@ -1719,7 +1719,7 @@ test_pack_ooo(void) * the compound */ unsigned i, j; /* Indices */ - HDsrand((unsigned)time(NULL)); + HDsrand((unsigned)HDtime(NULL)); /* Initialize "free_order" array to indicate that all slots in order are * free */ @@ -2233,7 +2233,7 @@ main(int argc, char *argv[]) /* Turn off optimized compound converter? */ if (argc > 1) { - if (argc > 2 || strcmp("--noopt", argv[1])) { + if (argc > 2 || HDstrcmp("--noopt", argv[1]) != 0) { HDfprintf(stderr, "usage: %s [--noopt]\n", argv[0]); HDexit(EXIT_FAILURE); } diff --git a/test/dangle.c b/test/dangle.c index e6cb8af..d41507b 100644 --- a/test/dangle.c +++ b/test/dangle.c @@ -663,7 +663,7 @@ main(void) int nerrors = 0; /* Run tests w/weak file close */ - puts("Testing dangling objects with weak file close:"); + HDputs("Testing dangling objects with weak file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_WEAK); nerrors += test_dangle_group(H5F_CLOSE_WEAK); nerrors += test_dangle_datatype1(H5F_CLOSE_WEAK); @@ -671,7 +671,7 @@ main(void) nerrors += test_dangle_attribute(H5F_CLOSE_WEAK); /* Run tests w/semi file close */ - puts("Testing dangling objects with semi file close:"); + HDputs("Testing dangling objects with semi file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_SEMI); nerrors += test_dangle_group(H5F_CLOSE_SEMI); nerrors += test_dangle_datatype1(H5F_CLOSE_SEMI); @@ -679,7 +679,7 @@ main(void) nerrors += test_dangle_attribute(H5F_CLOSE_SEMI); /* Run tests w/strong file close */ - puts("Testing dangling objects with strong file close:"); + HDputs("Testing dangling objects with strong file close:"); nerrors += test_dangle_dataset(H5F_CLOSE_STRONG); nerrors += test_dangle_group(H5F_CLOSE_STRONG); nerrors += test_dangle_datatype1(H5F_CLOSE_STRONG); @@ -692,11 +692,11 @@ main(void) /* Check for errors */ if (nerrors) goto error; - puts("All dangling ID tests passed."); + HDputs("All dangling ID tests passed."); return 0; error: - puts("***** DANGLING ID TESTS FAILED *****"); + HDputs("***** DANGLING ID TESTS FAILED *****"); return 1; } diff --git a/test/direct_chunk.c b/test/direct_chunk.c index 7db7242..61e3df9 100644 --- a/test/direct_chunk.c +++ b/test/direct_chunk.c @@ -2326,7 +2326,7 @@ main(void) need_comma = TRUE; } /* end if */ HDprintf(":\n"); - fflush(stdout); + HDfflush(stdout); nerrors += test_single_chunk(config); } /* end for */ diff --git a/test/dsets.c b/test/dsets.c index 74ff06e..6160c65 100644 --- a/test/dsets.c +++ b/test/dsets.c @@ -375,13 +375,13 @@ test_create(hid_t file) dims[0] = 256; dims[1] = 512; space = H5Screate_simple(2, dims, NULL); - assert(space >= 0); + HDassert(space >= 0); /* Create a small data space for compact dataset */ small_dims[0] = 16; small_dims[1] = 8; small_space = H5Screate_simple(2, small_dims, NULL); - assert(space >= 0); + HDassert(space >= 0); /* * Create a dataset using the default dataset creation properties. We're @@ -450,13 +450,13 @@ test_create(hid_t file) * layout. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - assert(create_parms >= 0); + HDassert(create_parms >= 0); /* Attempt to create a dataset with invalid chunk sizes */ csize[0] = dims[0] * 2; csize[1] = dims[1] * 2; status = H5Pset_chunk(create_parms, 2, csize); - assert(status >= 0); + HDassert(status >= 0); H5E_BEGIN_TRY { dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, @@ -472,7 +472,7 @@ test_create(hid_t file) csize[0] = 5; csize[1] = 100; status = H5Pset_chunk(create_parms, 2, csize); - assert(status >= 0); + HDassert(status >= 0); dataset = H5Dcreate2(file, DSET_CHUNKED_NAME, H5T_NATIVE_DOUBLE, space, H5P_DEFAULT, create_parms, H5P_DEFAULT); @@ -494,11 +494,11 @@ test_create(hid_t file) * Create a compact dataset, then close it. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - assert(create_parms >= 0); + HDassert(create_parms >= 0); status = H5Pset_layout(create_parms, H5D_COMPACT); - assert(status >= 0); + HDassert(status >= 0); status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY); - assert(status >= 0); + HDassert(status >= 0); dataset = H5Dcreate2(file, DSET_COMPACT_NAME, H5T_NATIVE_DOUBLE, small_space, H5P_DEFAULT, create_parms, H5P_DEFAULT); @@ -571,7 +571,7 @@ test_simple_io(const char *env_h5_drvr, hid_t fapl) /* Create a small conversion buffer to test strip mining */ tconv_buf = HDmalloc((size_t)1000); xfer = H5Pcreate(H5P_DATASET_XFER); - assert(xfer >= 0); + HDassert(xfer >= 0); if (H5Pset_buffer(xfer, (size_t)1000, tconv_buf, NULL) < 0) goto error; @@ -4383,9 +4383,9 @@ test_nbit_compound_3(hid_t file) /* Check that the values read are the same as the values written */ for (i = 0; i < (size_t)size[0]; i++) { - if (new_data[i].i != orig_data[i].i || strcmp(new_data[i].str, orig_data[i].str) != 0 || - strcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || new_data[i].v.len != orig_data[i].v.len || - new_data[i].r != orig_data[i].r) { + if (new_data[i].i != orig_data[i].i || HDstrcmp(new_data[i].str, orig_data[i].str) != 0 || + HDstrcmp(new_data[i].vl_str, orig_data[i].vl_str) != 0 || + new_data[i].v.len != orig_data[i].v.len || new_data[i].r != orig_data[i].r) { H5_FAILED(); HDprintf(" Read different values than written.\n"); HDprintf(" At index %lu\n", (unsigned long)i); @@ -4601,7 +4601,7 @@ test_nbit_int_size(hid_t file) if ((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1 * DSET_DIM2 * (precision / 8) || dset_size > DSET_DIM1 * DSET_DIM2 * (precision / 8) + 1 * KB) { H5_FAILED(); - HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n", __LINE__, dset_size); + HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size); goto error; } @@ -4811,7 +4811,7 @@ test_nbit_flt_size(hid_t file) if ((dset_size = H5Dget_storage_size(dataset)) < DSET_DIM1 * DSET_DIM2 * (precision / 8) || dset_size > DSET_DIM1 * DSET_DIM2 * (precision / 8) + 1 * KB) { H5_FAILED(); - HDfprintf(stdout, " Line %d: wrong dataset size: %Hu\n", __LINE__, dset_size); + HDfprintf(stdout, " Line %d: wrong dataset size: %" PRIuHSIZE "\n", __LINE__, dset_size); goto error; } /* end if */ @@ -4822,8 +4822,14 @@ test_nbit_flt_size(hid_t file) PASSED(); + HDfree(orig); + HDfree(orig_data); + return SUCCEED; error: + HDfree(orig); + HDfree(orig_data); + return FAIL; } /* end test_nbit_flt_size() */ @@ -7892,7 +7898,7 @@ test_random_chunks_real(const char *testname, hbool_t early_alloc, hid_t fapl) TESTING(testname); - assert(NPOINTS < 100); + HDassert(NPOINTS < 100); h5_fixname(FILENAME[6], fapl, filename, sizeof filename); @@ -8414,13 +8420,13 @@ test_deprec(hid_t file) dims[0] = 256; dims[1] = 512; space = H5Screate_simple(2, dims, NULL); - assert(space >= 0); + HDassert(space >= 0); /* Create a small data space for compact dataset */ small_dims[0] = 16; small_dims[1] = 8; small_space = H5Screate_simple(2, small_dims, NULL); - assert(space >= 0); + HDassert(space >= 0); /* * Create a dataset using the default dataset creation properties. We're @@ -8479,7 +8485,7 @@ test_deprec(hid_t file) * layout. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - assert(create_parms >= 0); + HDassert(create_parms >= 0); /* Add the deflate filter, if available */ #if defined H5_HAVE_FILTER_DEFLATE @@ -8515,7 +8521,7 @@ test_deprec(hid_t file) csize[0] = dims[0] * 2; csize[1] = dims[1] * 2; status = H5Pset_chunk(create_parms, 2, csize); - assert(status >= 0); + HDassert(status >= 0); H5E_BEGIN_TRY { dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms); @@ -8530,7 +8536,7 @@ test_deprec(hid_t file) csize[0] = 5; csize[1] = 100; status = H5Pset_chunk(create_parms, 2, csize); - assert(status >= 0); + HDassert(status >= 0); if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_CHUNKED, H5T_NATIVE_DOUBLE, space, create_parms)) < 0) goto error; @@ -8555,11 +8561,11 @@ test_deprec(hid_t file) * Create a compact dataset, then close it. */ create_parms = H5Pcreate(H5P_DATASET_CREATE); - assert(create_parms >= 0); + HDassert(create_parms >= 0); status = H5Pset_layout(create_parms, H5D_COMPACT); - assert(status >= 0); + HDassert(status >= 0); status = H5Pset_alloc_time(create_parms, H5D_ALLOC_TIME_EARLY); - assert(status >= 0); + HDassert(status >= 0); if ((dataset = H5Dcreate1(file, DSET_DEPREC_NAME_COMPACT, H5T_NATIVE_DOUBLE, small_space, create_parms)) < 0) diff --git a/test/dt_arith.c b/test/dt_arith.c index 1eafee2..f2bf6cf 100644 --- a/test/dt_arith.c +++ b/test/dt_arith.c @@ -359,7 +359,7 @@ static int without_hardware_g = 0; \ for (n = 0; n < 2; n++) { \ if (n == 1) { \ - memset(value, 0, SRC_SIZE * sizeof(unsigned char)); \ + HDmemset(value, 0, SRC_SIZE * sizeof(unsigned char)); \ /* -0 */ \ H5T__bit_set(value, (size_t)(SRC_PREC - 1), (size_t)1, TRUE); \ CHANGE_ORDER(value, SRC_ORDR, SRC_SIZE); /*change order for big endian*/ \ @@ -566,7 +566,7 @@ generates_sigfpe(void) HDfflush(stdout); HDfflush(stderr); - if ((pid = fork()) < 0) { + if ((pid = HDfork()) < 0) { HDperror("fork"); HDexit(EXIT_FAILURE); } @@ -580,7 +580,7 @@ generates_sigfpe(void) HDexit(EXIT_SUCCESS); } - while (pid != waitpid(pid, &status, 0)) + while (pid != HDwaitpid(pid, &status, 0)) /*void*/; if (WIFEXITED(status) && 0 == WEXITSTATUS(status)) { HDputs("Floating-point overflow cases will be tested."); @@ -2391,7 +2391,7 @@ test_conv_int_1(const char *name, hid_t src, hid_t dst) } /* Make certain that there isn't some weird number of destination bits */ - assert(dst_nbits % 8 == 0); + HDassert(dst_nbits % 8 == 0); /* Are the two results the same? */ for (k = (dst_size - (dst_nbits / 8)); k < dst_size; k++) @@ -2949,12 +2949,12 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) */ HDfflush(stdout); HDfflush(stderr); - if ((child_pid = fork()) < 0) { + if ((child_pid = HDfork()) < 0) { HDperror("fork"); return 1; } else if (child_pid > 0) { - while (child_pid != waitpid(child_pid, &status, 0)) /*void*/ + while (child_pid != HDwaitpid(child_pid, &status, 0)) /*void*/ ; if (WIFEXITED(status) && 255 == WEXITSTATUS(status)) { return 0; /*child exit after catching SIGFPE*/ @@ -3023,7 +3023,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) if (sizeof(float) == sizeof(double)) HDputs("Sizeof(float)==sizeof(double) - some tests may not be sensible."); if (OTHER == src_type || OTHER == dst_type) { - if (!strcmp(name, "noop")) + if (!HDstrcmp(name, "noop")) HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); else if (run_test == TEST_SPECIAL) @@ -3042,7 +3042,7 @@ test_conv_flt_1(const char *name, int run_test, hid_t src, hid_t dst) goto error; } else { - if (!strcmp(name, "noop")) + if (!HDstrcmp(name, "noop")) HDsnprintf(str, sizeof(str), "Testing %s %s -> %s conversions", name, src_type_name, dst_type_name); else if (run_test == TEST_SPECIAL) @@ -4351,7 +4351,7 @@ test_conv_int_fp(const char *name, int run_test, hid_t src, hid_t dst) } /* Make certain that there isn't some weird number of destination bits */ - assert(dst_nbits % 8 == 0); + HDassert(dst_nbits % 8 == 0); /* For Intel machines, the size of "long double" is 12 bytes, precision * is 80 bits; for AMD processors, the size of "long double" is 16 bytes, @@ -5010,7 +5010,7 @@ run_fp_tests(const char *name) { int nerrors = 0; - if (!strcmp(name, "noop")) { + if (!HDstrcmp(name, "noop")) { nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_FLOAT, H5T_NATIVE_FLOAT); nerrors += test_conv_flt_1("noop", TEST_NOOP, H5T_NATIVE_DOUBLE, H5T_NATIVE_DOUBLE); #if H5_SIZEOF_LONG_DOUBLE != 0 @@ -5247,7 +5247,7 @@ run_fp_int_conv(const char *name) #endif #if H5_SIZEOF_LONG_LONG != H5_SIZEOF_LONG - if (!strcmp(name, "hw")) { /* Hardware conversion */ + if (!HDstrcmp(name, "hw")) { /* Hardware conversion */ nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_FLOAT, H5T_NATIVE_LLONG); nerrors += test_conv_int_fp(name, test_values, H5T_NATIVE_DOUBLE, H5T_NATIVE_LLONG); } diff --git a/test/dtypes.c b/test/dtypes.c index 383361b..b7b8dbd 100644 --- a/test/dtypes.c +++ b/test/dtypes.c @@ -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; } diff --git a/test/earray.c b/test/earray.c index 8e3204f..eedf02f 100644 --- a/test/earray.c +++ b/test/earray.c @@ -331,52 +331,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 */ @@ -777,7 +788,7 @@ test_create(hid_t fapl, H5EA_create_t *cparam, earray_test_param_t H5_ATTR_UNUSE } #else /* NDEBUG */ SKIPPED(); - puts(" Not tested when assertions are disabled"); + HDputs(" Not tested when assertions are disabled"); #endif /* NDEBUG */ /* @@ -2451,12 +2462,12 @@ main(void) switch (curr_test) { /* "Normal" testing parameters */ case EARRAY_TEST_NORMAL: - puts("Testing with normal parameters"); + HDputs("Testing with normal parameters"); break; /* "Re-open array" testing parameters */ case EARRAY_TEST_REOPEN: - puts("Testing with reopen array flag set"); + HDputs("Testing with reopen array flag set"); tparam.reopen_array = EARRAY_TEST_REOPEN; break; @@ -2485,31 +2496,31 @@ main(void) switch (curr_iter) { /* "Forward" testing parameters */ case EARRAY_ITER_FW: - puts("Testing with forward iteration"); + HDputs("Testing with forward iteration"); tparam.eiter = &ea_iter_fw; break; /* "Reverse" testing parameters */ case EARRAY_ITER_RV: - puts("Testing with reverse iteration"); + HDputs("Testing with reverse iteration"); tparam.eiter = &ea_iter_rv; break; /* "Random" testing parameters */ case EARRAY_ITER_RND: - puts("Testing with random iteration"); + HDputs("Testing with random iteration"); tparam.eiter = &ea_iter_rnd; break; /* "Random #2" testing parameters */ case EARRAY_ITER_RND2: - puts("Testing with random #2 iteration"); + HDputs("Testing with random #2 iteration"); tparam.eiter = &ea_iter_rnd2; break; /* "Cyclic" testing parameters */ case EARRAY_ITER_CYC: - puts("Testing with cyclic iteration"); + HDputs("Testing with cyclic iteration"); tparam.eiter = &ea_iter_cyc; break; diff --git a/test/enum.c b/test/enum.c index 47e7e1c..3923892 100644 --- a/test/enum.c +++ b/test/enum.c @@ -792,11 +792,11 @@ main(void) if (nerrors) goto error; - puts("All enum tests passed."); + HDputs("All enum tests passed."); h5_cleanup(FILENAME, fapl); return 0; error: - puts("*** ENUM TESTS FAILED ***"); + HDputs("*** ENUM TESTS FAILED ***"); return 1; } diff --git a/test/error_test.c b/test/error_test.c index 5e74474..c8205ff8 100644 --- a/test/error_test.c +++ b/test/error_test.c @@ -506,7 +506,7 @@ error: /*------------------------------------------------------------------------- * Function: test_copy * - * Purpose: Test copyinging an error stack + * Purpose: Test copying an error stack * * Return: Success: 0 * Failure: -1 diff --git a/test/external.c b/test/external.c index 19a11e7..c31701d 100644 --- a/test/external.c +++ b/test/external.c @@ -485,12 +485,12 @@ add_external_files(hid_t dcpl_id, unsigned int n_external_files, off_t offset, h for (i = 0; i < n_external_files; i++) { if (HDsnprintf(exname, AEF_EXNAME_MAX_LEN, "ext%d.data", i + 1) > AEF_EXNAME_MAX_LEN) { HDfprintf(stderr, "External file %d overflows name buffer\n", i + 1); - fflush(stderr); + HDfflush(stderr); return -1; } if (H5Pset_external(dcpl_id, exname, offset, max_ext_size) < 0) { HDfprintf(stderr, "Problem adding external file %s\n", exname); - fflush(stderr); + HDfflush(stderr); return -1; } } diff --git a/test/farray.c b/test/farray.c index 7254654..a93abd4 100644 --- a/test/farray.c +++ b/test/farray.c @@ -177,20 +177,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 } @@ -491,7 +491,7 @@ test_create(hid_t fapl, H5FA_create_t *cparam, farray_test_param_t H5_ATTR_UNUSE } #else /* NDEBUG */ SKIPPED(); - puts(" Not tested when assertions are disabled"); + HDputs(" Not tested when assertions are disabled"); #endif /* NDEBUG */ /* diff --git a/test/fheap.c b/test/fheap.c index b1558db..e075a64 100644 --- a/test/fheap.c +++ b/test/fheap.c @@ -178,14 +178,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -214,14 +214,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -250,13 +250,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 6, 2006 @@ -272,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 */ @@ -320,13 +322,13 @@ error: } /* check_stats() */ /*------------------------------------------------------------------------- - * Function: op_memcpy + * Function: op_memcpy * - * Purpose: Perform 'memcpy' for an object + * Purpose: Perform 'memcpy' for an object * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, September 11, 2006 @@ -343,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: @@ -359,7 +361,7 @@ op_memcpy(const void *obj, size_t obj_len, void *op_data) * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -465,13 +467,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 6, 2006 @@ -503,9 +505,9 @@ get_del_string(const fheap_test_param_t *tparam) /*------------------------------------------------------------------------- * 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 @@ -532,13 +534,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 4, 2006 @@ -582,12 +584,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 18, 2006 @@ -637,13 +639,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 4, 2006 @@ -748,13 +750,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 4, 2006 @@ -784,12 +786,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 4, 2006 @@ -849,13 +851,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 6, 2006 @@ -941,13 +943,13 @@ error: } /* del_objs_half_refill() */ /*------------------------------------------------------------------------- - * Function: del_objs + * Function: del_objs * - * Purpose: Remove objects from heap + * Purpose: Remove objects from heap * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 6, 2006 @@ -1022,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: @@ -1038,7 +1040,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 7, 2006 @@ -1232,13 +1234,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1328,13 +1330,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 11, 2006 @@ -1373,13 +1375,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1405,16 +1407,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 3, 2006 @@ -1444,15 +1446,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1483,14 +1485,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1520,15 +1522,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1558,15 +1560,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1595,15 +1597,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 18, 2006 @@ -1633,15 +1635,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1672,15 +1674,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1710,15 +1712,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1759,15 +1761,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 10, 2006 @@ -1815,12 +1817,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, February 24, 2006 @@ -1934,12 +1936,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 18, 2006 @@ -2087,12 +2089,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 18, 2006 @@ -2265,12 +2267,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, January 5, 2007 @@ -2443,12 +2445,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -2781,12 +2783,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -2903,12 +2905,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, August 14, 2007 @@ -3177,12 +3179,12 @@ error: } /* test_reopen_hdr() */ /*------------------------------------------------------------------------- - * 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 18, 2006 @@ -3291,13 +3293,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, February 24, 2006 @@ -3392,13 +3394,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 6, 2006 @@ -3487,14 +3489,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 6, 2006 @@ -3585,15 +3587,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 6, 2006 @@ -3691,15 +3693,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 7, 2006 @@ -3797,16 +3799,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 7, 2006 @@ -3909,15 +3911,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 13, 2006 @@ -4005,15 +4007,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 14, 2006 @@ -4108,15 +4110,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 14, 2006 @@ -4208,16 +4210,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 20, 2006 @@ -4319,15 +4321,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 20, 2006 @@ -4417,15 +4419,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 20, 2006 @@ -4513,15 +4515,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 20, 2006 @@ -4614,16 +4616,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -4724,16 +4726,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -4826,9 +4828,9 @@ 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 @@ -4836,7 +4838,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -4936,9 +4938,9 @@ 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 @@ -4947,7 +4949,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -5044,9 +5046,9 @@ 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 @@ -5055,7 +5057,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 21, 2006 @@ -5144,16 +5146,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5253,16 +5255,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5355,9 +5357,9 @@ 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 @@ -5365,7 +5367,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5465,9 +5467,9 @@ 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 @@ -5475,7 +5477,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5576,9 +5578,9 @@ 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 @@ -5586,7 +5588,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5684,9 +5686,9 @@ 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 @@ -5694,7 +5696,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5792,9 +5794,9 @@ 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 @@ -5803,7 +5805,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -5907,9 +5909,9 @@ 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 @@ -5918,7 +5920,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -6028,9 +6030,9 @@ 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 @@ -6039,7 +6041,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -6140,9 +6142,9 @@ 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 @@ -6151,7 +6153,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -6253,9 +6255,9 @@ error: #endif /* ALL_INSERT_TESTS */ /*------------------------------------------------------------------------- - * 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 @@ -6265,7 +6267,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -6386,13 +6388,13 @@ error: } /* test_man_start_5th_recursive_indirect() */ /*------------------------------------------------------------------------- - * 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 15, 2006 @@ -6546,13 +6548,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 15, 2006 @@ -6710,13 +6712,13 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 22, 2006 @@ -6903,14 +6905,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, June 6, 2006 @@ -7072,14 +7074,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, June 10, 2006 @@ -7312,14 +7314,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 12, 2006 @@ -7612,12 +7614,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Sunday, April 1, 2012 @@ -7740,14 +7742,14 @@ error: } /* test_man_incr_insert_remove() */ /*------------------------------------------------------------------------- - * 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 22, 2006 @@ -7813,14 +7815,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 22, 2006 @@ -7901,14 +7903,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 5, 2006 @@ -7971,14 +7973,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, June 12, 2006 @@ -8043,14 +8045,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, June 13, 2006 @@ -8119,14 +8121,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, June 13, 2006 @@ -8189,14 +8191,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, June 13, 2006 @@ -8263,14 +8265,14 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, July 24, 2006 @@ -8341,9 +8343,9 @@ error: } /* test_man_remove_3rd_indirect() */ /*------------------------------------------------------------------------- - * 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 * @@ -8351,7 +8353,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, March 27, 2006 @@ -8422,15 +8424,15 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 28, 2006 @@ -8520,16 +8522,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, March 28, 2006 @@ -8630,16 +8632,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 1, 2006 @@ -8724,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). @@ -8736,7 +8738,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 1, 2006 @@ -8867,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 @@ -8881,7 +8883,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 3, 2006 @@ -9035,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). @@ -9048,7 +9050,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 15, 2006 @@ -9165,9 +9167,9 @@ 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 @@ -9175,7 +9177,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 15, 2006 @@ -9294,16 +9296,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 3, 2006 @@ -9418,9 +9420,9 @@ 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 @@ -9428,7 +9430,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 3, 2006 @@ -9445,14 +9447,14 @@ 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 */ - 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"; @@ -9549,9 +9551,9 @@ 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 @@ -9560,7 +9562,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 18, 2006 @@ -9692,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 @@ -9706,7 +9708,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -9860,16 +9862,16 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 15, 2006 @@ -10014,9 +10016,9 @@ 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 @@ -10025,7 +10027,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 11, 2006 @@ -10199,9 +10201,9 @@ 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 @@ -10209,7 +10211,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -10328,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 @@ -10340,7 +10342,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -10470,9 +10472,9 @@ 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 @@ -10481,7 +10483,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -10622,19 +10624,19 @@ 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, April 11, 2006 @@ -10779,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 @@ -10792,7 +10794,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tues, April 18, 2006 @@ -10942,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 @@ -10956,7 +10958,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tues, April 18, 2006 @@ -11112,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 @@ -11124,7 +11126,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Saturday, April 15, 2006 @@ -11273,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 @@ -11287,7 +11289,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 17, 2006 @@ -11456,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 @@ -11470,7 +11472,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 17, 2006 @@ -11674,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 @@ -11690,7 +11692,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 17, 2006 @@ -11874,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 @@ -11890,7 +11892,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, April 17, 2006 @@ -12109,9 +12111,9 @@ error: */ /*------------------------------------------------------------------------- - * 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. @@ -12120,7 +12122,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, July 24, 2006 @@ -12241,9 +12243,9 @@ 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. * @@ -12251,7 +12253,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 25, 2006 @@ -12410,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. @@ -12422,7 +12424,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 25, 2006 @@ -12521,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 @@ -12534,7 +12536,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, July 25, 2006 @@ -12641,14 +12643,14 @@ error: } /* test_man_frag_3rd_direct() */ /*------------------------------------------------------------------------- - * 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 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 7, 2006 @@ -12791,14 +12793,14 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 11, 2006 @@ -13021,14 +13023,14 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 11, 2006 @@ -13326,14 +13328,14 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Friday, August 11, 2006 @@ -13751,12 +13753,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, August 15, 2006 @@ -13847,7 +13849,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) @@ -13874,7 +13875,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; @@ -13960,14 +13960,14 @@ error: } /* test_filtered_huge() */ /*------------------------------------------------------------------------- - * 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 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -14110,14 +14110,14 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -14340,15 +14340,15 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -14947,12 +14947,12 @@ error: } /* test_tiny_insert_mix() */ /*------------------------------------------------------------------------- - * 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 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, August 14, 2006 @@ -15120,12 +15120,12 @@ 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 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, October 24, 2006 @@ -15446,16 +15446,16 @@ error: } /* test_filtered_man_root_indirect() */ /*------------------------------------------------------------------------- - * 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 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, May 9, 2006 @@ -15646,9 +15646,9 @@ 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. * @@ -15656,7 +15656,7 @@ error: * * Return: Success: 0 * - * Failure: 1 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, May 15, 2006 @@ -15861,12 +15861,12 @@ error: } /* test_random_pow2() */ /*------------------------------------------------------------------------- - * 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 + * Failure: 1 * * Programmer: Quincey Koziol * Monday, December 18, 2006 @@ -16152,14 +16152,14 @@ error: } /* test_write() */ /*------------------------------------------------------------------------- - * 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 + * Failure: 1 * * Programmer: Quincey Koziol * Tuesday, November 28, 2006 @@ -16324,13 +16324,13 @@ error: } /* test_bug1() */ /*------------------------------------------------------------------------- - * Function: main + * Function: main * - * Purpose: Test the fractal heap code + * Purpose: Test the fractal heap code * * Return: Success: * - * Failure: + * Failure: * * Programmer: Quincey Koziol * Friday, February 24, 2006 diff --git a/test/filenotclosed.c b/test/filenotclosed.c index 74de488..b5def9b 100644 --- a/test/filenotclosed.c +++ b/test/filenotclosed.c @@ -80,7 +80,7 @@ main(void) contig_addr_vfd = (hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0); if (!contig_addr_vfd) { SKIPPED(); - puts(" Temporary skipped for a spilt/multi driver"); + HDputs(" Temporary skipped for a spilt/multi driver"); HDexit(EXIT_SUCCESS); } diff --git a/test/fillval.c b/test/fillval.c index bfba392..8e21648 100644 --- a/test/fillval.c +++ b/test/fillval.c @@ -207,7 +207,7 @@ test_getset(void) H5E_END_TRY; if (fill_i != 0) { H5_FAILED(); - puts(" H5Pget_fill_value() should return default 0"); + HDputs(" H5Pget_fill_value() should return default 0"); goto error; } @@ -226,8 +226,8 @@ test_getset(void) goto error; if (fill_ss.v1 != fill_ss_rd.v1 || fill_ss.v2 != fill_ss_rd.v2) { H5_FAILED(); - puts(" Failed to get fill value using same data type that was "); - puts(" used to set the fill value."); + HDputs(" Failed to get fill value using same data type that was "); + HDputs(" used to set the fill value."); goto error; } @@ -238,8 +238,8 @@ test_getset(void) goto error; if (fill_ss.v1 != fill_si.v1 || fill_ss.v2 != fill_si.v2) { H5_FAILED(); - puts(" Failed to get fill value using a data type other than what"); - puts(" was used to set the fill value."); + HDputs(" Failed to get fill value using a data type other than what"); + HDputs(" was used to set the fill value."); goto error; } @@ -252,7 +252,7 @@ test_getset(void) goto error; if (fill_si.v1 != fill_ss.v1 || fill_si.v2 != fill_ss.v2) { H5_FAILED(); - puts(" Resetting the fill value was unsuccessful."); + HDputs(" Resetting the fill value was unsuccessful."); goto error; } @@ -670,12 +670,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_LATE) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (fill_time != H5D_FILL_TIME_ALLOC) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset3) < 0) @@ -690,7 +690,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (layout == H5D_CONTIGUOUS && allocation != H5D_SPACE_STATUS_NOT_ALLOCATED) { H5_FAILED(); - puts(" Got allocated space instead of unallocated."); + HDputs(" Got allocated space instead of unallocated."); HDprintf(" Got %d\n", allocation); goto error; } @@ -702,12 +702,12 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_LATE) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_LATE space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (fill_time != H5D_FILL_TIME_NEVER) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_NEVER fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset4) < 0) @@ -725,7 +725,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 || rd_c.z != '\0') { H5_FAILED(); - puts(" Got wrong fill value"); + HDputs(" Got wrong fill value"); HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x, rd_c.z); } @@ -754,14 +754,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_EARLY) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (H5Pget_fill_time(dcpl, &fill_time) < 0) goto error; if (fill_time != H5D_FILL_TIME_NEVER) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_NEVER fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_NEVER fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset5) < 0) @@ -794,14 +794,14 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) goto error; if (alloc_time != H5D_ALLOC_TIME_EARLY) { H5_FAILED(); - puts(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); + HDputs(" Got non-H5D_ALLOC_TIME_EARLY space allocation time."); HDprintf(" Got %d\n", alloc_time); } if (H5Pget_fill_time(dcpl, &fill_time) < 0) goto error; if (fill_time != H5D_FILL_TIME_ALLOC) { H5_FAILED(); - puts(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); + HDputs(" Got non-H5D_FILL_TIME_ALLOC fill value write time."); HDprintf(" Got %d\n", fill_time); } if (H5Dclose(dset6) < 0) @@ -819,7 +819,7 @@ test_create(hid_t fapl, const char *base_name, H5D_layout_t layout) if (!H5_FLT_ABS_EQUAL(rd_c.a, 0) || !H5_DBL_ABS_EQUAL(rd_c.y, fill_ctype.y) || rd_c.x != 0 || rd_c.z != '\0') { H5_FAILED(); - puts(" Got wrong fill value"); + HDputs(" Got wrong fill value"); HDprintf(" Got rd_c.a=%f, rd_c.y=%f and rd_c.x=%d, rd_c.z=%c\n", (double)rd_c.a, rd_c.y, rd_c.x, rd_c.z); } @@ -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); @@ -1651,7 +1657,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t } /* end if */ else { /* Sanity check */ - assert(dtype_class == H5T_COMPOUND); + HDassert(dtype_class == H5T_COMPOUND); /* Initialize specific values for this datatype */ val_size = sizeof(comp_vl_datatype); @@ -1703,7 +1709,7 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t } /* end for */ /* Check for overflow */ - assert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size))); + HDassert((nelmts * val_size) == (hsize_t)((size_t)(nelmts * val_size))); /* Allocate & initialize buffer */ buf = HDmalloc((size_t)(nelmts * val_size)); @@ -2015,7 +2021,6 @@ test_extend_cases(hid_t file, hid_t _dcpl, const char *dset_name, const hsize_t HDfree(init_val_c.a); HDfree(init_val_c.b); HDfree(buf); - buf = NULL; /* Cleanup IDs */ if (H5Pclose(dcpl) < 0) @@ -2144,7 +2149,7 @@ test_extend(hid_t fapl, const char *base_name, H5D_layout_t layout) */ if (H5D_CONTIGUOUS == layout) { SKIPPED(); - puts(" Not implemented yet -- needs H5S_SELECT_DIFF operator"); + HDputs(" Not implemented yet -- needs H5S_SELECT_DIFF operator"); goto skip; } #endif @@ -2262,7 +2267,7 @@ test_compatible(void) goto error; if (dims[0] != 8 || dims[1] != 8) { H5_FAILED(); - puts(" Got a different dimension size than what was set."); + HDputs(" Got a different dimension size than what was set."); HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]); goto error; } @@ -2274,7 +2279,7 @@ test_compatible(void) goto error; if (val_rd != 0) { H5_FAILED(); - puts(" Got a different value than what was set."); + HDputs(" Got a different value than what was set."); HDprintf(" Got %ld, set 0\n", (long)val_rd); goto error; } @@ -2315,7 +2320,7 @@ test_compatible(void) goto error; if (dims[0] != 8 || dims[1] != 8) { H5_FAILED(); - puts(" Got a different dimension size than what was set."); + HDputs(" Got a different dimension size than what was set."); HDprintf(" Got dims[0]=%ld, dims[1]=%ld, set 8x8\n", (long)dims[0], (long)dims[1]); goto error; } @@ -2327,7 +2332,7 @@ test_compatible(void) goto error; if (val_rd != fill_val) { H5_FAILED(); - puts(" Got a different value than what was set."); + HDputs(" Got a different value than what was set."); HDprintf(" Got %ld, set %ld\n", (long)val_rd, (long)fill_val); goto error; } @@ -2662,11 +2667,11 @@ main(int argc, char *argv[]) if (argc >= 2) { test_contig = test_chunk = test_compact = 0; for (argno = 1; argno < argc; argno++) { - if (!strcmp(argv[argno], "contiguous")) + if (!HDstrcmp(argv[argno], "contiguous")) test_contig = 1; - else if (!strcmp(argv[argno], "chunked")) + else if (!HDstrcmp(argv[argno], "chunked")) test_chunk = 1; - else if (!strcmp(argv[argno], "compact")) + else if (!HDstrcmp(argv[argno], "compact")) test_compact = 1; else { HDfprintf(stderr, "usage: %s [contiguous] [chunked] [compact]\n", argv[0]); @@ -2696,11 +2701,11 @@ main(int argc, char *argv[]) /* Set the FAPL for the type of format */ if (new_format) { - puts("\nTesting with new file format:"); + HDputs("\nTesting with new file format:"); my_fapl = fapl2; } /* end if */ else { - puts("Testing with old file format:"); + HDputs("Testing with old file format:"); my_fapl = fapl; } /* end else */ diff --git a/test/filter_fail.c b/test/filter_fail.c index e701130..a1bcf28 100644 --- a/test/filter_fail.c +++ b/test/filter_fail.c @@ -174,7 +174,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) H5E_END_TRY; if (ret >= 0) { H5_FAILED(); - puts(" Data writing is supposed to fail because the chunk can't be written to file."); + HDputs(" Data writing is supposed to fail because the chunk can't be written to file."); TEST_ERROR } } @@ -195,7 +195,7 @@ test_filter_write(char *file_name, hid_t my_fapl, hbool_t cache_enabled) H5E_END_TRY; if (ret >= 0) { H5_FAILED(); - puts(" Dataset is supposed to fail because the chunk can't be flushed to file."); + HDputs(" Dataset is supposed to fail because the chunk can't be flushed to file."); TEST_ERROR } } diff --git a/test/filter_plugin.c b/test/filter_plugin.c index 60f7171..276141a 100644 --- a/test/filter_plugin.c +++ b/test/filter_plugin.c @@ -1068,7 +1068,7 @@ test_path_api_calls(void) /* Get the path */ if ((path_len = H5PLget(0, path, 256)) <= 0) { - HDfprintf(stderr, " get 0 len: %u : %s\n", path_len, path); + HDfprintf(stderr, " get 0 len: %zd : %s\n", path_len, path); TEST_ERROR; } if (HDstrcmp(path, "a_path_0") != 0) { diff --git a/test/freespace.c b/test/freespace.c index 51f0dc1..6cab2bf 100644 --- a/test/freespace.c +++ b/test/freespace.c @@ -399,22 +399,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_cross.c b/test/gen_cross.c index d9bb700..3eac79a 100644 --- a/test/gen_cross.c +++ b/test/gen_cross.c @@ -928,7 +928,7 @@ create_deflate_dsets_float(hid_t fid, hid_t fsid, hid_t msid) #else /* H5_HAVE_FILTER_DEFLATE */ const char *not_supported = "Deflate filter is not enabled. Can't create the dataset."; - puts(not_supported); + HDputs(not_supported); #endif /* H5_HAVE_FILTER_DEFLATE */ return 0; diff --git a/test/gen_filters.c b/test/gen_filters.c index 4dcb4be..7b7c268 100644 --- a/test/gen_filters.c +++ b/test/gen_filters.c @@ -243,12 +243,12 @@ main(void) if (nerrors) goto error; - printf("All tests passed.\n"); + HDprintf("All tests passed.\n"); return 0; error: nerrors = MAX(1, nerrors); - printf("***** %d GEN_FILTERS FAILURES *****\n", nerrors); + HDprintf("***** %d GEN_FILTERS FAILURES *****\n", nerrors); return 1; } diff --git a/test/getname.c b/test/getname.c index 51f274b..30ab98d 100644 --- a/test/getname.c +++ b/test/getname.c @@ -3787,7 +3787,7 @@ main(void) if (nerrors) goto error; - puts("All getname tests passed."); + HDputs("All getname tests passed."); h5_cleanup(FILENAME, fapl); @@ -3800,7 +3800,7 @@ error: } H5E_END_TRY; - puts("***** GET NAME TESTS FAILED *****"); + HDputs("***** GET NAME TESTS FAILED *****"); return 1; } diff --git a/test/gheap.c b/test/gheap.c index 07312f6..779b331 100644 --- a/test/gheap.c +++ b/test/gheap.c @@ -41,9 +41,9 @@ nerrors++; \ if (nerrors <= GHEAP_REPEATED_ERR_LIM) { \ H5_FAILED(); \ - puts(MSG); \ + HDputs(MSG); \ if (nerrors == GHEAP_REPEATED_ERR_LIM) \ - puts(" Suppressing further errors..."); \ + HDputs(" Suppressing further errors..."); \ } /* end if */ \ } /* end GHEAP_REPEATED_ERR */ diff --git a/test/h5test.c b/test/h5test.c index 7e869b1..5cf9224 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -1958,7 +1958,8 @@ h5_compare_file_bytes(char *f1name, char *f2name) f2size = HDftell(f2ptr); if (f1size != f2size) { - HDfprintf(stderr, "Files differ in size, %llu vs. %llu\n", f1size, f2size); + HDfprintf(stderr, "Files differ in size, %" PRIuHSIZE " vs. %" PRIuHSIZE "\n", (hsize_t)f1size, + (hsize_t)f2size); ret_value = -1; goto done; } @@ -1976,7 +1977,7 @@ h5_compare_file_bytes(char *f1name, char *f2name) goto done; } if (f1char != f2char) { - HDfprintf(stderr, "Mismatch @ 0x%llX: 0x%X != 0x%X\n", ii, f1char, f2char); + HDfprintf(stderr, "Mismatch @ 0x%" PRIXHSIZE ": 0x%X != 0x%X\n", (hsize_t)ii, f1char, f2char); ret_value = -1; goto done; } diff --git a/test/hdfs.c b/test/hdfs.c index d24e7aa..5465e77 100644 --- a/test/hdfs.c +++ b/test/hdfs.c @@ -230,9 +230,10 @@ */ #define JSERR_STR(expected, actual, reason) \ { \ + const char *_reason = reason; \ JSFAILED_AT() \ - if ((reason) != NULL) { \ - HDprintf("%s\n", (reason)); \ + if (_reason != NULL) { \ + HDprintf("%s\n", _reason); \ } \ else { \ HDprintf("!!! Expected:\n%s\n!!!Actual:\n%s\n", (expected), (actual)); \ @@ -302,7 +303,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 +348,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 */ @@ -413,8 +414,8 @@ test_fapl_config_validation(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS fapl configuration validation"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -563,9 +564,10 @@ test_fapl_config_validation(void) JSVERIFY(config.version, fa_fetch.version, "version number mismatch") JSVERIFY(config.namenode_port, fa_fetch.namenode_port, "namenode port mismatch") JSVERIFY(config.stream_buffer_size, fa_fetch.stream_buffer_size, "streambuffer size mismatch") - JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, NULL) - JSVERIFY_STR(config.user_name, fa_fetch.user_name, NULL) - JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, NULL) + JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, "node name mismatch") + JSVERIFY_STR(config.user_name, fa_fetch.user_name, "user name mismatch") + JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, + "kerberos ticket cache mismatch") } /*----------------------------- @@ -622,8 +624,8 @@ test_hdfs_fapl(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS fapl "); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -708,8 +710,8 @@ test_vfd_open(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS VFD-level open"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -964,8 +966,8 @@ test_eof_eoa(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS eof/eoa gets and sets"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1004,7 +1006,7 @@ test_eof_eoa(void) /* verify as found */ - JSVERIFY(5458199, H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), NULL) + JSVERIFY(5458199, H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), "EOF mismatch") JSVERIFY(H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), H5FDget_eof(fd_shakespeare, H5FD_MEM_DRAW), "mismatch between DEFAULT and RAW memory types") JSVERIFY(0, H5FDget_eoa(fd_shakespeare, H5FD_MEM_DEFAULT), "EoA should be unset by H5FDopen") @@ -1077,8 +1079,8 @@ test_H5FDread_without_eoa_set_fails(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS VFD read-eoa temporal coupling library limitation"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1179,8 +1181,8 @@ test_read(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS VFD read/range-gets"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1286,7 +1288,7 @@ test_read(void) HADDR_UNDEF); /* Demonstrate success with "automatic" value */ FAIL_IF(NULL == file_raven) - JSVERIFY(6464, H5FDget_eof(file_raven, H5FD_MEM_DEFAULT), NULL) + JSVERIFY(6464, H5FDget_eof(file_raven, H5FD_MEM_DEFAULT), "EOF mismatch") /********* * TESTS * @@ -1393,8 +1395,8 @@ test_noops_and_autofails(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS VFD always-fail and no-op routines"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1449,8 +1451,8 @@ test_noops_and_autofails(void) /* 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) + JSVERIFY(SUCCEED, H5FDlock(file, FALSE), "lock issue") + JSVERIFY(SUCCEED, H5FDunlock(file), "unlock issue") /* Lock/unlock with null file or similar error crashes tests. * HDassert in calling heirarchy, `H5FD[un]lock()` and `H5FD_[un]lock()` */ @@ -1548,8 +1550,8 @@ test_H5F_integration(void) #ifndef H5_HAVE_LIBHDFS TESTING("HDFS file access through HD5F library (H5F API)"); SKIPPED(); - puts(" HDFS VFD is not enabled"); - fflush(stdout); + HDputs(" HDFS VFD is not enabled"); + HDfflush(stdout); return 0; #else @@ -1617,7 +1619,7 @@ error: #if HDFS_TEST_DEBUG HDprintf("\nerror!"); - fflush(stdout); + HDfflush(stdout); #endif /* HDFS_TEST_DEBUG */ if (fapl_id >= 0) { diff --git a/test/istore.c b/test/istore.c index 20107df..c75b8bf 100644 --- a/test/istore.c +++ b/test/istore.c @@ -619,13 +619,13 @@ main(int argc, char *argv[]) else { int i; for (i = 1, size_of_test = 0; i < argc; i++) { - if (!strcmp(argv[i], "small")) { + if (!HDstrcmp(argv[i], "small")) { size_of_test |= TEST_SMALL; } - else if (!strcmp(argv[i], "medium")) { + else if (!HDstrcmp(argv[i], "medium")) { size_of_test |= TEST_MEDIUM; } - else if (!strcmp(argv[i], "large")) { + else if (!HDstrcmp(argv[i], "large")) { size_of_test |= TEST_LARGE; } else { diff --git a/test/lheap.c b/test/lheap.c index a2691ee..25dfed0 100644 --- a/test/lheap.c +++ b/test/lheap.c @@ -102,7 +102,7 @@ main(void) if (j > 4) buf[j] = '\0'; - if (UFAIL == (obj[i] = H5HL_insert(f, heap, strlen(buf) + 1, buf))) { + if (UFAIL == (obj[i] = H5HL_insert(f, heap, HDstrlen(buf) + 1, buf))) { H5_FAILED(); H5Eprint2(H5E_DEFAULT, stdout); goto error; diff --git a/test/links.c b/test/links.c index ee370de..3dfba36 100644 --- a/test/links.c +++ b/test/links.c @@ -1982,7 +1982,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_objinfo(file_id, "/group1/link_to_group2", TRUE, &sb_hard2) < 0) FAIL_STACK_ERROR - if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) { + if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) { H5_FAILED(); HDputs(" Hard link test failed. Link seems not to point to the "); HDputs(" expected file location."); @@ -1995,7 +1995,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_objinfo(file_id, "/group2/link_to_group1", TRUE, &sb_hard2) < 0) FAIL_STACK_ERROR - if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno))) { + if (HDmemcmp(&sb_hard1.objno, sb_hard2.objno, sizeof(sb_hard1.objno)) != 0) { H5_FAILED(); HDputs(" Hard link test failed. Link seems not to point to the "); HDputs(" expected file location."); @@ -2012,7 +2012,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_linkval(group2_id, "soft_link_to_group1", sb_soft1.linklen, tmpstr) < 0) FAIL_STACK_ERROR - if (HDstrcmp("link_to_group1", tmpstr)) + if (HDstrcmp("link_to_group1", tmpstr) != 0) TEST_ERROR /* Test the dangling soft link */ @@ -2025,7 +2025,7 @@ test_deprec(hid_t fapl, hbool_t new_format) if (H5Gget_linkval(group2_id, "dangle_soft_link", sb_soft2.linklen, tmpstr) < 0) FAIL_STACK_ERROR - if (HDstrcmp("dangle", tmpstr)) + if (HDstrcmp("dangle", tmpstr) != 0) TEST_ERROR /* Test H5Gmove and H5Gmove2 */ @@ -9675,7 +9675,7 @@ lapl_udata(hid_t fapl, hbool_t new_format) TEST_ERROR /* Now use the same ud link to access group_b */ - strcpy(group_b_name, "group_b"); + HDstrcpy(group_b_name, "group_b"); if (H5Pset(plist_id, DEST_PROP_NAME, group_b_name) < 0) TEST_ERROR @@ -9980,7 +9980,7 @@ ud_link_errors(hid_t fapl, hbool_t new_format) H5E_END_TRY /* Create a user-defined link to the group. */ - strcpy(group_name, "/group"); + HDstrcpy(group_name, "/group"); if (H5Lcreate_ud(fid, "/ud_link", (H5L_type_t)UD_CBFAIL_TYPE, &group_name, HDstrlen(group_name) + 1, H5P_DEFAULT, H5P_DEFAULT) < 0) FAIL_STACK_ERROR diff --git a/test/links_env.c b/test/links_env.c index aca84dd..590be20 100644 --- a/test/links_env.c +++ b/test/links_env.c @@ -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; } @@ -167,22 +167,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 */ @@ -6176,7 +6181,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 */ @@ -7774,7 +7779,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; @@ -8936,7 +8941,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/mirror_vfd.c b/test/mirror_vfd.c index e252096..3556cd2 100644 --- a/test/mirror_vfd.c +++ b/test/mirror_vfd.c @@ -63,8 +63,8 @@ static unsigned int g_verbosity = DEFAULT_VERBOSITY; #define LOGPRINT(lvl, ...) \ do { \ if ((lvl) <= g_verbosity) { \ - fprintf(g_log_stream, __VA_ARGS__); \ - fflush(g_log_stream); \ + HDfprintf(g_log_stream, __VA_ARGS__); \ + HDfflush(g_log_stream); \ } \ } while (0) @@ -150,7 +150,7 @@ _populate_filepath(const char *dirname, const char *_basename, hid_t fapl_id, ch } if (HDsnprintf(_path, H5FD_SPLITTER_PATH_MAX, "%s%s%s", dirname, - (dirname[strlen(dirname)] == '/') ? "" : "/", /* slash iff needed */ + (dirname[HDstrlen(dirname)] == '/') ? "" : "/", /* slash iff needed */ _basename) > H5FD_SPLITTER_PATH_MAX) { TEST_ERROR; } @@ -2341,7 +2341,7 @@ test_vanishing_datasets(void) TEST_ERROR; } if (group_info.nlinks > 0) { - HDfprintf(stderr, "links in rw file: %d\n", group_info.nlinks); + HDfprintf(stderr, "links in rw file: %" PRIuHSIZE "\n", group_info.nlinks); HDfflush(stderr); TEST_ERROR; } @@ -2356,7 +2356,7 @@ test_vanishing_datasets(void) TEST_ERROR; } if (group_info.nlinks > 0) { - HDfprintf(stderr, "links in wo file: %d\n", group_info.nlinks); + HDfprintf(stderr, "links in wo file: %" PRIuHSIZE "\n", group_info.nlinks); HDfflush(stderr); TEST_ERROR; } diff --git a/test/mtime.c b/test/mtime.c index edefa04..02ba0f0 100644 --- a/test/mtime.c +++ b/test/mtime.c @@ -144,7 +144,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 3aba65c..4d1ec51 100644 --- a/test/ntypes.c +++ b/test/ntypes.c @@ -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: * @@ -2001,9 +2001,9 @@ test_vlstr_dtype(hid_t file) "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 */ @@ -2115,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: * @@ -2135,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 */ @@ -2237,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: * @@ -2262,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 */ @@ -2410,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: * @@ -2428,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 */ @@ -2624,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: * @@ -2723,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 @@ -3098,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/page_buffer.c b/test/page_buffer.c index e493479..7f2748d 100644 --- a/test/page_buffer.c +++ b/test/page_buffer.c @@ -348,7 +348,7 @@ set_multi_split(const char *env_h5_drvr, hid_t fapl, hsize_t pagesize) /* Free memb_name */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) - free(memb_name[mt]); + HDfree(memb_name[mt]); } /* end if */ diff --git a/test/pool.c b/test/pool.c index 3fa3722..9ce1846 100644 --- a/test/pool.c +++ b/test/pool.c @@ -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/ros3.c b/test/ros3.c index aae2dd2..11a6451 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -306,7 +306,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 +351,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 +548,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 +829,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 +972,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 +1083,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 +1257,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 +1401,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; } @@ -1530,15 +1530,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 +1654,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 +1709,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 b07ef42..2723921 100644 --- a/test/s3comms.c +++ b/test/s3comms.c @@ -299,7 +299,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 +347,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 +1269,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 +1281,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 +1357,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 +1368,7 @@ test_nlowercase(void) return 0; error: - free(dest); + HDfree(dest); return -1; } /* end test_nlowercase() */ @@ -1729,7 +1729,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 +1768,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 +1828,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 +1861,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 +2032,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 +2093,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 +2110,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 +2120,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 +2217,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 +2243,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 +2251,7 @@ test_signing_key(void) error: if (key != NULL) { - free(key); + HDfree(key); } return -1; @@ -2399,9 +2399,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 +2412,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 +2422,7 @@ test_trim(void) error: if (str != NULL) { - free(str); + HDfree(str); } return -1; @@ -2513,9 +2513,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 */ @@ -2531,7 +2531,7 @@ test_uriencode(void) 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 +2539,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 3927408..daec7fd 100644 --- a/test/set_extent.c +++ b/test/set_extent.c @@ -2636,7 +2636,7 @@ test_random_rank4_vl(hid_t fapl, hid_t dcpl, hbool_t do_fillvalue, hbool_t disab TEST_ERROR if (H5Dvlen_reclaim(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) diff --git a/test/tarray.c b/test/tarray.c index 59a38a8..10480fe 100644 --- a/test/tarray.c +++ b/test/tarray.c @@ -2230,5 +2230,5 @@ test_array(void) void cleanup_array(void) { - remove(FILENAME); + HDremove(FILENAME); } /* end cleanup_array() */ 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/testframe.c b/test/testframe.c index 4b0beb5..f805997 100644 --- a/test/testframe.c +++ b/test/testframe.c @@ -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/testhdf5.c b/test/testhdf5.c index cf0dfa8..3585c44 100644 --- a/test/testhdf5.c +++ b/test/testhdf5.c @@ -81,7 +81,7 @@ main(int argc, char *argv[]) TestSummary(); /* Clean up test files, if allowed */ - if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) + if (GetTestCleanup() && !HDgetenv("HDF5_NOCLEANUP")) TestCleanup(); /* Release test infrastructure */ 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/tfile.c b/test/tfile.c index 2b7ada1..c096342 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -3987,7 +3987,7 @@ set_multi_split(hid_t fapl, hsize_t pagesize, hbool_t multi, hbool_t split) /* Free memb_name */ for (mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; mt++) - free(memb_name[mt]); + HDfree(memb_name[mt]); return 0; diff --git a/test/tgenprop.c b/test/tgenprop.c index 4e78739..7e805e2 100644 --- a/test/tgenprop.c +++ b/test/tgenprop.c @@ -2172,5 +2172,5 @@ test_genprop(void) void cleanup_genprop(void) { - remove(FILENAME); + HDremove(FILENAME); } diff --git a/test/thread_id.c b/test/thread_id.c index 0c9f61e..c7b2b44 100644 --- a/test/thread_id.c +++ b/test/thread_id.c @@ -73,7 +73,7 @@ pthread_barrier_init(pthread_barrier_t *barrier, const pthread_barrierattr_t *at if (attr != NULL) return EINVAL; - memset(barrier, 0, sizeof(*barrier)); + HDmemset(barrier, 0, sizeof(*barrier)); barrier->count = count; @@ -96,7 +96,7 @@ barrier_lock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_lock(&barrier->mtx)) != 0) { - my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, strerror(rc)); + my_errx(EXIT_FAILURE, "%s: pthread_mutex_lock: %s", __func__, HDstrerror(rc)); } } @@ -106,7 +106,7 @@ barrier_unlock(pthread_barrier_t *barrier) int rc; if ((rc = pthread_mutex_unlock(&barrier->mtx)) != 0) { - my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, strerror(rc)); + my_errx(EXIT_FAILURE, "%s: pthread_mutex_unlock: %s", __func__, HDstrerror(rc)); } } @@ -203,16 +203,16 @@ atomic_printf(const char *fmt, ...) va_list ap; ssize_t nprinted, nwritten; - va_start(ap, fmt); - nprinted = vsnprintf(buf, sizeof(buf), fmt, ap); - va_end(ap); + HDva_start(ap, fmt); + nprinted = HDvsnprintf(buf, sizeof(buf), fmt, ap); + HDva_end(ap); if (nprinted == -1) my_err(EXIT_FAILURE, "%s.%d: vsnprintf", __func__, __LINE__); else if (nprinted >= (ssize_t)sizeof(buf)) my_errx(EXIT_FAILURE, "%s.%d: vsnprintf overflowed", __func__, __LINE__); - nwritten = write(STDOUT_FILENO, buf, (size_t)nprinted); + nwritten = HDwrite(STDOUT_FILENO, buf, (size_t)nprinted); if (nwritten < nprinted) { my_errx(EXIT_FAILURE, "%s.%d: write error or short write", __func__, __LINE__); } diff --git a/test/timer.c b/test/timer.c index e907655..24f3245 100644 --- a/test/timer.c +++ b/test/timer.c @@ -146,7 +146,7 @@ test_timer_system_user(void) */ if (timer.initial.system < (double)0.0f || timer.initial.user < (double)0.0f) { SKIPPED(); - printf("NOTE: No suitable way to get system/user times on this platform.\n"); + HDprintf("NOTE: No suitable way to get system/user times on this platform.\n"); return 0; } @@ -383,7 +383,7 @@ main(void) h5_reset(); - printf("Testing platform-independent timer functionality.\n"); + HDprintf("Testing platform-independent timer functionality.\n"); nerrors += test_time_formatting() < 0 ? 1 : 0; nerrors += test_timer_system_user() < 0 ? 1 : 0; @@ -391,11 +391,12 @@ main(void) nerrors += test_timer_functionality() < 0 ? 1 : 0; if (nerrors) { - printf("***** %d platform-independent timer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : ""); + HDprintf("***** %d platform-independent timer TEST%s FAILED! *****\n", nerrors, + nerrors > 1 ? "S" : ""); return 1; } else { - printf("All platform-independent timer tests passed.\n"); + HDprintf("All platform-independent timer tests passed.\n"); return 0; } } diff --git a/test/tmisc.c b/test/tmisc.c index 2ccd49e..8dac16d 100644 --- a/test/tmisc.c +++ b/test/tmisc.c @@ -2840,7 +2840,7 @@ test_misc16(void) if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { TestErrPrintf( "Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", - (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i])); + (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); continue; } /* end if */ if (HDstrcmp(wdata[i], rdata[i]) != 0) { @@ -2925,7 +2925,7 @@ test_misc17(void) if (HDstrlen(wdata[i]) != HDstrlen(rdata[i])) { TestErrPrintf( "Line %u: VL data length don't match!, strlen(wdata[%d])=%d, strlen(rdata[%d])=%d\n", - (unsigned)__LINE__, (int)i, (int)strlen(wdata[i]), (int)i, (int)strlen(rdata[i])); + (unsigned)__LINE__, (int)i, (int)HDstrlen(wdata[i]), (int)i, (int)HDstrlen(rdata[i])); continue; } /* end if */ if (HDstrcmp(wdata[i], rdata[i]) != 0) { diff --git a/test/tselect.c b/test/tselect.c index fd47d97..c5c50f8 100644 --- a/test/tselect.c +++ b/test/tselect.c @@ -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); @@ -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); @@ -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/ttsafe.c b/test/ttsafe.c index 05c84f4..067a715 100644 --- a/test/ttsafe.c +++ b/test/ttsafe.c @@ -132,7 +132,7 @@ main(int argc, char *argv[]) TestSummary(); /* Clean up test files, if allowed */ - if (GetTestCleanup() && !getenv("HDF5_NOCLEANUP")) + if (GetTestCleanup() && !HDgetenv("HDF5_NOCLEANUP")) TestCleanup(); /* Release test infrastructure */ diff --git a/test/ttsafe_cancel.c b/test/ttsafe_cancel.c index de235c8..acaa9d6 100644 --- a/test/ttsafe_cancel.c +++ b/test/ttsafe_cancel.c @@ -65,46 +65,46 @@ tts_cancel(void) /* make thread scheduling global */ ret = pthread_attr_init(&attribute); - assert(ret == 0); + HDassert(ret == 0); #ifdef H5_HAVE_SYSTEM_SCOPE_THREADS ret = pthread_attr_setscope(&attribute, PTHREAD_SCOPE_SYSTEM); - assert(ret == 0); + HDassert(ret == 0); #endif /* H5_HAVE_SYSTEM_SCOPE_THREADS */ /* Initialize mutex & condition variables */ ret = pthread_mutex_init(&mutex, NULL); - assert(ret == 0); + HDassert(ret == 0); ret = pthread_cond_init(&cond, NULL); - assert(ret == 0); + HDassert(ret == 0); /* * Create a hdf5 file using H5F_ACC_TRUNC access, default file * creation plist and default file access plist */ cancel_file = H5Fcreate(FILENAME, H5F_ACC_TRUNC, H5P_DEFAULT, H5P_DEFAULT); - assert(cancel_file >= 0); + HDassert(cancel_file >= 0); ret = pthread_create(&childthread, &attribute, tts_cancel_thread, NULL); - assert(ret == 0); + HDassert(ret == 0); tts_cancel_barrier(); ret = pthread_cancel(childthread); - assert(ret == 0); + HDassert(ret == 0); dataset = H5Dopen2(cancel_file, DATASETNAME, H5P_DEFAULT); - assert(dataset >= 0); + HDassert(dataset >= 0); ret = H5Dread(dataset, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, &buffer); - assert(ret >= 0); + HDassert(ret >= 0); if (buffer != 11) TestErrPrintf("operation unsuccessful with value at %d instead of 11\n", buffer); ret = H5Dclose(dataset); - assert(ret >= 0); + HDassert(ret >= 0); ret = H5Fclose(cancel_file); - assert(ret >= 0); + HDassert(ret >= 0); /* Destroy the thread attribute */ ret = pthread_attr_destroy(&attribute); - assert(ret == 0); + HDassert(ret == 0); } /* end tts_cancel() */ void * diff --git a/test/ttsafe_dcreate.c b/test/ttsafe_dcreate.c index 1d10ad5..6243f5e 100644 --- a/test/ttsafe_dcreate.c +++ b/test/ttsafe_dcreate.c @@ -140,7 +140,7 @@ tts_dcreate_creator(void *_thread_data) hsize_t dimsf[1]; /* dataset dimensions */ struct thread_info thread_data; - memcpy(&thread_data, _thread_data, sizeof(struct thread_info)); + HDmemcpy(&thread_data, _thread_data, sizeof(struct thread_info)); /* define dataspace for dataset */ dimsf[0] = 1; diff --git a/test/ttsafe_error.c b/test/ttsafe_error.c index 925f6ff..336fc9e 100644 --- a/test/ttsafe_error.c +++ b/test/ttsafe_error.c @@ -217,6 +217,7 @@ walk_error_callback(unsigned n, const H5E_error2_t *err_desc, void H5_ATTR_UNUSE } error_flag_g = -1; + return SUCCEED; } diff --git a/test/tunicode.c b/test/tunicode.c index 6d4f029..83d31aa 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 df4202e..0363798 100644 --- a/test/tvlstr.c +++ b/test/tvlstr.c @@ -203,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) { @@ -307,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)) { @@ -536,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) { diff --git a/test/tvltypes.c b/test/tvltypes.c index 17b93ad..61d58cf 100644 --- a/test/tvltypes.c +++ b/test/tvltypes.c @@ -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 */ @@ -2986,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 */ @@ -3262,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 56b19b6..e792487 100644 --- a/test/twriteorder.c +++ b/test/twriteorder.c @@ -139,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); @@ -402,7 +402,7 @@ main(int argc, char *argv[]) Hgoto_error(1); }; }; - mypid = getpid(); + mypid = HDgetpid(); /* ============= */ /* launch reader */ @@ -438,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); } diff --git a/test/unlink.c b/test/unlink.c index f939bd6..744fe6e 100644 --- a/test/unlink.c +++ b/test/unlink.c @@ -578,7 +578,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_mchunks.c b/test/use_append_mchunks.c index f8fb5e2..47c9f92 100644 --- a/test/use_append_mchunks.c +++ b/test/use_append_mchunks.c @@ -163,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 */ @@ -237,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); } diff --git a/test/use_common.c b/test/use_common.c index d747983..0ea2c83 100644 --- a/test/use_common.c +++ b/test/use_common.c @@ -66,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); @@ -440,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 */ @@ -603,6 +603,8 @@ read_uc_file(hbool_t towait, options_t *opts) return -1; } + HDfree(buffer); + if (nreadererr) return -1; else @@ -2219,9 +2219,9 @@ test_ros3(void) /* need a macro to compare instances of H5FD_ros3_fapl_t */ if ((test_ros3_fa.version != ros3_fa_0.version) || (test_ros3_fa.authenticate != ros3_fa_0.authenticate) || - (strcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) || - (strcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) || - (strcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0)) + (HDstrcmp(test_ros3_fa.aws_region, ros3_fa_0.aws_region) != 0) || + (HDstrcmp(test_ros3_fa.secret_id, ros3_fa_0.secret_id) != 0) || + (HDstrcmp(test_ros3_fa.secret_key, ros3_fa_0.secret_key) != 0)) TEST_ERROR; h5_fixname(FILENAME[10], fapl_id, filename, sizeof(filename)); @@ -2270,7 +2270,7 @@ error: AT(); \ HDfprintf(stderr, mesg); \ H5Eprint2(H5E_DEFAULT, stderr); \ - fflush(stderr); \ + HDfflush(stderr); \ ret_value = -1; \ goto done; \ } @@ -2482,7 +2482,7 @@ run_splitter_test(const struct splitter_dataset_def *data, hbool_t ignore_wo_err } /* Verify existence of logfile if appropriate */ - logfile = fopen(vfd_config->log_file_path, "r"); + logfile = HDfopen(vfd_config->log_file_path, "r"); if ((TRUE == provide_logfile_path && NULL == logfile) || (FALSE == provide_logfile_path && NULL != logfile)) { SPLITTER_TEST_FAULT("no logfile when one was expected\n"); @@ -2503,7 +2503,7 @@ done: } if (logfile != NULL) - fclose(logfile); + HDfclose(logfile); HDfree(vfd_config); HDfree(filename_rw); |