From 96a96fafaab1ca15bec0bcc447aee8c658ce6944 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Mon, 18 Apr 2011 16:24:29 -0500 Subject: [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. --- test/vfd.c | 14 +++----------- 1 file changed, 3 insertions(+), 11 deletions(-) diff --git a/test/vfd.c b/test/vfd.c index e9042d7..a518f8a 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -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 */ -- cgit v0.12