From fc64bafb143b1d259282913fdbf0ba9f1a0a8069 Mon Sep 17 00:00:00 2001 From: Dana Robinson Date: Sun, 16 Dec 2018 12:41:55 -0800 Subject: Updates the autotools tests to also emit the VOL connector for each test. --- config/conclude.am | 33 ++++++++++++++++++++++++--------- test/h5test.c | 33 +++++++++++++++++++-------------- 2 files changed, 43 insertions(+), 23 deletions(-) diff --git a/config/conclude.am b/config/conclude.am index 4655565..d0dbf3a 100644 --- a/config/conclude.am +++ b/config/conclude.am @@ -131,28 +131,43 @@ $(TEST_PROG_CHKEXE) $(TEST_PROG_PARA_CHKEXE) dummy.chkexe_: echo "============================" > $${log}; \ fi; \ if test "X$(FORTRAN_API)" = "Xyes"; then \ - echo "Fortran API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + echo "Fortran API: Testing $${tname} $(TEST_FLAGS)"; \ if test -n "$(REALTIMEOUTPUT)"; then \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \ + echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \ else \ - echo "Fortran API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + echo "Fortran API: Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \ fi; \ elif test "X$(CXX_API)" = "Xyes"; then \ - echo "C++ API: Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + echo "C++ API: Testing $${tname} $(TEST_FLAGS)"; \ if test -n "$(REALTIMEOUTPUT)"; then \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log};\ + echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log};\ else \ - echo "C++ API: $(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log};\ + echo "C++ API: Test log for $${tname} $(TEST_FLAGS)" >> $${log};\ fi; \ else \ - echo "Testing $(HDF5_DRIVER) $${tname} $(TEST_FLAGS)"; \ + echo "Testing: $${tname} $(TEST_FLAGS)"; \ if test -n "$(REALTIMEOUTPUT)"; then \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" | tee -a $${log}; \ + echo "Test log for $${tname} $(TEST_FLAGS)" | tee -a $${log}; \ else \ - echo "$(HDF5_DRIVER) $${tname} $(TEST_FLAGS) Test Log" >> $${log}; \ + echo "Test log for $${tname} $(TEST_FLAGS)" >> $${log}; \ fi; \ fi; \ if test -n "$(REALTIMEOUTPUT)"; then \ + if test -n "$(HDF5_VOL_CONNECTOR)"; then \ + echo "VOL connector: $(HDF5_VOL_CONNECTOR)" | tee -a $${log}; \ + fi; \ + if test -n "$(HDF5_DRIVER)"; then \ + echo "Virtual file driver (VFD): $(HDF5_DRIVER)" | tee -a $${log}; \ + fi; \ + else \ + if test -n "$(HDF5_VOL_CONNECTOR)"; then \ + echo "VOL connector: $(HDF5_VOL_CONNECTOR)" >> $${log}; \ + fi; \ + if test -n "$(HDF5_DRIVER)"; then \ + echo "Virtual file driver (VFD): $(HDF5_DRIVER)" >> $${log}; \ + fi; \ + fi; \ + if test -n "$(REALTIMEOUTPUT)"; then \ echo "============================" | tee -a $${log}; \ else \ echo "============================" >> $${log}; \ diff --git a/test/h5test.c b/test/h5test.c index 6aad76a..47ddd34 100644 --- a/test/h5test.c +++ b/test/h5test.c @@ -802,10 +802,10 @@ h5_rmprefix(const char *filename) * * Purpose: Returns a file access template which is the default template * but with a file driver, VOL connector, or libver bound set - * according to a constant or environment variable + * according to a constant or environment variable * - * Return: Success: A file access property list - * Failure: -1 + * Return: Success: A file access property list + * Failure: H5I_INVALID_HID * * Programmer: Robb Matzke * Thursday, November 19, 1998 @@ -815,24 +815,29 @@ h5_rmprefix(const char *filename) hid_t h5_fileaccess(void) { - hid_t fapl = -1; + hid_t fapl_id = H5I_INVALID_HID; - if((fapl = H5Pcreate(H5P_FILE_ACCESS)) < 0) - return -1; + if((fapl_id = H5Pcreate(H5P_FILE_ACCESS)) < 0) + goto error; /* Attempt to set up a file driver first */ - if(h5_get_vfd_fapl(fapl) < 0) - return -1; + if(h5_get_vfd_fapl(fapl_id) < 0) + goto error; /* Next, try to set up a VOL connector */ - if(h5_get_vol_fapl(fapl) < 0) - return -1; + if(h5_get_vol_fapl(fapl_id) < 0) + goto error; /* Finally, check for libver bounds */ - if(h5_get_libver_fapl(fapl) < 0) - return -1; + if(h5_get_libver_fapl(fapl_id) < 0) + goto error; - return(fapl); + return fapl_id; + +error: + if(fapl_id != H5I_INVALID_HID) + H5Pclose(fapl_id); + return H5I_INVALID_HID; } /* end h5_fileaccess() */ @@ -1042,7 +1047,7 @@ error: * fapl but with a VOL connector set according to the constant * or environment variable HDF5_VOL_CONNECTOR. * - * Return: Success: A file access property list ID + * Return: Success: 0 * Failure: -1 * * Programmer: Jordan Henderson -- cgit v0.12