summaryrefslogtreecommitdiffstats
path: root/test/hdfs.c
diff options
context:
space:
mode:
authorDana Robinson <43805+derobins@users.noreply.github.com>2020-11-17 13:47:52 (GMT)
committerGitHub <noreply@github.com>2020-11-17 13:47:52 (GMT)
commit5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f (patch)
treedbe8a76bcb211babe9900647eb1f515d8623ad9b /test/hdfs.c
parentec48fb8dfdb4f2f59f22a5efb6b950aafcac449d (diff)
downloadhdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.zip
hdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.tar.gz
hdf5-5d0be1b196570ac2c08ffe0b61ac6a45b6ab7f3f.tar.bz2
Manual sync with develop (#95)
Brings all features from develop. Note that RELEASE.txt has not been updated (will be done in a future PR).
Diffstat (limited to 'test/hdfs.c')
-rw-r--r--test/hdfs.c52
1 files changed, 26 insertions, 26 deletions
diff --git a/test/hdfs.c b/test/hdfs.c
index ee66314..a59cdb6 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -303,7 +303,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(expected, actual, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -348,7 +348,7 @@
*----------------------------------------------------------------------------
*/
#define JSVERIFY_STR(actual, expected, reason) \
- if (strcmp((actual), (expected)) != 0) { \
+ if (HDstrcmp((actual), (expected)) != 0) { \
JSERR_STR((expected), (actual), (reason)); \
goto error; \
} /* JSVERIFY_STR */
@@ -414,8 +414,8 @@ test_fapl_config_validation(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS fapl configuration validation");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -564,9 +564,9 @@ test_fapl_config_validation(void)
JSVERIFY(config.version, fa_fetch.version, "version number mismatch")
JSVERIFY(config.namenode_port, fa_fetch.namenode_port, "namenode port mismatch")
JSVERIFY(config.stream_buffer_size, fa_fetch.stream_buffer_size, "streambuffer size mismatch")
- JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, NULL)
- JSVERIFY_STR(config.user_name, fa_fetch.user_name, NULL)
- JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, NULL)
+ JSVERIFY_STR(config.namenode_name, fa_fetch.namenode_name, "node name mismatch")
+ JSVERIFY_STR(config.user_name, fa_fetch.user_name, "user name mismatch")
+ JSVERIFY_STR(config.kerberos_ticket_cache, fa_fetch.kerberos_ticket_cache, "kerberos ticket cache mismatch")
}
/*-----------------------------
@@ -620,8 +620,8 @@ test_hdfs_fapl(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS fapl ");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -703,8 +703,8 @@ test_vfd_open(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD-level open");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -956,8 +956,8 @@ test_eof_eoa(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS eof/eoa gets and sets");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -996,7 +996,7 @@ test_eof_eoa(void)
/* verify as found
*/
- JSVERIFY(5458199, H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), NULL)
+ JSVERIFY(5458199, H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), "EOF mismatch")
JSVERIFY(H5FDget_eof(fd_shakespeare, H5FD_MEM_DEFAULT), H5FDget_eof(fd_shakespeare, H5FD_MEM_DRAW),
"mismatch between DEFAULT and RAW memory types")
JSVERIFY(0, H5FDget_eoa(fd_shakespeare, H5FD_MEM_DEFAULT), "EoA should be unset by H5FDopen")
@@ -1066,8 +1066,8 @@ test_H5FDread_without_eoa_set_fails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read-eoa temporal coupling library limitation");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -1165,8 +1165,8 @@ test_read(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD read/range-gets");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -1272,7 +1272,7 @@ test_read(void)
HADDR_UNDEF); /* Demonstrate success with "automatic" value */
FAIL_IF(NULL == file_raven)
- JSVERIFY(6464, H5FDget_eof(file_raven, H5FD_MEM_DEFAULT), NULL)
+ JSVERIFY(6464, H5FDget_eof(file_raven, H5FD_MEM_DEFAULT), "EOF mismatch")
/*********
* TESTS *
@@ -1376,8 +1376,8 @@ test_noops_and_autofails(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS VFD always-fail and no-op routines");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -1432,8 +1432,8 @@ test_noops_and_autofails(void)
/* no-op calls to `lock()` and `unlock()`
*/
JSVERIFY(SUCCEED, H5FDlock(file, TRUE), "lock always succeeds; has no effect")
- JSVERIFY(SUCCEED, H5FDlock(file, FALSE), NULL)
- JSVERIFY(SUCCEED, H5FDunlock(file), NULL)
+ JSVERIFY(SUCCEED, H5FDlock(file, FALSE), "lock issue")
+ JSVERIFY(SUCCEED, H5FDunlock(file), "unlock issue")
/* Lock/unlock with null file or similar error crashes tests.
* HDassert in calling heirarchy, `H5FD[un]lock()` and `H5FD_[un]lock()`
*/
@@ -1528,8 +1528,8 @@ test_H5F_integration(void)
#ifndef H5_HAVE_LIBHDFS
TESTING("HDFS file access through HD5F library (H5F API)");
SKIPPED();
- puts(" HDFS VFD is not enabled");
- fflush(stdout);
+ HDputs(" HDFS VFD is not enabled");
+ HDfflush(stdout);
return 0;
#else
@@ -1597,7 +1597,7 @@ error:
#if HDFS_TEST_DEBUG
HDprintf("\nerror!");
- fflush(stdout);
+ HDfflush(stdout);
#endif /* HDFS_TEST_DEBUG */
if (fapl_id >= 0) {