summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2014-11-17 22:21:40 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2014-11-17 22:21:40 (GMT)
commitfc31e90ca50fa6792a838e4debbce8f3f6fb044a (patch)
tree3aa2a9e5fce3d751bf0ae0cb262d6ba5281c371c /test
parent44c62d3d0a549a6e63dc900d4aa251b5b764d14b (diff)
downloadhdf5-fc31e90ca50fa6792a838e4debbce8f3f6fb044a.zip
hdf5-fc31e90ca50fa6792a838e4debbce8f3f6fb044a.tar.gz
hdf5-fc31e90ca50fa6792a838e4debbce8f3f6fb044a.tar.bz2
[svn-r25819] Bring revisions #25440 - #25484 from trunk to revise_chunks.
h5committested. (Revision #25439 is skipped because it was backed out later on 11/3/2104.)
Diffstat (limited to 'test')
-rw-r--r--test/links.c1
-rw-r--r--test/testfiles/err_compat_15
-rw-r--r--test/testframe.c23
3 files changed, 15 insertions, 14 deletions
diff --git a/test/links.c b/test/links.c
index 34c5698..59d3651 100644
--- a/test/links.c
+++ b/test/links.c
@@ -6377,7 +6377,6 @@ external_link_strong(hid_t fapl, hbool_t new_format)
if(H5Gclose(gid2) < 0) TEST_ERROR
if(H5Fclose(fid2) < 0) TEST_ERROR
-
PASSED();
return 0;
diff --git a/test/testfiles/err_compat_1 b/test/testfiles/err_compat_1
index 3a85b86..d471e13 100644
--- a/test/testfiles/err_compat_1
+++ b/test/testfiles/err_compat_1
@@ -54,9 +54,6 @@ HDF5-DIAG: Error detected in HDF5 (version (number)) thread (IDs):
#001: (file name) line (number) in test_error2(): H5Dwrite shouldn't succeed
major: Error API
minor: Write failed
- #002: (file name) line (number) in H5Dwrite(): can't prepare for writing data
- major: Dataset
- minor: Write failed
- #003: (file name) line (number) in H5D__pre_write(): not a dataset
+ #002: (file name) line (number) in H5Dwrite(): not a dataset
major: Invalid arguments to routine
minor: Inappropriate type
diff --git a/test/testframe.c b/test/testframe.c
index af6e975..2dd181b 100644
--- a/test/testframe.c
+++ b/test/testframe.c
@@ -67,6 +67,8 @@ static int (*TestPrivateParser)(int ac, char *av[]) = NULL;
* TheDescr--Long description of the test.
* Parameters--pointer to extra parameters. Use NULL if none used.
* Since only the pointer is copied, the contents should not change.
+ * Return: Void
+ * exit EXIT_FAILURE if error is encountered.
*/
void
AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), const char *TheDescr, const void *Parameters)
@@ -75,17 +77,17 @@ AddTest(const char *TheName, void (*TheCall) (void), void (*Cleanup) (void), con
if (Index >= MAXNUMOFTESTS) {
printf("Too many tests added, increase MAXNUMOFTESTS(%d).\n",
MAXNUMOFTESTS);
- exit(-1);
+ exit(EXIT_FAILURE);
} /* end if */
if (HDstrlen(TheDescr) >= MAXTESTDESC) {
printf("Test description too long, increase MAXTESTDESC(%d).\n",
MAXTESTDESC);
- exit(-1);
+ exit(EXIT_FAILURE);
} /* end if */
if (HDstrlen(TheName) >= MAXTESTNAME) {
printf("Test name too long, increase MAXTESTNAME(%d).\n",
MAXTESTNAME);
- exit(-1);
+ exit(EXIT_FAILURE);
} /* end if */
/* Set up test function */
@@ -203,6 +205,9 @@ void TestInfo(const char *ProgName)
* Parse command line information.
* argc, argv: the usual command line argument count and strings
*
+ * Return: Void
+ * exit EXIT_FAILURE if error is encountered.
+ *
* Modification:
* 2004/08/18 Albert Cheng. Add extra_parse feature.
*/
@@ -218,7 +223,7 @@ void TestParseCmdLine(int argc, char *argv[])
ParseTestVerbosity(*argv);
}else{
TestUsage();
- exit(1);
+ exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-exclude") == 0) ||
@@ -228,7 +233,7 @@ void TestParseCmdLine(int argc, char *argv[])
SetTest(*argv, SKIPTEST);
}else{
TestUsage();
- exit(1);
+ exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-begin") == 0) ||
@@ -238,7 +243,7 @@ void TestParseCmdLine(int argc, char *argv[])
SetTest(*argv, BEGINTEST);
}else{
TestUsage();
- exit(1);
+ exit(EXIT_FAILURE);
}
}
else if (((HDstrcmp(*argv, "-only") == 0) ||
@@ -252,14 +257,14 @@ void TestParseCmdLine(int argc, char *argv[])
SetTest(*argv, ONLYTEST);
}else{
TestUsage();
- exit(1);
+ exit(EXIT_FAILURE);
}
}
else if ((HDstrcmp(*argv, "-summary") == 0) || (HDstrcmp(*argv, "-s") == 0))
Summary = 1;
else if ((HDstrcmp(*argv, "-help") == 0) || (HDstrcmp(*argv, "-h") == 0)) {
TestUsage();
- exit(0);
+ exit(EXIT_SUCCESS);
}
else if ((HDstrcmp(*argv, "-cleanoff") == 0) || (HDstrcmp(*argv, "-c") == 0))
SetTestNoCleanup();
@@ -274,7 +279,7 @@ void TestParseCmdLine(int argc, char *argv[])
if (NULL != TestPrivateParser){
ret_code=TestPrivateParser(argc+1, argv-1);
if (ret_code != 0)
- exit(-1);
+ exit(EXIT_FAILURE);
}
}