summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-06-15 19:11:59 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-06-15 19:11:59 (GMT)
commitd0a9cf9ffaf0d62d8e793f4a89189a7a01eda7f5 (patch)
tree288c1956e2d23398652b07b76e3fb3c081b09888
parent40160d4d740ff706520b396fd9367089e8e4e2a2 (diff)
downloadhdf5-d0a9cf9ffaf0d62d8e793f4a89189a7a01eda7f5.zip
hdf5-d0a9cf9ffaf0d62d8e793f4a89189a7a01eda7f5.tar.gz
hdf5-d0a9cf9ffaf0d62d8e793f4a89189a7a01eda7f5.tar.bz2
[svn-r13871] Description:
Fix problems with 'check-vfd' target, that were [mostly] introduced with the recent "unique, but sharable" ISOHM optimization. The problems were mostly with using the 'core' VFD, so the H5Pset_fapl_core() API call was changed to re-open existing files (therefore operating more list the sec2, stdio, etc. VFDs). This allows many more of the tests to run using the 'core' VFD, so those were enabled also. Tested on: Linux/64 2.6 (chicago2) w/check-vfd
-rw-r--r--test/btree2.c2
-rw-r--r--test/dsets.c2
-rw-r--r--test/fillval.c2
-rw-r--r--test/getname.c61
-rw-r--r--test/h5test.c2
-rw-r--r--test/lheap.c96
-rw-r--r--test/mount.c2
-rw-r--r--test/mtime.c111
-rwxr-xr-xtest/objcopy.c2
-rw-r--r--test/ohdr.c36
-rwxr-xr-xtest/reserved.c1
-rw-r--r--test/stab.c2
12 files changed, 147 insertions, 172 deletions
diff --git a/test/btree2.c b/test/btree2.c
index 23b7def..e01de65 100644
--- a/test/btree2.c
+++ b/test/btree2.c
@@ -7454,7 +7454,7 @@ main(void)
envval = HDgetenv("HDF5_DRIVER");
if(envval == NULL)
envval = "nomatch";
- if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "family")) {
+ if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
/* Reset library */
h5_reset();
fapl = h5_fileaccess();
diff --git a/test/dsets.c b/test/dsets.c
index 1d055d2..a66877a 100644
--- a/test/dsets.c
+++ b/test/dsets.c
@@ -6218,7 +6218,7 @@ main(void)
envval = HDgetenv("HDF5_DRIVER");
if(envval == NULL)
envval = "nomatch";
- if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
+ if(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
char filename[1024];
hid_t file, grp, fapl, fapl2;
hbool_t new_format;
diff --git a/test/fillval.c b/test/fillval.c
index 092a3d7..1518a1c 100644
--- a/test/fillval.c
+++ b/test/fillval.c
@@ -1516,7 +1516,7 @@ main(int argc, char *argv[])
envval = HDgetenv("HDF5_DRIVER");
if(envval == NULL)
envval = "nomatch";
- if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
+ if(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
int nerrors=0, argno, test_contig=1, test_chunk=1, test_compact=1;
hid_t fapl = (-1), fapl2 = (-1); /* File access property lists */
hbool_t new_format; /* Whether to use the new format or not */
diff --git a/test/getname.c b/test/getname.c
index a429ed4..5fa673b 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -2791,44 +2791,33 @@ int
main(void)
{
hid_t file_id = (-1);
- const char *envval;
-
- envval = HDgetenv("HDF5_DRIVER");
- if(envval == NULL)
- envval = "nomatch";
- /* Does work with core driver. */
- if(HDstrcmp(envval, "core")==0) {
- printf("All getname tests skipped - "
- "Incompatible with current Virtual File Driver(%s)\n", envval);
- }else{
- int nerrors = 0;
- hid_t fapl;
- char filename0[1024];
-
- /* Reset the library and get the file access property list */
- h5_reset();
- fapl = h5_fileaccess();
- h5_fixname(FILENAME[0], fapl, filename0, sizeof filename0);
-
- /* Create a new file_id using default create property but vfd access
- * property.
- */
- if((file_id = H5Fcreate(filename0,H5F_ACC_TRUNC, H5P_DEFAULT, fapl )) < 0) TEST_ERROR
-
- /* Call "main" test routine */
- nerrors += test_main(file_id, fapl);
- nerrors += test_obj_ref(fapl);
- nerrors += test_reg_ref(fapl);
-
- /* Close file */
- H5Fclose(file_id);
+ int nerrors = 0;
+ hid_t fapl;
+ char filename0[1024];
+
+ /* Reset the library and get the file access property list */
+ h5_reset();
+ fapl = h5_fileaccess();
+ h5_fixname(FILENAME[0], fapl, filename0, sizeof filename0);
+
+ /* Create a new file_id using default create property but vfd access
+ * property.
+ */
+ if((file_id = H5Fcreate(filename0,H5F_ACC_TRUNC, H5P_DEFAULT, fapl )) < 0) TEST_ERROR
+
+ /* Call "main" test routine */
+ nerrors += test_main(file_id, fapl);
+ nerrors += test_obj_ref(fapl);
+ nerrors += test_reg_ref(fapl);
+
+ /* Close file */
+ H5Fclose(file_id);
- if(nerrors)
- goto error;
- puts("All getname tests passed.");
+ if(nerrors)
+ goto error;
+ puts("All getname tests passed.");
- h5_cleanup(FILENAME, fapl);
- } /* end if */
+ h5_cleanup(FILENAME, fapl);
return 0;
diff --git a/test/h5test.c b/test/h5test.c
index 8e12a43..ba3d04f 100644
--- a/test/h5test.c
+++ b/test/h5test.c
@@ -528,7 +528,7 @@ h5_fileaccess(void)
if (H5Pset_fapl_stdio(fapl)<0) return -1;
} else if (!HDstrcmp(name, "core")) {
/* In-core temporary file with 1MB increment */
- if (H5Pset_fapl_core(fapl, (size_t)1024*1024, FALSE)<0) return -1;
+ if (H5Pset_fapl_core(fapl, (size_t)1024*1024, TRUE)<0) return -1;
} else if (!HDstrcmp(name, "split")) {
/* Split meta data and raw data each using default driver */
if (H5Pset_fapl_split(fapl,
diff --git a/test/lheap.c b/test/lheap.c
index abf1bc0..537d42d 100644
--- a/test/lheap.c
+++ b/test/lheap.c
@@ -63,7 +63,6 @@ main(void)
int i, j; /*miscellaneous counters */
char buf[1024]; /*the value to store */
const char *s; /*value to read */
- const char *envval = NULL; /*value from environment */
/* Reset library */
h5_reset();
@@ -115,62 +114,51 @@ main(void)
* Test reading from the heap...
*/
- /* Don't run this test using the core file driver */
- envval = HDgetenv("HDF5_DRIVER");
- if (envval == NULL)
- envval = "nomatch";
- if (HDstrcmp(envval, "core")) {
- TESTING("local heap read");
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error;
- if (NULL==(f=H5I_object(file))) {
- H5_FAILED();
- H5Eprint2(H5E_DEFAULT, stdout);
- goto error;
- }
- for (i=0; i<NOBJS; i++) {
- sprintf(buf, "%03d-", i);
- for (j=4; j<i; j++) buf[j] = '0' + j%10;
- if (j>4) buf[j] = '\0';
-
- if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC_READ))) {
- H5_FAILED();
- H5Eprint2(H5E_DEFAULT, stdout);
- goto error;
- }
-
- if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) {
- H5_FAILED();
- H5Eprint2(H5E_DEFAULT, stdout);
- goto error;
- }
-
- if (strcmp(s, buf)) {
- H5_FAILED();
- printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
- printf(" got: \"%s\"\n", s);
- printf(" ans: \"%s\"\n", buf);
- goto error;
- }
-
- if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
- H5_FAILED();
- H5Eprint2(H5E_DEFAULT, stdout);
- goto error;
- }
- }
-
- if (H5Fclose(file)<0) goto error;
- PASSED();
- puts("All local heap tests passed.");
- h5_cleanup(FILENAME, fapl);
+ TESTING("local heap read");
+ h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
+ if ((file=H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) goto error;
+ if (NULL==(f=H5I_object(file))) {
+ H5_FAILED();
+ H5Eprint2(H5E_DEFAULT, stdout);
+ goto error;
}
- else
- {
- SKIPPED();
- puts(" Test not compatible with current Virtual File Driver");
+ for (i=0; i<NOBJS; i++) {
+ sprintf(buf, "%03d-", i);
+ for (j=4; j<i; j++) buf[j] = '0' + j%10;
+ if (j>4) buf[j] = '\0';
+
+ if (NULL == (heap = H5HL_protect(f, H5P_DATASET_XFER_DEFAULT, heap_addr, H5AC_READ))) {
+ H5_FAILED();
+ H5Eprint2(H5E_DEFAULT, stdout);
+ goto error;
+ }
+
+ if (NULL == (s = H5HL_offset_into(f, heap, obj[i]))) {
+ H5_FAILED();
+ H5Eprint2(H5E_DEFAULT, stdout);
+ goto error;
+ }
+
+ if (strcmp(s, buf)) {
+ H5_FAILED();
+ printf(" i=%d, heap offset=%lu\n", i, (unsigned long)(obj[i]));
+ printf(" got: \"%s\"\n", s);
+ printf(" ans: \"%s\"\n", buf);
+ goto error;
+ }
+
+ if (H5HL_unprotect(f, H5P_DATASET_XFER_DEFAULT, heap, heap_addr) < 0) {
+ H5_FAILED();
+ H5Eprint2(H5E_DEFAULT, stdout);
+ goto error;
+ }
}
+ if (H5Fclose(file)<0) goto error;
+ PASSED();
+ puts("All local heap tests passed.");
+ h5_cleanup(FILENAME, fapl);
+
return 0;
error:
diff --git a/test/mount.c b/test/mount.c
index 372031e..6a8dc1e 100644
--- a/test/mount.c
+++ b/test/mount.c
@@ -3829,7 +3829,7 @@ main(void)
envval = HDgetenv("HDF5_DRIVER");
if (envval == NULL)
envval = "nomatch";
- if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")) {
+ if (HDstrcmp(envval, "split") && HDstrcmp(envval, "multi")) {
h5_reset();
fapl = h5_fileaccess();
if (setup(fapl)<0) goto error;
diff --git a/test/mtime.c b/test/mtime.c
index 006e76b..a61bffa 100644
--- a/test/mtime.c
+++ b/test/mtime.c
@@ -66,77 +66,64 @@ main(void)
H5G_stat_t sb1, sb2;
signed char buf1[32], buf2[32];
char filename[1024];
- const char *envval = NULL;
+
h5_reset();
fapl = h5_fileaccess();
TESTING("modification time messages");
- envval = HDgetenv("HDF5_DRIVER");
- if (envval == NULL)
- envval = "nomatch";
- if (HDstrcmp(envval, "core")) {
- /* Create the file, create a dataset, then close the file */
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
- TEST_ERROR;
- if ((space=H5Screate_simple(1, size, NULL))<0) TEST_ERROR;
- if ((dset=H5Dcreate(file, "dset", H5T_NATIVE_SCHAR, space, H5P_DEFAULT))<0)
- TEST_ERROR;
- now = time(NULL);
- if (H5Dclose(dset)<0) TEST_ERROR;
- if (H5Sclose(space)<0) TEST_ERROR;
- if (H5Fclose(file)<0) TEST_ERROR;
-
- /*
- * Open the file and get the modification time. We'll test the new
- * H5Gget_objinfo() arguments too: being able to stat something without
- * knowing its name.
- */
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) TEST_ERROR;
- if (H5Gget_objinfo(file, "dset", TRUE, &sb1)<0) TEST_ERROR;
- if ((dset=H5Dopen(file, "dset"))<0) TEST_ERROR;
- if (H5Gget_objinfo(dset, ".", TRUE, &sb2)<0) TEST_ERROR;
- if (H5Dclose(dset)<0) TEST_ERROR;
- if (H5Fclose(file)<0) TEST_ERROR;
-
- /* Compare times from the two ways of calling H5Gget_objinfo() */
- if (HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno)) || sb1.mtime!=sb2.mtime) {
- H5_FAILED();
- puts(" Calling H5Gget_objinfo() with the dataset ID returned");
- puts(" different values than calling it with a file and dataset");
- puts(" name.");
- goto error;
- }
-
- /* Compare times -- they must be within 60 seconds of one another */
- if (0==sb1.mtime) {
- SKIPPED();
- puts(" The modification time could not be decoded on this OS.");
- puts(" Modification times will be mantained in the file but");
- puts(" cannot be queried on this system. See H5O_mtime_decode().");
- return 0;
- } else if (fabs(HDdifftime(now, sb1.mtime))>60.0) {
- H5_FAILED();
- tm = localtime(&(sb1.mtime));
- strftime((char*)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
- tm = localtime(&now);
- strftime((char*)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
- printf(" got: %s\n ans: %s\n", buf1, buf2);
- goto error;
- }
- PASSED();
+
+ /* Create the file, create a dataset, then close the file */
+ h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
+ if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl))<0)
+ TEST_ERROR;
+ if ((space=H5Screate_simple(1, size, NULL))<0) TEST_ERROR;
+ if ((dset=H5Dcreate(file, "dset", H5T_NATIVE_SCHAR, space, H5P_DEFAULT))<0)
+ TEST_ERROR;
+ now = time(NULL);
+ if (H5Dclose(dset)<0) TEST_ERROR;
+ if (H5Sclose(space)<0) TEST_ERROR;
+ if (H5Fclose(file)<0) TEST_ERROR;
+
+ /*
+ * Open the file and get the modification time. We'll test the new
+ * H5Gget_objinfo() arguments too: being able to stat something without
+ * knowing its name.
+ */
+ h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
+ if ((file = H5Fopen(filename, H5F_ACC_RDONLY, fapl))<0) TEST_ERROR;
+ if (H5Gget_objinfo(file, "dset", TRUE, &sb1)<0) TEST_ERROR;
+ if ((dset=H5Dopen(file, "dset"))<0) TEST_ERROR;
+ if (H5Gget_objinfo(dset, ".", TRUE, &sb2)<0) TEST_ERROR;
+ if (H5Dclose(dset)<0) TEST_ERROR;
+ if (H5Fclose(file)<0) TEST_ERROR;
+
+ /* Compare times from the two ways of calling H5Gget_objinfo() */
+ if (HDmemcmp(&sb1.objno, &sb2.objno, sizeof(sb1.objno)) || sb1.mtime!=sb2.mtime) {
+ H5_FAILED();
+ puts(" Calling H5Gget_objinfo() with the dataset ID returned");
+ puts(" different values than calling it with a file and dataset");
+ puts(" name.");
+ goto error;
}
- else
- {
+
+ /* Compare times -- they must be within 60 seconds of one another */
+ if (0==sb1.mtime) {
SKIPPED();
- puts(" Test not compatible with current Virtual File Driver");
+ puts(" The modification time could not be decoded on this OS.");
+ puts(" Modification times will be mantained in the file but");
+ puts(" cannot be queried on this system. See H5O_mtime_decode().");
+ return 0;
+ } else if (fabs(HDdifftime(now, sb1.mtime))>60.0) {
+ H5_FAILED();
+ tm = localtime(&(sb1.mtime));
+ strftime((char*)buf1, sizeof buf1, "%Y-%m-%d %H:%M:%S", tm);
+ tm = localtime(&now);
+ strftime((char*)buf2, sizeof buf2, "%Y-%m-%d %H:%M:%S", tm);
+ printf(" got: %s\n ans: %s\n", buf1, buf2);
+ goto error;
}
-
-
-
/* Check opening existing file with old-style modification time information
* and make certain that the time is correct
*/
diff --git a/test/objcopy.c b/test/objcopy.c
index 7d2540c..df4c912 100755
--- a/test/objcopy.c
+++ b/test/objcopy.c
@@ -7185,7 +7185,7 @@ main(void)
if(envval == NULL)
envval = "nomatch";
- if(HDstrcmp(envval, "stdio") && HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
+ if(HDstrcmp(envval, "stdio") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
int nerrors = 0;
hid_t fapl, fapl2;
hid_t fcpl_shared;
diff --git a/test/ohdr.c b/test/ohdr.c
index d4b6ea4..a1d84a7 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -172,17 +172,27 @@ main(void)
* between 1-byte chunk #0 size encoding and 2-byte chunk #0 size encoding
* works correctly - QAK)
*/
- if(H5O_close(&oh_loc) < 0)
- FAIL_STACK_ERROR
- if(H5Fclose(file) < 0)
- FAIL_STACK_ERROR
- if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
- FAIL_STACK_ERROR
- if(NULL == (f = H5I_object(file)))
- FAIL_STACK_ERROR
- oh_loc.file = f;
- if(H5O_open(&oh_loc) < 0)
- FAIL_STACK_ERROR
+ TESTING("close & re-open object header");
+ envval = HDgetenv("HDF5_DRIVER");
+ if(envval == NULL)
+ envval = "nomatch";
+ if(HDstrcmp(envval, "multi") && HDstrcmp(envval, "split") && HDstrcmp(envval, "family")) {
+ if(H5O_close(&oh_loc) < 0)
+ FAIL_STACK_ERROR
+ if(H5Fclose(file) < 0)
+ FAIL_STACK_ERROR
+ if((file = H5Fopen(filename, H5F_ACC_RDWR, fapl)) < 0)
+ FAIL_STACK_ERROR
+ if(NULL == (f = H5I_object(file)))
+ FAIL_STACK_ERROR
+ oh_loc.file = f;
+ if(H5O_open(&oh_loc) < 0)
+ FAIL_STACK_ERROR
+ } /* end if */
+ else {
+ SKIPPED();
+ puts(" Test not compatible with current Virtual File Driver");
+ } /* end else */
/*
* Test creation of a bunch of messages one after another to see
@@ -221,11 +231,11 @@ main(void)
/* Test reading datasets with undefined object header messages */
- puts("Reading objects with unknown header messages");
+ TESTING("reading objects with unknown header messages");
envval = HDgetenv("HDF5_DRIVER");
if(envval == NULL)
envval = "nomatch";
- if(HDstrcmp(envval, "core") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "split") && HDstrcmp(envval, "family")) {
+ if(HDstrcmp(envval, "multi") && HDstrcmp(envval, "split") && HDstrcmp(envval, "family")) {
hid_t file2; /* File ID for 'bogus' object file */
char testpath[512] = "";
char testfile[512] = "";
diff --git a/test/reserved.c b/test/reserved.c
index 58b5a87..d7b7299 100755
--- a/test/reserved.c
+++ b/test/reserved.c
@@ -437,6 +437,7 @@ main(void)
envval = HDgetenv("HDF5_DRIVER");
if (envval == NULL)
envval = "nomatch";
+/* QAK: should be able to use the core driver? */
if (HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
num_errs+=rsrv_ohdr();
num_errs+=rsrv_heap();
diff --git a/test/stab.c b/test/stab.c
index f8ede62..1638982 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -1070,7 +1070,7 @@ main(void)
envval = HDgetenv("HDF5_DRIVER");
if(envval == NULL)
envval = "nomatch";
- if(HDstrcmp(envval, "core") && HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
+ if(HDstrcmp(envval, "split") && HDstrcmp(envval, "multi") && HDstrcmp(envval, "family")) {
hid_t fapl, fapl2; /* File access property list IDs */
int nerrors = 0;