From f89b8d3252f60e5f13730584ad9f38079c924c31 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Tue, 8 Oct 2019 11:33:04 -0500 Subject: HDFFV-10903 adjust for missing functions --- test/ros3.c | 2 ++ test/vfd.c | 8 ++++++++ tools/h5dump/h5dump.c | 2 +- tools/h5ls/h5ls.c | 2 +- tools/h5stat/h5stat.c | 2 +- tools/lib/h5tools_utils.h | 4 ++++ tools/libtest/h5tools_test_utils.c | 5 +++++ 7 files changed, 22 insertions(+), 3 deletions(-) diff --git a/test/ros3.c b/test/ros3.c index 73b6ac2..1ede752 100644 --- a/test/ros3.c +++ b/test/ros3.c @@ -1482,6 +1482,7 @@ test_noops_and_autofails(void) /* no-op calls to `lock()` and `unlock()` */ +/* JSVERIFY( SUCCEED, H5FDlock(file, TRUE), "lock always succeeds; has no effect" ) @@ -1491,6 +1492,7 @@ test_noops_and_autofails(void) JSVERIFY( SUCCEED, H5FDunlock(file), NULL ) +*/ /* Lock/unlock with null file or similar error crashes tests. * HDassert in calling heirarchy, `H5FD[un]lock()` and `H5FD_[un]lock()` */ diff --git a/test/vfd.c b/test/vfd.c index 1c2e656..920cfb3 100644 --- a/test/vfd.c +++ b/test/vfd.c @@ -20,6 +20,14 @@ #include "h5test.h" +#ifdef H5_HAVE_ROS3_VFD +#include "H5FDros3.h" +#endif + +#ifdef H5_HAVE_LIBHDFS +#include "H5FDhdfs.h" +#endif + #define KB 1024U #define FAMILY_NUMBER 4 #define FAMILY_SIZE (1*KB) diff --git a/tools/h5dump/h5dump.c b/tools/h5dump/h5dump.c index dec1299..175dae7 100644 --- a/tools/h5dump/h5dump.c +++ b/tools/h5dump/h5dump.c @@ -27,7 +27,7 @@ static const char *xml_dtd_uri = NULL; #ifdef H5_HAVE_ROS3_VFD static H5FD_ros3_fapl_t ros3_fa = { 1, /* version */ - false, /* authenticate */ + FALSE, /* authenticate */ "", /* aws region */ "", /* access key id */ "", /* secret access key */ diff --git a/tools/h5ls/h5ls.c b/tools/h5ls/h5ls.c index b0b42fa..90363e7 100644 --- a/tools/h5ls/h5ls.c +++ b/tools/h5ls/h5ls.c @@ -2421,7 +2421,7 @@ main(int argc, const char *argv[]) /* default "anonymous" s3 configuration */ H5FD_ros3_fapl_t ros3_fa = { 1, /* fapl version */ - false, /* authenticate */ + FALSE, /* authenticate */ "", /* aws region */ "", /* access key id */ "", /* secret access key */ diff --git a/tools/h5stat/h5stat.c b/tools/h5stat/h5stat.c index d6f5e5c..a4032b1 100644 --- a/tools/h5stat/h5stat.c +++ b/tools/h5stat/h5stat.c @@ -104,7 +104,7 @@ static const char *drivername = ""; */ static H5FD_ros3_fapl_t ros3_fa = { 1, /* fapl version */ - false, /* authenticate */ + FALSE, /* authenticate */ "", /* aws region */ "", /* access key id */ "", /* secret access key */ diff --git a/tools/lib/h5tools_utils.h b/tools/lib/h5tools_utils.h index 0a4044c..6e1d202 100644 --- a/tools/lib/h5tools_utils.h +++ b/tools/lib/h5tools_utils.h @@ -26,6 +26,10 @@ #include "H5FDros3.h" #endif +#ifdef H5_HAVE_LIBHDFS +#include "H5FDhdfs.h" +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/tools/libtest/h5tools_test_utils.c b/tools/libtest/h5tools_test_utils.c index 120f803..c2ec22c 100644 --- a/tools/libtest/h5tools_test_utils.c +++ b/tools/libtest/h5tools_test_utils.c @@ -1002,6 +1002,7 @@ test_set_configured_fapl(void) hid_t fapl_id = -1; other_fa_t wrong_fa = {0x432, 0xf82, 0x9093}; +#ifdef H5_HAVE_ROS3_VFD H5FD_ros3_fapl_t ros3_anon_fa = {1, FALSE, "", "", ""}; H5FD_ros3_fapl_t ros3_auth_fa = { 1, /* fapl version */ @@ -1010,6 +1011,9 @@ test_set_configured_fapl(void) "12345677890abcdef", /* simulate access key ID */ "oiwnerwe9u0234nJw0-aoj+dsf", /* simulate secret key */ }; +#endif /* H5_HAVE_ROS3_VFD */ + +#ifdef H5_HAVE_LIBHDFS H5FD_hdfs_fapl_t hdfs_fa = { 1, /* fapl version */ "", /* namenode name */ @@ -1018,6 +1022,7 @@ test_set_configured_fapl(void) "", /* user name */ 2048, /* stream buffer size */ }; +#endif /* H5_HAVE_LIBHDFS */ unsigned n_cases = 7; /* number of common testcases */ testcase cases[] = { { "(common) should fail: no fapl id", -- cgit v0.12