diff options
author | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-15 01:46:34 (GMT) |
---|---|---|
committer | Quincey Koziol <koziol@hdfgroup.org> | 2008-10-15 01:46:34 (GMT) |
commit | 0e51a4244e8de0402fe9d329d6ad3cc1e9d20418 (patch) | |
tree | 12fe8ea3e734869c51d57efd98fa7c986a3dcb71 /test/ohdr.c | |
parent | bea2e1790d2a708f9f0c794254f9e869f77f0f88 (diff) | |
download | hdf5-0e51a4244e8de0402fe9d329d6ad3cc1e9d20418.zip hdf5-0e51a4244e8de0402fe9d329d6ad3cc1e9d20418.tar.gz hdf5-0e51a4244e8de0402fe9d329d6ad3cc1e9d20418.tar.bz2 |
[svn-r15868] Description:
Correct a minor error in file free space allocation which was affecting
the 'multi' VFD and preventing some tests from fully working with it.
Wholesale revisitation of all the places where tests were disabled
with various VFDs and remove or correct all these so that _only_ the tests
which _really_ can't work with particular VFDs are skipped during a
'make check-vfd' test.
Tested on:
Mac OS X/32 10.5.5 (amazon) in debug mode
Mac OS X/32 10.5.5 (amazon) w/C++ & FORTRAN, w/threadsafe,
in production mode
FreeBSD/32 6.3 (duty) in debug mode
FreeBSD/64 6.3 (liberty) w/C++ & FORTRAN, in debug mode
Linux/32 2.6 (kagiso) w/PGI compilers, w/C++ & FORTRAN, w/threadsafe,
in debug mode
Linux/64-amd64 2.6 (smirom) w/Intel compilers w/default API=1.6.x,
w/C++ & FORTRAN, in production mode
Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN,
w/szip filter, in production mode
Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN,
in production mode
Linux/64-ia64 2.4 (tg-login3) w/parallel, w/FORTRAN, in production mode
Linux/64-amd64 2.6 (abe) w/parallel, w/FORTRAN, in production mode
Diffstat (limited to 'test/ohdr.c')
-rw-r--r-- | test/ohdr.c | 49 |
1 files changed, 16 insertions, 33 deletions
diff --git a/test/ohdr.c b/test/ohdr.c index 5d6542d..2d4f057 100644 --- a/test/ohdr.c +++ b/test/ohdr.c @@ -72,7 +72,6 @@ main(void) time_t time_new, ro; int i; hbool_t b; /* Index for "new format" loop */ - const char *envval = NULL; herr_t ret; /* Generic return value */ /* Reset library */ @@ -93,7 +92,7 @@ main(void) /* Create the file to operate on */ if((file = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0) TEST_ERROR - if(NULL == (f = H5I_object(file))) FAIL_STACK_ERROR + if(NULL == (f = (H5F_t *)H5I_object(file))) FAIL_STACK_ERROR /* @@ -174,27 +173,18 @@ main(void) * works correctly - QAK) */ 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 - PASSED(); - } /* end if */ - else { - SKIPPED(); - puts(" Test not compatible with current Virtual File Driver"); - } /* end else */ + 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 = (H5F_t *)H5I_object(file))) + FAIL_STACK_ERROR + oh_loc.file = f; + if(H5O_open(&oh_loc) < 0) + FAIL_STACK_ERROR + PASSED(); /* * Test creation of a bunch of messages one after another to see @@ -259,10 +249,7 @@ main(void) /* Test reading datasets with undefined object header messages */ HDputs("Accessing objects with unknown header messages:"); - envval = HDgetenv("HDF5_DRIVER"); - if(envval == NULL) - envval = "nomatch"; - 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] = ""; @@ -282,7 +269,7 @@ main(void) TESTING("object with unknown header message and no flags set"); /* Open the file with objects that have unknown header messages (generated with gen_bogus.c) */ - if((file2 = H5Fopen(testfile, H5F_ACC_RDONLY, fapl)) < 0) + if((file2 = H5Fopen(testfile, H5F_ACC_RDONLY, H5P_DEFAULT)) < 0) TEST_ERROR /* Open the dataset with the unknown header message, but no extra flags */ @@ -372,11 +359,7 @@ main(void) TEST_ERROR PASSED(); - } /* end if */ - else { - SKIPPED(); - puts(" Test not compatible with current Virtual File Driver"); - } /* end else */ + } /* Close the file we created */ if(H5Fclose(file) < 0) |