summaryrefslogtreecommitdiffstats
path: root/test/getname.c
diff options
context:
space:
mode:
authorAlbert Cheng <acheng@hdfgroup.org>2006-12-14 14:34:39 (GMT)
committerAlbert Cheng <acheng@hdfgroup.org>2006-12-14 14:34:39 (GMT)
commit481cfbe0e958ba72623803884f4c69179724582f (patch)
tree58004fcb21117c0e1ed359a253ccbea8a1ab28ac /test/getname.c
parentd694a6897c3304decbe520692207df11bbdfe39e (diff)
downloadhdf5-481cfbe0e958ba72623803884f4c69179724582f.zip
hdf5-481cfbe0e958ba72623803884f4c69179724582f.tar.gz
hdf5-481cfbe0e958ba72623803884f4c69179724582f.tar.bz2
[svn-r13062]
Bug fix. Description: Test failed when core and multi VFD is used. SOlution: Failure was because the test file was created with the specified VFD access property but later reopened by default access. That won't work for VFDs such as multi that produced files that are incompatible with the default sec2 file driver. Fixed it by using the same VFD access property when it reopens the same test file. However, it still fails for the core VFD which does not create any real file. It is meaningless to try to reopen its file. Fixed it by adding core to the incompatible list of VFDs so that it would skip the test. Split is already coded as incompatible VFD but I don't understand why it is incompatible in this case. Removed it from the incompatible list. Tested Platforms: Copper in which the daily test failed.
Diffstat (limited to 'test/getname.c')
-rw-r--r--test/getname.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/test/getname.c b/test/getname.c
index ff8eebc..f367242 100644
--- a/test/getname.c
+++ b/test/getname.c
@@ -2667,7 +2667,7 @@ test_reg_ref(hid_t fapl)
/* Initialize the file name */
h5_fixname(FILENAME[1], fapl, filename1, sizeof filename1);
- /* Create file with default file access and file creation properties */
+ /* Create file with default file create property but vfd access property. */
if((file_id = H5Fcreate(filename1, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR
@@ -2727,7 +2727,7 @@ test_reg_ref(hid_t fapl)
/* Reopen the file to read selections back */
- if((file_id = H5Fopen(filename1, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
+ if((file_id = H5Fopen(filename1, H5F_ACC_RDWR, fapl)) < 0)
TEST_ERROR
/* Reopen the dataset with object references and read references to the buffer */
@@ -2795,7 +2795,11 @@ main(void)
envval = HDgetenv("HDF5_DRIVER");
if(envval == NULL)
envval = "nomatch";
- if(HDstrcmp(envval, "split")) {
+ /* 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];
@@ -2805,7 +2809,9 @@ main(void)
fapl = h5_fileaccess();
h5_fixname(FILENAME[0], fapl, filename0, sizeof filename0);
- /* Create a new file_id using default properties. */
+ /* 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 */
@@ -2822,8 +2828,6 @@ main(void)
h5_cleanup(FILENAME, fapl);
} /* end if */
- else
- puts("All getname tests skipped - Incompatible with current Virtual File Driver");
return 0;