From 0e1633c26d3d28cc7612ae52277111a6aa4869da Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 09:03:46 -0500 Subject: Windows ahs one more directory level --- test/CMakeTests.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 86c5cb3..6f15fc4 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -986,8 +986,10 @@ endif () ############################################################################## if (WIN32) set (CMAKE_SEP "\;") + set (BIN_REL_PATH "../../") else () set (CMAKE_SEP ":") + set (BIN_REL_PATH "../") endif () add_test (NAME H5PLUGIN-plugin COMMAND $) @@ -998,7 +1000,7 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES add_test (NAME H5PLUGIN-pluginRelative COMMAND $) set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES - ENVIRONMENT "HDF5_PLUGIN_PATH=@/../testdir1${CMAKE_SEP}@/../testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" + ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} ) -- cgit v0.12 From 220388e7351becc927114de19f8a34e78e55a7ed Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 10:50:06 -0500 Subject: Fix path to actual executable location --- test/test_plugin.sh.in | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in index 37d4462..a0c9a42 100644 --- a/test/test_plugin.sh.in +++ b/test/test_plugin.sh.in @@ -88,22 +88,23 @@ if [ $? != 0 ]; then fi # setup plugin path relative to test -ENVCMD="env HDF5_PLUGIN_PATH=@/${PLUGIN_LIBDIR1}:@/${PLUGIN_LIBDIR2}" +# actual executable is in the .libs folder +ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_LIBDIR1}:@/../${PLUGIN_LIBDIR2}" # Run the test -#$ENVCMD $TEST_BIN -#if [ $? != 0 ]; then -# nerrors=`expr $nerrors + 1` -#fi +$ENVCMD $TEST_BIN +if [ $? != 0 ]; then + nerrors=`expr $nerrors + 1` +fi # print results -#if test $nerrors -ne 0 ; then -# echo "$nerrors errors encountered" -# exit_code=$EXIT_FAILURE -#else -# echo "All Plugin API tests passed." -# exit_code=$EXIT_SUCCESS -#fi +if test $nerrors -ne 0 ; then + echo "$nerrors errors encountered" + exit_code=$EXIT_FAILURE +else + echo "All Plugin API tests passed." + exit_code=$EXIT_SUCCESS +fi # Clean up temporary files/directories and leave $RM $PLUGIN_LIBDIR1 $PLUGIN_LIBDIR2 -- cgit v0.12 From 6fac0de1582f9b8f9a85893cd269a86203b7fc41 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:10:58 -0500 Subject: Revert HDFFV-9655 by disabling test and not using new function. --- src/H5PL.c | 16 +++++++++------- src/H5PLpublic.h | 12 ++++++------ test/test_plugin.sh.in | 15 +++++++++------ 3 files changed, 24 insertions(+), 19 deletions(-) diff --git a/src/H5PL.c b/src/H5PL.c index 2789a5e..ba10e5a 100644 --- a/src/H5PL.c +++ b/src/H5PL.c @@ -720,17 +720,19 @@ done: * * Purpose: Query the size of the current list of plugin paths. * - * Return: Plugin path size (can't indicate failure due to unsigned type) + * Return: Plugin path size * *------------------------------------------------------------------------- */ -unsigned int -H5PLsize(void) +herr_t +H5PLsize(unsigned int *listsize) { - unsigned int ret_value = (unsigned int)H5PL_num_paths_g; + herr_t ret_value = SUCCEED; /* Return value */ + + FUNC_ENTER_API(FAIL) + H5TRACE1("e", "*Iu", listsize); - FUNC_ENTER_API(0) - H5TRACE0("Iu",""); + *listsize = (unsigned int)H5PL_num_paths_g; done: FUNC_LEAVE_API(ret_value) @@ -778,7 +780,7 @@ H5PL__init_path_table(void) /* Check for too many directories in path */ if(H5PL_num_paths_g == H5PL_MAX_PATH_NUM) HGOTO_ERROR(H5E_PLUGIN, H5E_NOSPACE, FAIL, "too many directories in path for table") - if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5PL__env_strdup(dir))) + if(NULL == (H5PL_path_table_g[H5PL_num_paths_g] = H5MM_strdup(dir))) HGOTO_ERROR(H5E_PLUGIN, H5E_CANTALLOC, FAIL, "can't allocate memory for path") H5PL_num_paths_g++; dir = HDstrtok(NULL, H5PL_PATH_SEPARATOR); diff --git a/src/H5PLpublic.h b/src/H5PLpublic.h index 5e4dcae..12cdc87 100644 --- a/src/H5PLpublic.h +++ b/src/H5PLpublic.h @@ -43,14 +43,14 @@ extern "C" { /* plugin state */ H5_DLL herr_t H5PLset_loading_state(unsigned int plugin_type); -H5_DLL herr_t H5PLget_loading_state(unsigned int* plugin_type/*out*/); -H5_DLL herr_t H5PLappend(const char* plugin_path); -H5_DLL herr_t H5PLprepend(const char* plugin_path); -H5_DLL herr_t H5PLreplace(const char* plugin_path, unsigned int index); -H5_DLL herr_t H5PLinsert(const char* plugin_path, unsigned int index); +H5_DLL herr_t H5PLget_loading_state(unsigned int *plugin_type/*out*/); +H5_DLL herr_t H5PLappend(const char *plugin_path); +H5_DLL herr_t H5PLprepend(const char *plugin_path); +H5_DLL herr_t H5PLreplace(const char *plugin_path, unsigned int index); +H5_DLL herr_t H5PLinsert(const char *plugin_path, unsigned int index); H5_DLL herr_t H5PLremove(unsigned int index); H5_DLL ssize_t H5PLget(unsigned int index, char *pathname/*out*/, size_t size); -H5_DLL unsigned int H5PLsize(void); +H5_DLL herr_t H5PLsize(unsigned int *listsize/*out*/); #ifdef __cplusplus } diff --git a/test/test_plugin.sh.in b/test/test_plugin.sh.in index a0c9a42..4cddbb0 100644 --- a/test/test_plugin.sh.in +++ b/test/test_plugin.sh.in @@ -87,15 +87,18 @@ if [ $? != 0 ]; then nerrors=`expr $nerrors + 1` fi +############################################ +# HDFFV-9655 test for relative path disabled # setup plugin path relative to test # actual executable is in the .libs folder -ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_LIBDIR1}:@/../${PLUGIN_LIBDIR2}" - +#ENVCMD="env HDF5_PLUGIN_PATH=@/../${PLUGIN_LIBDIR1}:@/../${PLUGIN_LIBDIR2}" +# # Run the test -$ENVCMD $TEST_BIN -if [ $? != 0 ]; then - nerrors=`expr $nerrors + 1` -fi +#$ENVCMD $TEST_BIN +#if [ $? != 0 ]; then +# nerrors=`expr $nerrors + 1` +#fi +############################################# # print results if test $nerrors -ne 0 ; then -- cgit v0.12 From aafee79e9f34137b3db11e9e76aeb604446c31b7 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:20:21 -0500 Subject: Changed signature of H5PLgetsize --- java/src/jni/h5plImp.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 09a1032..322d5d1 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -213,13 +213,11 @@ JNIEXPORT jint JNICALL Java_hdf_hdf5lib_H5_H5PLsize (JNIEnv *env, jclass clss) { - int retVal = -1; - - retVal = H5PLsize(); - if (retVal < 0) + unsigned int listsize = 0; + if (H5PLget_loading_state(&listsize) < 0) { h5libraryError(env); - - return (jint)retVal; + } + return (jint)listsize; } /* end Java_hdf_hdf5lib_H5_H5PLsize */ #ifdef __cplusplus -- cgit v0.12 From c2a9c334447da04a1d8424d25e54f9bb1381fe48 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:25:36 -0500 Subject: Revert HDFFV-9655 --- test/CMakeTests.cmake | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/test/CMakeTests.cmake b/test/CMakeTests.cmake index 6f15fc4..6eee237 100644 --- a/test/CMakeTests.cmake +++ b/test/CMakeTests.cmake @@ -998,11 +998,15 @@ set_tests_properties (H5PLUGIN-plugin PROPERTIES WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} ) -add_test (NAME H5PLUGIN-pluginRelative COMMAND $) -set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES - ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" - WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} -) +############################################################################## +# HDFFV-9655 relative plugin test disabled +# +#add_test (NAME H5PLUGIN-pluginRelative COMMAND $) +#set_tests_properties (H5PLUGIN-pluginRelative PROPERTIES +# ENVIRONMENT "HDF5_PLUGIN_PATH=@/${BIN_REL_PATH}testdir1${CMAKE_SEP}@/${BIN_REL_PATH}testdir2;srcdir=${HDF5_TEST_BINARY_DIR}" +# WORKING_DIRECTORY ${HDF5_TEST_BINARY_DIR} +#) +############################################################################## ############################################################################## ### S W M R T E S T S -- cgit v0.12 From c1dc24c143077dcbc95dfc881de09d669133ddd6 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:31:28 -0500 Subject: Change H5PLsize() signature --- test/plugin.c | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/test/plugin.c b/test/plugin.c index 2939595..13e87bd 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -733,7 +733,7 @@ test_filter_path_apis(void) if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR - ndx = H5PLsize(); + H5PLsize(ndx); TESTING(" remove"); /* Remove all existing paths*/ @@ -743,7 +743,8 @@ test_filter_path_apis(void) TEST_ERROR } /* end if */ /* Verify the table is empty */ - if(H5PLsize() > 0) TEST_ERROR + H5PLsize(ndx); + if(ndx > 0) TEST_ERROR PASSED(); TESTING(" remove (exceed min)"); @@ -764,7 +765,8 @@ test_filter_path_apis(void) } } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR PASSED(); TESTING(" append (exceed)"); @@ -835,7 +837,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - if (H5PLsize() != H5PL_MAX_PATH_NUM - 1) TEST_ERROR + H5PLsize(ndx); + if (ndx != H5PL_MAX_PATH_NUM - 1) TEST_ERROR TESTING(" prepend"); /* Prepend one path*/ @@ -846,7 +849,8 @@ test_filter_path_apis(void) } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were moved */ if(H5PLget(8, pathname, 256) <= 0) TEST_ERROR @@ -880,7 +884,8 @@ test_filter_path_apis(void) } /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(ndx); + if(ndx) != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR @@ -909,7 +914,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - if(H5PLsize() != 15) TEST_ERROR + H5PLsize(ndx); + if(ndx != 15) TEST_ERROR TESTING(" insert"); /* Insert one path*/ @@ -928,7 +934,8 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is full */ - if(H5PLsize() != H5PL_MAX_PATH_NUM) TEST_ERROR + H5PLsize(ndx); + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR TESTING(" insert (exceed)"); /* Exceed the max path insert */ -- cgit v0.12 From c08ef4dc5b0050e173b673a8c2ef4efb8244ea11 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:34:25 -0500 Subject: Signature change requires a ptr --- test/plugin.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test/plugin.c b/test/plugin.c index 13e87bd..cc0c6b8 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -733,7 +733,7 @@ test_filter_path_apis(void) if(H5Zfilter_avail(H5Z_FILTER_DYNLIB1) != TRUE) TEST_ERROR - H5PLsize(ndx); + H5PLsize(&ndx); TESTING(" remove"); /* Remove all existing paths*/ @@ -743,7 +743,7 @@ test_filter_path_apis(void) TEST_ERROR } /* end if */ /* Verify the table is empty */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx > 0) TEST_ERROR PASSED(); @@ -765,7 +765,7 @@ test_filter_path_apis(void) } } /* Verify the table is full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR PASSED(); @@ -837,7 +837,7 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - H5PLsize(ndx); + H5PLsize(&ndx); if (ndx != H5PL_MAX_PATH_NUM - 1) TEST_ERROR TESTING(" prepend"); @@ -849,7 +849,7 @@ test_filter_path_apis(void) } /* Verify the table is full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were moved */ @@ -884,7 +884,7 @@ test_filter_path_apis(void) } /* Verify the table is full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx) != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ @@ -914,7 +914,7 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is not full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx != 15) TEST_ERROR TESTING(" insert"); @@ -934,7 +934,7 @@ test_filter_path_apis(void) PASSED(); /* Verify the table is full */ - H5PLsize(ndx); + H5PLsize(&ndx); if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR TESTING(" insert (exceed)"); -- cgit v0.12 From bce204f7f3337424d99df0d6c18f701fc9727cb4 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 15:36:10 -0500 Subject: Fix typo --- test/plugin.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/plugin.c b/test/plugin.c index cc0c6b8..862f99d 100644 --- a/test/plugin.c +++ b/test/plugin.c @@ -885,7 +885,7 @@ test_filter_path_apis(void) /* Verify the table is full */ H5PLsize(&ndx); - if(ndx) != H5PL_MAX_PATH_NUM) TEST_ERROR + if(ndx != H5PL_MAX_PATH_NUM) TEST_ERROR /* Verify that the entries were not moved */ if(H5PLget(0, pathname, 256) <= 0) TEST_ERROR -- cgit v0.12 From c148ad90f0604e67065a1a82a0ade72984672173 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 16:09:39 -0500 Subject: Fix javadoc --- java/src/hdf/hdf5lib/H5.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/java/src/hdf/hdf5lib/H5.java b/java/src/hdf/hdf5lib/H5.java index 23e2a34..5e13fdf 100644 --- a/java/src/hdf/hdf5lib/H5.java +++ b/java/src/hdf/hdf5lib/H5.java @@ -2895,7 +2895,8 @@ public class H5 implements java.io.Serializable { * @param file_id * IN: Identifier of the target file. * - * @param mdc_logging_status, the status + * @param mdc_logging_status + * the status * mdc_logging_status[0] = is_enabled, whether logging is enabled * mdc_logging_status[1] = is_currently_logging, whether events are currently being logged * @@ -5813,7 +5814,8 @@ public class H5 implements java.io.Serializable { * * @param fapl_id * IN: File access property list identifier - * @param mdc_log_options, the options + * @param mdc_log_options + * the options * mdc_logging_options[0] = is_enabled, whether logging is enabled * mdc_logging_options[1] = start_on_access, whether the logging begins as soon as the file is opened or created * -- cgit v0.12 From 0fb5ce7ad50664f800ffe7e107e0fb0f90f66e12 Mon Sep 17 00:00:00 2001 From: Allen Byrne Date: Mon, 24 Apr 2017 16:21:42 -0500 Subject: Correct name of native function --- java/src/jni/h5plImp.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/java/src/jni/h5plImp.c b/java/src/jni/h5plImp.c index 322d5d1..9b6100e 100644 --- a/java/src/jni/h5plImp.c +++ b/java/src/jni/h5plImp.c @@ -214,7 +214,7 @@ Java_hdf_hdf5lib_H5_H5PLsize (JNIEnv *env, jclass clss) { unsigned int listsize = 0; - if (H5PLget_loading_state(&listsize) < 0) { + if (H5PLsize(&listsize) < 0) { h5libraryError(env); } return (jint)listsize; -- cgit v0.12