diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/extend.c | 2 | ||||
-rw-r--r-- | test/istore.c | 4 | ||||
-rw-r--r-- | test/tfile.c | 12 | ||||
-rw-r--r-- | test/th5p.c | 2 | ||||
-rw-r--r-- | test/theap.c | 3 | ||||
-rw-r--r-- | test/tohdr.c | 3 | ||||
-rw-r--r-- | test/tstab.c | 20 |
7 files changed, 27 insertions, 19 deletions
diff --git a/test/extend.c b/test/extend.c index 7f899ee..7de127e 100644 --- a/test/extend.c +++ b/test/extend.c @@ -54,7 +54,7 @@ main (void) assert (mem_space>=0); /* Create the file */ - file = H5Fcreate ("extend.h5", H5ACC_OVERWRITE, H5C_DEFAULT, H5C_DEFAULT); + file = H5Fcreate ("extend.h5", H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT); assert (file>=0); /* Create the dataset which is originally NX by NY */ diff --git a/test/istore.c b/test/istore.c index 4aca884..f5b4b04 100644 --- a/test/istore.c +++ b/test/istore.c @@ -578,8 +578,8 @@ main(int argc, char *argv[]) creation_template = H5A_object(template_id); /* Create the test file */ - if (NULL == (f = H5F_open(FILETYPE, FILENAME, - (H5F_ACC_CREAT | H5F_ACC_WRITE | H5F_ACC_TRUNC | + if (NULL == (f = H5F_open(FILENAME, + (H5F_ACC_CREAT | H5F_ACC_RDWR | H5F_ACC_TRUNC | H5F_ACC_DEBUG), creation_template, NULL))) { printf("Cannot create file %s; test aborted\n", FILENAME); diff --git a/test/tfile.c b/test/tfile.c index ffbe172..d252587 100644 --- a/test/tfile.c +++ b/test/tfile.c @@ -71,11 +71,11 @@ test_file_create(void) MESSAGE(5, ("Testing Low-Level File Creation I/O\n")); /* Create first file */ - fid1 = H5Fcreate(FILE1, H5ACC_OVERWRITE, 0, 0); + fid1 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT); CHECK(fid1, FAIL, "H5Fcreate"); /* Try to create first file again (should fail) */ - fid2 = H5Fcreate(FILE1, H5ACC_OVERWRITE, 0, 0); + fid2 = H5Fcreate(FILE1, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT); VERIFY(fid2, FAIL, "H5Fcreate"); /* Get the file-creation template */ @@ -101,9 +101,11 @@ test_file_create(void) ret = H5Mclose(tmpl1); CHECK(ret, FAIL, "H5Mrelease"); +#ifdef LATER /* Double-check that the atom has been vaporized */ ret = H5Mclose(tmpl1); VERIFY(ret, FAIL, "H5Mrelease"); +#endif /* Create a new file with a non-standard file-creation template */ tmpl1 = H5Ccreate(H5C_FILE_CREATE); @@ -123,7 +125,7 @@ test_file_create(void) * Try to create second file, with non-standard file-creation template * params. */ - fid2 = H5Fcreate(FILE2, H5ACC_OVERWRITE, tmpl1, 0); + fid2 = H5Fcreate(FILE2, H5F_ACC_TRUNC, tmpl1, H5C_DEFAULT); CHECK(fid2, FAIL, "H5Fcreate"); /* Release file-creation template */ @@ -165,7 +167,7 @@ test_file_create(void) * Try to create second file, with non-standard file-creation template * params */ - fid3 = H5Fcreate(FILE3, H5ACC_OVERWRITE, tmpl2, 0); + fid3 = H5Fcreate(FILE3, H5F_ACC_TRUNC, tmpl2, H5C_DEFAULT); CHECK(fid3, FAIL, "H5Fcreate"); /* Release file-creation template */ @@ -227,7 +229,7 @@ test_file_open(void) MESSAGE(5, ("Testing Low-Level File Opening I/O\n")); /* Open first file */ - fid1 = H5Fopen(FILE2, H5ACC_WRITE, 0); + fid1 = H5Fopen(FILE2, H5F_ACC_RDWR, H5C_DEFAULT); CHECK(fid1, FAIL, "H5Fopen"); /* Get the file-creation template */ diff --git a/test/th5p.c b/test/th5p.c index af9100a..e856e3c 100644 --- a/test/th5p.c +++ b/test/th5p.c @@ -70,7 +70,7 @@ test_h5p_basic(void) MESSAGE(5, ("Testing Datatype Manipulation\n")); /* Create file */ - fid1 = H5Fcreate(FILE, H5ACC_OVERWRITE, 0, 0); + fid1 = H5Fcreate(FILE, H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT); CHECK(fid1, FAIL, "H5Fcreate"); sid1 = H5Pcreate_simple(SPACE1_RANK, dims1, NULL); diff --git a/test/theap.c b/test/theap.c index cad0c3b..ec8a71d 100644 --- a/test/theap.c +++ b/test/theap.c @@ -19,6 +19,7 @@ #include <H5private.h> #include <H5Aprivate.h> #include <H5ACprivate.h> +#include <H5Cprivate.h> #include <H5Fprivate.h> #include <H5Hprivate.h> @@ -54,7 +55,7 @@ test_heap(void) MESSAGE(5, ("Testing Heaps\n")); /* Create the file */ - fid = H5Fcreate("theap.h5", H5ACC_OVERWRITE, 0, 0); + fid = H5Fcreate("theap.h5", H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT); CHECK(fid, FAIL, "H5Fcreate"); f = H5A_object(fid); CHECK(f, NULL, "H5Aatom_object"); diff --git a/test/tohdr.c b/test/tohdr.c index 9dded97..bbeb895 100644 --- a/test/tohdr.c +++ b/test/tohdr.c @@ -19,6 +19,7 @@ #include <H5private.h> #include <H5Aprivate.h> #include <H5ACprivate.h> +#include <H5Cprivate.h> #include <H5Fprivate.h> #include <H5Gprivate.h> #include <H5Oprivate.h> @@ -58,7 +59,7 @@ test_ohdr(void) MESSAGE(5, ("Testing Object Headers\n")); /* create the file */ - fid = H5Fcreate("tohdr.h5", H5ACC_OVERWRITE, 0, 0); + fid = H5Fcreate("tohdr.h5", H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT); CHECK(fid, FAIL, "H5Fcreate"); f = H5A_object(fid); CHECK(f, NULL, "H5Aatom_object"); diff --git a/test/tstab.c b/test/tstab.c index 4223897..c5d6b43 100644 --- a/test/tstab.c +++ b/test/tstab.c @@ -67,7 +67,7 @@ test_1(void) */ /* create the file */ - fid = H5Fcreate("tstab1.h5", H5ACC_OVERWRITE, 0, 0); + fid = H5Fcreate("tstab1.h5", H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT); CHECK(fid, FAIL, "H5Fcreate"); f = H5A_object(fid); CHECK(f, NULL, "H5Aatom_object"); @@ -130,7 +130,7 @@ test_1(void) */ /* create the file */ - fid = H5Fcreate("tstab1.h5", H5ACC_OVERWRITE, 0, 0); + fid = H5Fcreate("tstab1.h5", H5F_ACC_TRUNC, H5C_DEFAULT, H5C_DEFAULT); CHECK(fid, FAIL, "H5Fcreate"); f = H5A_object(fid); CHECK(f, NULL, "H5Aatom_object"); @@ -220,7 +220,7 @@ test_1(void) static void test_2(void) { - hid_t fid, props, dir; + hid_t fid, create_plist, access_plist, dir; H5F_t *f; int i; char name[256]; @@ -233,13 +233,17 @@ test_2(void) * Use larger symbol table data structures to be more efficient, use * defaults to bang harder on the library for testing. */ - props = H5Ccreate(H5C_FILE_CREATE); -#if 1 - H5Cset_sym_k(props, 16, 16); -#endif + create_plist = H5Ccreate(H5C_FILE_CREATE); + H5Cset_sym_k(create_plist, 16, 16); + + /* + * File access property list. + */ + access_plist = H5Ccreate (H5C_FILE_ACCESS); + H5Cset_core (access_plist, 3000000); /* create the file */ - fid = H5Fcreate("tstab2.h5", H5ACC_OVERWRITE, props, 0); + fid = H5Fcreate("tstab2.h5", H5F_ACC_TRUNC, create_plist, access_plist); CHECK(fid, FAIL, "H5Fcreate"); f = H5A_object(fid); CHECK(f, NULL, "H5Aatom_object"); |