diff options
author | Dana Robinson <derobins@hdfgroup.org> | 2011-04-18 21:24:29 (GMT) |
---|---|---|
committer | Dana Robinson <derobins@hdfgroup.org> | 2011-04-18 21:24:29 (GMT) |
commit | 96a96fafaab1ca15bec0bcc447aee8c658ce6944 (patch) | |
tree | b228ec2257c20c9fa8891f49f9cc815791ee928d | |
parent | a7c7fbfdf98d13c8ccbdd3be472270a1ae5c4cb2 (diff) | |
download | hdf5-96a96fafaab1ca15bec0bcc447aee8c658ce6944.zip hdf5-96a96fafaab1ca15bec0bcc447aee8c658ce6944.tar.gz hdf5-96a96fafaab1ca15bec0bcc447aee8c658ce6944.tar.bz2 |
[svn-r20548] Fixed bug in test/vfd.c (HDFFV-5936) that caused STDIO VFD test to fail on some platforms.
The problem was that the test was a clone of the SEC2 test. The SEC2 test accepts a file descriptor (int) via a void pointer from H5Fget_vfd_handle() whereas the STDIO test needs to accept a FILE pointer. Storing the FILE pointer in an integer failed on some systems. The STDIO test now stores the file handle in FILE pointer and checks it for NULL instead of < 0.
-rw-r--r-- | test/vfd.c | 14 |
1 files changed, 3 insertions, 11 deletions
@@ -1223,19 +1223,11 @@ test_stdio(void) hid_t fapl = -1; hid_t access_fapl = -1; char filename[1024]; - int *fhandle = NULL; + FILE **fhandle = NULL; hsize_t file_size = 0; - // The STDIO file driver fails on 64-bit Solaris (SPARC) and - // 32-bit Darwin (Intel) for unknown reasons. This test - // will be disabled while we investigate. + TESTING("STDIO file driver"); - SKIPPED(); - printf("\t** NOTE **: The STDIO file driver fails on some systems\n"); - printf("\t(64-bit Solaris(SPARC) and 32-bit Darwin(intel)).\n"); - printf("\tThe STDIO VFD test has been disabled while we investigate.\n"); - fflush(stdout); - return 0; /* Set property list and file name for STDIO driver. */ fapl = h5_fileaccess(); @@ -1261,7 +1253,7 @@ test_stdio(void) /* Check file handle API */ if(H5Fget_vfd_handle(file, H5P_DEFAULT, (void **)&fhandle) < 0) TEST_ERROR; - if(*fhandle < 0) + if(NULL == *fhandle) TEST_ERROR; /* Check file size API */ |