summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorDana Robinson <derobins@hdfgroup.org>2020-08-18 01:40:31 (GMT)
committerDana Robinson <derobins@hdfgroup.org>2020-08-18 01:40:31 (GMT)
commitc0a05da7c0189e9f0833f69506bce2775a01aa2b (patch)
tree4ef5b2e4962511e7ae6e48b0be87351daf4da160 /test
parentc1a6fffdf1bcc501062b1df2e735e19b07e58093 (diff)
downloadhdf5-c0a05da7c0189e9f0833f69506bce2775a01aa2b.zip
hdf5-c0a05da7c0189e9f0833f69506bce2775a01aa2b.tar.gz
hdf5-c0a05da7c0189e9f0833f69506bce2775a01aa2b.tar.bz2
Adds missing hdfs test changes.
Diffstat (limited to 'test')
-rw-r--r--test/hdfs.c29
1 files changed, 22 insertions, 7 deletions
diff --git a/test/hdfs.c b/test/hdfs.c
index 3112dcc..0f4969e 100644
--- a/test/hdfs.c
+++ b/test/hdfs.c
@@ -30,7 +30,6 @@
#ifdef H5_HAVE_LIBHDFS
#define HDFS_TEST_DEBUG 0
#define HDFS_TEST_MAX_BUF_SIZE 256
-#endif /* H5_HAVE_LIBHDFS */
/*****************************************************************************
*
@@ -372,11 +371,8 @@ if (strcmp((actual), (expected)) != 0) { \
* OTHER MACROS AND DEFINITIONS *
********************************/
-/* copied from src/hdfs.c
- */
-#ifdef H5_HAVE_LIBHDFS
+/* copied from src/hdfs.c */
#define MAXADDR (((haddr_t)1<<(8*sizeof(HDoff_t)-1))-1)
-#endif /* H5_HAVE_LIBHDFS */
#define HDFS_NAMENODE_NAME_MAX_SIZE 128
@@ -384,12 +380,10 @@ if (strcmp((actual), (expected)) != 0) { \
* FILE-LOCAL GLOBAL VARIABLES *
*******************************/
-#ifdef H5_HAVE_LIBHDFS
static const char filename_missing[] = "/tmp/missing.txt";
static const char filename_bard[] = "/tmp/t8.shakespeare.txt";
static const char filename_raven[] = "/tmp/Poe_Raven.txt";
static const char filename_example_h5[] = "/tmp/t.h5";
-#endif /* H5_HAVE_LIBHDFS */
static H5FD_hdfs_fapl_t default_fa = {
1, /* fa version */
@@ -399,6 +393,7 @@ static H5FD_hdfs_fapl_t default_fa = {
"", /* kerberos path */
1024, /* buffer size */
};
+#endif /* H5_HAVE_LIBHDFS */
/******************
* TEST FUNCTIONS *
@@ -429,6 +424,14 @@ static H5FD_hdfs_fapl_t default_fa = {
static int
test_fapl_config_validation(void)
{
+#ifndef H5_HAVE_LIBHDFS
+ TESTING("HDFS fapl configuration validation");
+ SKIPPED();
+ puts(" HDFS VFD is not enabled");
+ fflush(stdout);
+ return 0;
+
+#else
/*********************
* test-local macros *
*********************/
@@ -604,6 +607,7 @@ error:
} H5E_END_TRY;
}
return 1;
+#endif /* H5_HAVE_LIBHDFS */
} /* end test_fapl_config_validation() */
@@ -630,6 +634,14 @@ error:
static int
test_hdfs_fapl(void)
{
+#ifndef H5_HAVE_LIBHDFS
+ TESTING("HDFS fapl ");
+ SKIPPED();
+ puts(" HDFS VFD is not enabled");
+ fflush(stdout);
+ return 0;
+
+#else
/************************
* test-local variables *
************************/
@@ -681,6 +693,7 @@ error:
} H5E_END_TRY;
return 1;
+#endif /* H5_HAVE_LIBHDFS */
} /* end test_hdfs_fapl() */
@@ -1723,6 +1736,7 @@ main(void)
* commence tests *
******************/
+#ifdef H5_HAVE_LIBHDFS
static char hdfs_namenode_name[HDFS_NAMENODE_NAME_MAX_SIZE] = "";
const char *hdfs_namenode_name_env = NULL;
@@ -1736,6 +1750,7 @@ main(void)
hdfs_namenode_name_env,
HDFS_NAMENODE_NAME_MAX_SIZE);
}
+#endif /* H5_HAVE_LIBHDFS */
h5_reset();