diff options
author | Jacob Smith <jake.smith@hdfgroup.org> | 2018-12-21 21:45:56 (GMT) |
---|---|---|
committer | Jacob Smith <jake.smith@hdfgroup.org> | 2018-12-21 21:47:49 (GMT) |
commit | db9cc49a6bf77bf5125bbabb833c9428ada44b52 (patch) | |
tree | 6ab1953dec57dffcc7991640742d42b8ddc0006c /test | |
parent | 13baaea005ae32e1826fcd370a4a9e5e2d7ed657 (diff) | |
download | hdf5-db9cc49a6bf77bf5125bbabb833c9428ada44b52.zip hdf5-db9cc49a6bf77bf5125bbabb833c9428ada44b52.tar.gz hdf5-db9cc49a6bf77bf5125bbabb833c9428ada44b52.tar.bz2 |
Add error checking to the minimized dset header size calculation.
Update printf->HDprintf statements.
Diffstat (limited to 'test')
-rw-r--r-- | test/links.c | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/test/links.c b/test/links.c index 4951038..b09ddb1 100644 --- a/test/links.c +++ b/test/links.c @@ -547,7 +547,7 @@ cklinks(hid_t fapl, hbool_t new_format) if(H5Oget_info_by_name2(file, "grp1/hard", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_DATASET != oinfo2.type) { H5_FAILED(); - printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); + HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__); TEST_ERROR } /* end if */ if(H5F_addr_ne(oinfo1.addr, oinfo2.addr)) { @@ -582,7 +582,7 @@ cklinks(hid_t fapl, hbool_t new_format) if(H5Oget_info_by_name2(file, "grp1/soft", &oinfo2, H5O_INFO_BASIC, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5O_TYPE_DATASET != oinfo2.type) { H5_FAILED(); - printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); + HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__); TEST_ERROR } /* end if */ if(H5F_addr_ne(oinfo1.addr, oinfo2.addr)) { @@ -611,12 +611,12 @@ cklinks(hid_t fapl, hbool_t new_format) if(H5Lget_info(file, "grp1/dangle", &linfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5L_TYPE_SOFT != linfo2.type) { H5_FAILED(); - printf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__); + HDprintf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__); TEST_ERROR } /* end if */ if(H5Lget_val(file, "grp1/dangle", linkval, sizeof linkval, H5P_DEFAULT) < 0) { H5_FAILED(); - printf(" %d: Can't retrieve link value\n", __LINE__); + HDprintf(" %d: Can't retrieve link value\n", __LINE__); TEST_ERROR } /* end if */ if(HDstrcmp(linkval, "foobar")) { @@ -638,12 +638,12 @@ cklinks(hid_t fapl, hbool_t new_format) if(H5Lget_info(file, "grp1/recursive", &linfo2, H5P_DEFAULT) < 0) FAIL_STACK_ERROR if(H5L_TYPE_SOFT != linfo2.type) { H5_FAILED(); - printf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__); + HDprintf(" %d: Unexpected object type should have been a symbolic link\n", __LINE__); TEST_ERROR } /* end if */ if(H5Lget_val(file, "grp1/recursive", linkval, sizeof linkval, H5P_DEFAULT) < 0) { H5_FAILED(); - printf(" %d: Can't retrieve link value\n", __LINE__); + HDprintf(" %d: Can't retrieve link value\n", __LINE__); TEST_ERROR } /* end if */ if(HDstrcmp(linkval, "/grp1/recursive")) { @@ -708,7 +708,7 @@ ck_new_links(hid_t fapl, hbool_t new_format) /* Check hard links */ if(H5O_TYPE_DATASET != oi_hard1.type || H5O_TYPE_DATASET != oi_hard2.type) { H5_FAILED(); - printf(" %d: Unexpected object type should have been a dataset\n", __LINE__); + HDprintf(" %d: Unexpected object type should have been a dataset\n", __LINE__); TEST_ERROR } if(H5F_addr_ne(oi_dset.addr, oi_hard1.addr) || H5F_addr_ne(oi_dset.addr, oi_hard2.addr)) { @@ -2604,7 +2604,7 @@ external_link_toomany(hid_t fapl, hbool_t new_format) } H5E_END_TRY; if (gid >= 0) { H5_FAILED(); - printf("%d: Should have failed for sequence of too many nested links.", __LINE__); + HDprintf("%d: Should have failed for sequence of too many nested links.", __LINE__); goto error; } @@ -14916,11 +14916,11 @@ main(void) for (minimize_dset_oh = 0; minimize_dset_oh <= 1; minimize_dset_oh++) { if (minimize_dset_oh) { - printf("\n-Testing with minimzed dataset object headers-\n"); + HDprintf("\n-Testing with minimzed dataset object headers-\n"); dcpl_g = H5Pcreate(H5P_DATASET_CREATE); if (0 > dcpl_g) TEST_ERROR } else { - printf("\n-Testing with unminimzed dataset object headers-\n"); + HDprintf("\n-Testing with unminimzed dataset object headers-\n"); dcpl_g = H5P_DEFAULT; } @@ -14930,10 +14930,10 @@ main(void) /* Check for FAPL to use */ if(new_format) { my_fapl = fapl2; - printf("\n--Testing with 'new format'--\n"); + HDprintf("\n--Testing with 'new format'--\n"); } else { my_fapl = fapl; - printf("\n--Testing with 'old format'--\n"); + HDprintf("\n--Testing with 'old format'--\n"); } /* always enter tests without external cache */ @@ -14976,12 +14976,12 @@ main(void) if(efc) { if(H5Pset_elink_file_cache_size(my_fapl, 8) < 0) TEST_ERROR - printf("\n---Testing with external file cache---\n"); + HDprintf("\n---Testing with external file cache---\n"); } /* end if */ else { if(H5Pset_elink_file_cache_size(my_fapl, 0) < 0) TEST_ERROR - printf("\n---Testing without external file cache---\n"); + HDprintf("\n---Testing without external file cache---\n"); } /* end else */ nerrors += external_link_root(my_fapl, new_format) < 0 ? 1 : 0; @@ -15107,11 +15107,11 @@ main(void) /* Results */ if(nerrors) { - printf("***** %d LINK TEST%s FAILED! *****\n", + HDprintf("***** %d LINK TEST%s FAILED! *****\n", nerrors, 1 == nerrors ? "" : "S"); HDexit(EXIT_FAILURE); } - printf("All link tests passed.\n"); + HDprintf("All link tests passed.\n"); /* clean up symlink created by external link tests */ HDremove(SYMLINK1); |