summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVailin Choi <vchoi@hdfgroup.org>2015-08-08 04:38:05 (GMT)
committerVailin Choi <vchoi@hdfgroup.org>2015-08-08 04:38:05 (GMT)
commit0908350a647fd7fd0b9cbc376297f055973ced23 (patch)
tree0655d3d03a9f694349658fad17e4cb932844c5bb
parent8fb670338e1672a621e53b681f382dc2ad3ca61d (diff)
downloadhdf5-0908350a647fd7fd0b9cbc376297f055973ced23.zip
hdf5-0908350a647fd7fd0b9cbc376297f055973ced23.tar.gz
hdf5-0908350a647fd7fd0b9cbc376297f055973ced23.tar.bz2
[svn-r27482] Fixes for revise_chunks daily test failures:
(1) test/swmr.c: test for H5_HAVE_FORK in test_file_lock_swmr_concur() as in test_file_lock_concur(). (2) test/cache_logging.c: (a) fix to catch proper return from the test (b) use h5_fixname() so check-vfd won't fail.
-rw-r--r--test/cache_logging.c11
-rw-r--r--test/ohdr.c4
-rw-r--r--test/swmr.c7
3 files changed, 15 insertions, 7 deletions
diff --git a/test/cache_logging.c b/test/cache_logging.c
index 5334fbd..fa2a752 100644
--- a/test/cache_logging.c
+++ b/test/cache_logging.c
@@ -18,7 +18,7 @@
#include "h5test.h"
#define LOG_LOCATION "cache_logging.log"
-#define FILE_NAME "cache_logging.h5"
+#define FILE_NAME "cache_logging"
#define N_GROUPS 100
@@ -46,11 +46,13 @@ test_logging_api(void)
hid_t gid;
hbool_t is_currently_logging;
char group_name[8];
+ char filename[1024];
int i;
TESTING("metadata cache log api calls");
fapl = h5_fileaccess();
+ h5_fixname(FILE_NAME, fapl, filename, sizeof filename);
/* Set up metadata cache logging */
is_enabled = TRUE;
@@ -85,7 +87,7 @@ test_logging_api(void)
/* Create a file */
if(H5Pset_libver_bounds(fapl, H5F_LIBVER_LATEST, H5F_LIBVER_LATEST) < 0)
TEST_ERROR;
- if((fid = H5Fcreate(FILE_NAME, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
+ if((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl)) < 0)
TEST_ERROR;
if(H5Pclose(fapl) < 0)
TEST_ERROR;
@@ -140,8 +142,7 @@ test_logging_api(void)
error:
return 1;
- }
-
+ } /* test_logging_api() */
/*-------------------------------------------------------------------------
* Function: main
@@ -163,7 +164,7 @@ main(void)
printf("Testing basic metadata cache logging functionality.\n");
- nerrors += test_logging_api() < 0 ? 1 : 0;
+ nerrors += test_logging_api();
if(nerrors) {
printf("***** %d Metadata cache logging TEST%s FAILED! *****\n",
diff --git a/test/ohdr.c b/test/ohdr.c
index 1b07681..2730a51 100644
--- a/test/ohdr.c
+++ b/test/ohdr.c
@@ -909,12 +909,12 @@ main(void)
PASSED();
+ TESTING("object with unknown header message & 'fail if unknown and open for write' flag set");
+
/* Open the file with objects that have unknown header messages (generated with gen_bogus.c) with RW intent this time */
if((file2 = H5Fopen(testfile, H5F_ACC_RDWR, H5P_DEFAULT)) < 0)
TEST_ERROR
- TESTING("object with unknown header message & 'fail if unknown and open for write' flag set");
-
/* Attempt to open the dataset with the unknown header message, and "fail if unknown and open for write" flag */
H5E_BEGIN_TRY {
dset = H5Dopen2(file2, "/Dataset2", H5P_DEFAULT);
diff --git a/test/swmr.c b/test/swmr.c
index 61fabc2..98ed9ee 100644
--- a/test/swmr.c
+++ b/test/swmr.c
@@ -4099,6 +4099,7 @@ test_file_lock_concur(hid_t in_fapl)
SKIPPED();
HDputs(" Test skipped due to a lack of flock() on this system.");
+ return 0;
#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
@@ -4372,6 +4373,12 @@ test_file_lock_swmr_concur(hid_t in_fapl)
HDputs(" Test skipped due to fork or waitpid not defined.");
return 0;
+#elif !defined(H5_HAVE_FLOCK)
+
+ SKIPPED();
+ HDputs(" Test skipped due to a lack of flock() on this system.");
+ return 0;
+
#else /* defined(H5_HAVE_FORK && defined(H5_HAVE_WAITPID) */
if((fapl = H5Pcopy(in_fapl)) < 0)