summaryrefslogtreecommitdiffstats
path: root/test/h5test.c
diff options
context:
space:
mode:
authorjake.smith <jake.smith@hdfgroup.org>2018-12-29 20:31:31 (GMT)
committerjake.smith <jake.smith@hdfgroup.org>2018-12-29 20:31:31 (GMT)
commit905c3ca3d7736b151ff0889290c0c9e377988f26 (patch)
tree3b6d8b5ab846dcf0a29bf14460e5058096e78800 /test/h5test.c
parentba095e6a53a919c9753463c3800a26b180b7a135 (diff)
parentf54fb420d08ea0a7e7b026150c0ab559803e0acd (diff)
downloadhdf5-905c3ca3d7736b151ff0889290c0c9e377988f26.zip
hdf5-905c3ca3d7736b151ff0889290c0c9e377988f26.tar.gz
hdf5-905c3ca3d7736b151ff0889290c0c9e377988f26.tar.bz2
Merge pull request #1372 in HDFFV/hdf5 from ~JAKE.SMITH/hdf5:dset_ohdr_minimize to develop
Dataset object header minimization Jira TRILAB-45 * commit 'f54fb420d08ea0a7e7b026150c0ab559803e0acd': (34 commits) Specify variable type. Remove unnecessary whitespace. OHDR tests now accept h5_fileaccess() fapls. Formatting, informative comments, and minor renaming. Fix some CMake listings Add error checking to the minimized dset header size calculation. Update printf->HDprintf statements. Remove `#if 0` block of deprecated code. Fix mistake with H5E_BEGIN_TRY {...} H5E_END_TRY block containing ERROR-raising macros. Formatting tweaks. Add "compact" storage test to relative header size comparisons. Formatting adjustments. Formatting adjustments Move H5Fset_dset_no_attrs_hint VOL operations to native. Move minimzied object header tests from separate file to test/ohdr.c Some formatting changes. Re-format test/ohdr_mindset.c Fix a few transcription errors in other test files. formatting adjustments Reformat to be more consistent with existing code. Fix a few typos. add missing paramter - macro seemingly unused, but absence results in compiler complaint fix reference; move declaration in file Remove unused debugging print in '#if 0' block Fix typo. Fix CHECK of wrong ID (dset[2|3]_id). change test file name and apply 'h5_fixname' to it Sidestep and hide&flag minor issues causing test failures. Incorporate minimized dset ohdr tests into extant suite. ...
Diffstat (limited to 'test/h5test.c')
-rw-r--r--test/h5test.c47
1 files changed, 4 insertions, 43 deletions
diff --git a/test/h5test.c b/test/h5test.c
index 0226aa7..7973126 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -158,47 +158,8 @@ h5_clean_files(const char *base_name[], hid_t fapl)
int i;
for(i = 0; base_name[i]; i++) {
- char filename[1024];
- char temp[2048];
- hid_t driver;
-
- if(NULL == h5_fixname(base_name[i], fapl, filename, sizeof(filename)))
- continue;
-
- driver = H5Pget_driver(fapl);
-
- if(driver == H5FD_FAMILY) {
- int j;
-
- for(j = 0; /*void*/; j++) {
- HDsnprintf(temp, sizeof temp, filename, j);
-
- if(HDaccess(temp, F_OK) < 0)
- break;
-
- HDremove(temp);
- } /* end for */
- } else if(driver == H5FD_CORE) {
- hbool_t backing; /* Whether the core file has backing store */
-
- H5Pget_fapl_core(fapl, NULL, &backing);
-
- /* If the file was stored to disk with bacing store, remove it */
- if(backing)
- HDremove(filename);
- } else if (driver == H5FD_MULTI) {
- H5FD_mem_t mt;
-
- HDassert(HDstrlen(multi_letters)==H5FD_MEM_NTYPES);
-
- for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
- HDsnprintf(temp, sizeof temp, "%s-%c.h5", filename, multi_letters[mt]);
- HDremove(temp); /*don't care if it fails*/
- } /* end for */
- } else {
- HDremove(filename);
- }
- } /* end for */
+ h5_delete_test_file(base_name[i], fapl);
+ }
/* Close the FAPL used to access the file */
H5Pclose(fapl);
@@ -266,10 +227,10 @@ h5_delete_test_file(const char *base_name, hid_t fapl)
for(mt = H5FD_MEM_DEFAULT; mt < H5FD_MEM_NTYPES; H5_INC_ENUM(H5FD_mem_t,mt)) {
HDsnprintf(sub_filename, sizeof(sub_filename), "%s-%c.h5", filename, multi_letters[mt]);
HDremove(sub_filename);
- } /* end for */
+ }
} else {
HDremove(filename);
- } /* end if */
+ } /* end driver selection tree */
return;
} /* end h5_delete_test_file() */