summaryrefslogtreecommitdiffstats
path: root/test/tmisc.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/tmisc.c')
-rw-r--r--test/tmisc.c67
1 files changed, 27 insertions, 40 deletions
diff --git a/test/tmisc.c b/test/tmisc.c
index b646a69..41128a2 100644
--- a/test/tmisc.c
+++ b/test/tmisc.c
@@ -1797,11 +1797,10 @@ test_misc11(void)
unsigned sym_ik; /* Symbol table B-tree initial 'K' value */
unsigned istore_ik; /* Indexed storage B-tree initial 'K' value */
unsigned sym_lk; /* Symbol table B-tree leaf 'K' value */
- unsigned super; /* Superblock version # */
- unsigned freelist; /* Free list version # */
- unsigned stab; /* Symbol table entry version # */
- unsigned shhdr; /* Shared object header version # */
unsigned nindexes; /* Shared message number of indexes */
+ H5F_info2_t finfo; /* global information about file */
+ H5F_file_space_type_t strategy; /* File/free space strategy */
+ hsize_t threshold; /* Free-space section threshold */
herr_t ret; /* Generic return value */
/* Output message about test being performed */
@@ -1815,21 +1814,12 @@ test_misc11(void)
file= H5Fcreate(MISC11_FILE, H5F_ACC_TRUNC , H5P_DEFAULT, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fcreate");
- /* Get the file's dataset creation property list */
- fcpl = H5Fget_create_plist(file);
- CHECK(fcpl, FAIL, "H5Fget_create_plist");
-
/* Get the file's version information */
- ret=H5Pget_version(fcpl, &super, &freelist, &stab, &shhdr);
- CHECK(ret, FAIL, "H5Pget_version");
- VERIFY(super,0,"H5Pget_version");
- VERIFY(freelist,0,"H5Pget_version");
- VERIFY(stab,0,"H5Pget_version");
- VERIFY(shhdr,0,"H5Pget_version");
-
- /* Close FCPL */
- ret=H5Pclose(fcpl);
- CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Fget_info2(file, &finfo);
+ CHECK(ret, FAIL, "H5Fget_info2");
+ VERIFY(finfo.super.version, 0,"H5Fget_info2");
+ VERIFY(finfo.free.version, 0,"H5Fget_info2");
+ VERIFY(finfo.sohm.version, 0,"H5Fget_info2");
/* Close file */
ret=H5Fclose(file);
@@ -1856,6 +1846,9 @@ test_misc11(void)
ret=H5Pset_shared_mesg_nindexes(fcpl,MISC11_NINDEXES);
CHECK(ret, FAIL, "H5Pset_shared_mesg");
+ ret = H5Pset_file_space(fcpl, H5F_FILE_SPACE_VFD, 0);
+ CHECK(ret, FAIL, "H5Pset_file_space");
+
/* Creating a file with the non-default file creation property list should
* create a version 1 superblock
*/
@@ -1868,21 +1861,12 @@ test_misc11(void)
ret=H5Pclose(fcpl);
CHECK(ret, FAIL, "H5Pclose");
- /* Get the file's dataset creation property list */
- fcpl = H5Fget_create_plist(file);
- CHECK(fcpl, FAIL, "H5Fget_create_plist");
-
/* Get the file's version information */
- ret=H5Pget_version(fcpl, &super, &freelist, &stab, &shhdr);
- CHECK(ret, FAIL, "H5Pget_version");
- VERIFY(super,2,"H5Pget_version");
- VERIFY(freelist,0,"H5Pget_version");
- VERIFY(stab,0,"H5Pget_version");
- VERIFY(shhdr,0,"H5Pget_version");
-
- /* Close FCPL */
- ret=H5Pclose(fcpl);
- CHECK(ret, FAIL, "H5Pclose");
+ ret = H5Fget_info2(file, &finfo);
+ CHECK(ret, FAIL, "H5Fget_info2");
+ VERIFY(finfo.super.version, 2,"H5Fget_info2");
+ VERIFY(finfo.free.version, 0,"H5Fget_info2");
+ VERIFY(finfo.sohm.version, 0,"H5Fget_info2");
/* Close file */
ret=H5Fclose(file);
@@ -1892,17 +1876,16 @@ test_misc11(void)
file = H5Fopen(MISC11_FILE, H5F_ACC_RDONLY, H5P_DEFAULT);
CHECK(file, FAIL, "H5Fcreate");
- /* Get the file's dataset creation property list */
+ /* Get the file's creation property list */
fcpl = H5Fget_create_plist(file);
CHECK(fcpl, FAIL, "H5Fget_create_plist");
/* Get the file's version information */
- ret=H5Pget_version(fcpl, &super, &freelist, &stab, &shhdr);
- CHECK(ret, FAIL, "H5Pget_version");
- VERIFY(super,2,"H5Pget_version");
- VERIFY(freelist,0,"H5Pget_version");
- VERIFY(stab,0,"H5Pget_version");
- VERIFY(shhdr,0,"H5Pget_version");
+ ret = H5Fget_info2(file, &finfo);
+ CHECK(ret, FAIL, "H5Fget_info2");
+ VERIFY(finfo.super.version, 2,"H5Fget_info2");
+ VERIFY(finfo.free.version, 0,"H5Fget_info2");
+ VERIFY(finfo.sohm.version, 0,"H5Fget_info2");
/* Retrieve all the property values & check them */
ret=H5Pget_userblock(fcpl,&userblock);
@@ -1927,6 +1910,11 @@ test_misc11(void)
CHECK(ret, FAIL, "H5Pget_shared_mesg_nindexes");
VERIFY(nindexes, MISC11_NINDEXES, "H5Pget_shared_mesg_nindexes");
+ ret = H5Pget_file_space(fcpl, &strategy, &threshold);
+ CHECK(ret, FAIL, "H5Pget_file_space");
+ VERIFY(strategy, 4, "H5Pget_file_space");
+ VERIFY(threshold, 1, "H5Pget_file_space");
+
/* Close file */
ret=H5Fclose(file);
CHECK(ret, FAIL, "H5Fclose");
@@ -5162,7 +5150,6 @@ test_misc(void)
test_misc27(); /* Test opening file with object that has bad # of object header messages */
test_misc28(); /* Test that chunks are cached appropriately */
-
} /* test_misc() */