summaryrefslogtreecommitdiffstats
path: root/test/stab.c
diff options
context:
space:
mode:
authorJames Laird <jlaird@hdfgroup.org>2006-07-31 19:46:16 (GMT)
committerJames Laird <jlaird@hdfgroup.org>2006-07-31 19:46:16 (GMT)
commitbeb04ae817268a49656b5abe043627dcbba15e5d (patch)
tree557b0c0908867dbb7185c3954626b2a2da3bcaf4 /test/stab.c
parent70b46a1d89e7f9f4a82748a9e1cc21fb4f121ebe (diff)
downloadhdf5-beb04ae817268a49656b5abe043627dcbba15e5d.zip
hdf5-beb04ae817268a49656b5abe043627dcbba15e5d.tar.gz
hdf5-beb04ae817268a49656b5abe043627dcbba15e5d.tar.bz2
[svn-r12519] Fixed "make check-vfd"
"make check-vfd" will now run all tests in the test directory with different file drivers (at least, all of those tests that use the testing framework's FAPL). Tests that fail will be skipped. This is not a perfect fix, but is better than nothing. Along with this change, check-vfd should be added to the Daily Tests.
Diffstat (limited to 'test/stab.c')
-rw-r--r--test/stab.c94
1 files changed, 50 insertions, 44 deletions
diff --git a/test/stab.c b/test/stab.c
index 7c2f719..164c8f8 100644
--- a/test/stab.c
+++ b/test/stab.c
@@ -329,8 +329,7 @@ lifecycle(hid_t fapl)
if(H5Pset_est_link_info(gcpl, LIFECYCLE_EST_NUM_ENTRIES, LIFECYCLE_EST_NAME_LEN) < 0) TEST_ERROR;
/* Create group for testing lifecycle */
- if((gid = H5Gcreate_expand(fid, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR
- if((H5Llink(fid, LIFECYCLE_TOP_GROUP, gid, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((gid = H5Gcreate_expand(fid, LIFECYCLE_TOP_GROUP, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR
/* Query group creation property settings */
if(H5Pget_local_heap_size_hint(gcpl, &lheap_size_hint) < 0) TEST_ERROR;
@@ -788,8 +787,7 @@ no_compact(hid_t fapl)
if(est_name_len != H5G_CRT_GINFO_EST_NAME_LEN) TEST_ERROR;
/* Create group for testing lifecycle */
- if((gid = H5Gcreate_expand(fid, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR
- if((H5Llink(fid, NO_COMPACT_TOP_GROUP, gid, H5P_DEFAULT)) < 0) TEST_ERROR
+ if((gid = H5Gcreate_expand(fid, NO_COMPACT_TOP_GROUP, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR
/* Close GCPL */
if(H5Pclose(gcpl) < 0) TEST_ERROR;
@@ -875,7 +873,6 @@ gcpl_on_root(hid_t fapl)
hid_t gid2 = (-1); /* Datatype ID */
hid_t fcpl = (-1); /* File creation property list ID */
hid_t gcpl = (-1); /* Group creation property list ID */
- hid_t lcpl = (-1); /* Link creation property list ID */
unsigned max_compact; /* Maximum # of links to store in group compactly */
unsigned min_dense; /* Minimum # of links to store in group "densely" */
char filename[NAME_BUF_SIZE];
@@ -915,15 +912,14 @@ gcpl_on_root(hid_t fapl)
if(H5Pclose(gcpl) < 0) TEST_ERROR;
/* Create a group creation property list, with intermediate group creation set */
- if((lcpl = H5Pcreate(H5P_LINK_CREATE)) < 0) TEST_ERROR;
- if(H5Pset_create_intermediate_group(lcpl, TRUE) < 0) TEST_ERROR
+ if((gcpl = H5Pcreate(H5P_GROUP_CREATE)) < 0) TEST_ERROR;
+ if(H5Pset_create_intermediate_group(gcpl, TRUE) < 0) TEST_ERROR
/* Create a group and intermediate groups, to check if root group settings are inherited */
- if((gid2 = H5Gcreate_expand(gid, H5P_DEFAULT, H5P_DEFAULT)) < 0) TEST_ERROR
- if((H5Llink(gid, GCPL_ON_ROOT_BOTTOM_GROUP, gid2, lcpl)) < 0) TEST_ERROR
+ if((gid2 = H5Gcreate_expand(gid, GCPL_ON_ROOT_BOTTOM_GROUP, gcpl, H5P_DEFAULT)) < 0) TEST_ERROR
- /* Close LCPL */
- if(H5Pclose(lcpl) < 0) TEST_ERROR;
+ /* Close GCPL */
+ if(H5Pclose(gcpl) < 0) TEST_ERROR;
/* Query the group creation properties */
if((gcpl = H5Gget_create_plist(gid2)) < 0) TEST_ERROR;
@@ -997,47 +993,57 @@ main(void)
hid_t fapl, fcpl, file;
int nerrors=0;
char filename[1024];
-
- /* Reset library */
- h5_reset();
- fapl = h5_fileaccess();
-
- /*
- * Use larger symbol table data structures to be more efficient, use
- * defaults to bang harder on the library for testing.
- */
- fcpl = H5Pcreate(H5P_FILE_CREATE);
+ const char *envval = NULL;
+
+ /* Don't run this test using the split file driver */
+ envval = HDgetenv("HDF5_DRIVER");
+ if (envval == NULL)
+ envval = "nomatch";
+ if (HDstrcmp(envval, "split")) {
+ /* Reset library */
+ h5_reset();
+ fapl = h5_fileaccess();
+
+ /*
+ * Use larger symbol table data structures to be more efficient, use
+ * defaults to bang harder on the library for testing.
+ */
+ fcpl = H5Pcreate(H5P_FILE_CREATE);
#if 0
- H5Pset_sym_k(fcpl, 16, 16);
+ H5Pset_sym_k(fcpl, 16, 16);
#endif
- /* Open the file */
- h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
- if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0)
- goto error;
+ /* Open the file */
+ h5_fixname(FILENAME[0], fapl, filename, sizeof filename);
+ if ((file=H5Fcreate(filename, H5F_ACC_TRUNC, fcpl, fapl))<0)
+ goto error;
- /* Perform tests */
- nerrors += test_misc(file);
- nerrors += test_long(file);
- nerrors += test_large(file);
+ /* Perform tests */
+ nerrors += test_misc(file);
+ nerrors += test_long(file);
+ nerrors += test_large(file);
#ifdef H5_GROUP_REVISION
- nerrors += lifecycle(fapl);
- nerrors += long_compact(fapl);
- nerrors += read_old(fapl);
- nerrors += no_compact(fapl);
- nerrors += gcpl_on_root(fapl);
-
+ nerrors += lifecycle(fapl);
+ nerrors += long_compact(fapl);
+ nerrors += read_old(fapl);
+ nerrors += no_compact(fapl);
+ nerrors += gcpl_on_root(fapl);
#endif /* H5_GROUP_REVISION */
- if (nerrors) goto error;
+ if (nerrors) goto error;
- /* Cleanup */
- H5Fclose(file);
- puts("All symbol table tests passed.");
- h5_cleanup(FILENAME, fapl);
+ /* Cleanup */
+ H5Fclose(file);
+ puts("All symbol table tests passed.");
+ h5_cleanup(FILENAME, fapl);
+ }
+ else
+ {
+ puts("All symbol table tests skipped - Incompatible with current Virtual File Driver");
+ }
return 0;
- error:
- puts("*** TESTS FAILED ***");
- return 1;
+ error:
+ puts("*** TESTS FAILED ***");
+ return 1;
}