summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorQuincey Koziol <koziol@hdfgroup.org>2007-10-18 17:47:43 (GMT)
committerQuincey Koziol <koziol@hdfgroup.org>2007-10-18 17:47:43 (GMT)
commit8d0b1acf685d91aa91e23e1a0d307384175a98db (patch)
treefabef614bf77293373f362b9e5ed563228d1257a /test
parent873c1d3181e5b1c408c093707645cb1e7e566b72 (diff)
downloadhdf5-8d0b1acf685d91aa91e23e1a0d307384175a98db.zip
hdf5-8d0b1acf685d91aa91e23e1a0d307384175a98db.tar.gz
hdf5-8d0b1acf685d91aa91e23e1a0d307384175a98db.tar.bz2
[svn-r14210] Description:
Enable the backward compatibility file format test for the family VFD in all situations. Tested on: FreeBSD/32 6.2 (duty) in debug mode FreeBSD/64 6.2 (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/default API=1.6.x, w/C++ & FORTRAN, in production mode Linux/64-ia64 2.6 (cobalt) w/Intel compilers, w/C++ & FORTRAN, in production mode Solaris/32 2.10 (linew) w/deprecated symbols disabled, w/C++ & FORTRAN, w/szip filter, in production mode Mac OS X/32 10.4.10 (amazon) in debug mode
Diffstat (limited to 'test')
-rw-r--r--test/vfd.c72
1 files changed, 25 insertions, 47 deletions
diff --git a/test/vfd.c b/test/vfd.c
index 4ae4fc1..3250828 100644
--- a/test/vfd.c
+++ b/test/vfd.c
@@ -57,9 +57,8 @@ const char *FILENAME[] = {
*
* Purpose: Tests the file handle interface for SEC2 driver
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: Success: 0
+ * Failure: -1
*
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
@@ -135,15 +134,12 @@ error:
*
* Purpose: Tests the file handle interface for DIRECT I/O driver
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: Success: 0
+ * Failure: -1
*
* Programmer: Raymond Lu
* Wednesday, 20 September 2006
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
static herr_t
@@ -342,9 +338,8 @@ error:
*
* Purpose: Tests the file handle interface for CORE driver
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: Success: 0
+ * Failure: -1
*
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
@@ -557,14 +552,12 @@ error:
* Purpose: Private function for test_family() to tests wrong ways of
* reopening family file.
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: Success: 0
+ * Failure: -1
*
* Programmer: Raymond Lu
* Thursday, May 19, 2005
*
- * Modifications:
*-------------------------------------------------------------------------
*/
static herr_t
@@ -626,9 +619,8 @@ error:
*
* Purpose: Tests the file handle interface for FAMILY driver
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: Success: 0
+ * Failure: -1
*
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
@@ -797,33 +789,24 @@ error:
* used to concantenated. The command was "h5repart -m 5k
* family_file%05d.h5 family_v1.6_%05d.h5".
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: Success: 0
+ * Failure: -1
*
* Programmer: Raymond Lu
* June 3, 2005
*
- * Modifications:
*-------------------------------------------------------------------------
*/
static herr_t
test_family_compat(void)
{
-#ifdef H5_WANT_H5_V1_6_COMPAT
- hid_t file=(-1), fapl;
+ hid_t file = (-1), fapl;
char filename[1024];
char pathname[1024];
char *srcdir = getenv("srcdir"); /*where the src code is located*/
-#endif /*H5_WANT_H5_V1_6_COMPAT*/
TESTING("FAMILY file driver backward compatibility");
-#ifndef H5_WANT_H5_V1_6_COMPAT
- SKIPPED();
- return 0;
-#else /*H5_WANT_H5_V1_6_COMPAT*/
-
/* Set property list and file name for FAMILY driver */
fapl = h5_fileaccess();
@@ -834,13 +817,13 @@ test_family_compat(void)
pathname[0] = '\0';
/* Generate correct name for test file by prepending the source path */
- if(srcdir && ((strlen(srcdir) + strlen(filename) + 1) < sizeof(pathname))) {
- strcpy(pathname, srcdir);
- strcat(pathname, "/");
+ if(srcdir && ((HDstrlen(srcdir) + HDstrlen(filename) + 1) < sizeof(pathname))) {
+ HDstrcpy(pathname, srcdir);
+ HDstrcat(pathname, "/");
}
- strcat(pathname, filename);
+ HDstrcat(pathname, filename);
- if((file=H5Fopen(pathname, H5F_ACC_RDONLY, fapl)) < 0)
+ if((file = H5Fopen(pathname, H5F_ACC_RDONLY, fapl)) < 0)
TEST_ERROR;
if(H5Fclose(file) < 0)
@@ -850,15 +833,16 @@ test_family_compat(void)
TEST_ERROR;
PASSED();
+
return 0;
error:
H5E_BEGIN_TRY {
H5Fclose(file);
} H5E_END_TRY;
+
return -1;
-#endif /*H5_WANT_H5_V1_6_COMPAT*/
-}
+} /* end test_family_compat() */
/*-------------------------------------------------------------------------
@@ -867,14 +851,12 @@ error:
* Purpose: Private function for test_multi() to tests wrong ways of
* reopening multi file.
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: Success: 0
+ * Failure: 1
*
* Programmer: Raymond Lu
* Thursday, May 19, 2005
*
- * Modifications:
*-------------------------------------------------------------------------
*/
static herr_t
@@ -901,9 +883,8 @@ test_multi_opens(char *fname)
*
* Purpose: Tests the file handle interface for MUTLI driver
*
- * Return: Success: exit(0)
- *
- * Failure: exit(1)
+ * Return: Success: 0
+ * Failure: -1
*
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
@@ -1114,14 +1095,11 @@ error:
* Purpose: Tests the basic features of Virtual File Drivers
*
* Return: Success: exit(0)
- *
* Failure: exit(1)
*
* Programmer: Raymond Lu
* Tuesday, Sept 24, 2002
*
- * Modifications:
- *
*-------------------------------------------------------------------------
*/
int