2018-10-10 23:10:15 +08:00
|
|
|
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
|
|
|
|
* Copyright by The HDF Group. *
|
|
|
|
* All rights reserved. *
|
|
|
|
* *
|
|
|
|
* This file is part of HDF5. The full HDF5 copyright notice, including *
|
|
|
|
* terms governing use, modification, and redistribution, is contained in *
|
|
|
|
* the COPYING file, which can be found at the root of the source code *
|
2021-02-17 22:52:04 +08:00
|
|
|
* distribution tree, or in https://www.hdfgroup.org/licenses. *
|
2018-10-10 23:10:15 +08:00
|
|
|
* If you do not have access to either file, you may request a copy from *
|
|
|
|
* help@hdfgroup.org. *
|
|
|
|
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
|
|
|
|
|
|
|
|
/*
|
2019-06-05 19:34:36 +08:00
|
|
|
* Purpose: Tests the virtual object layer (H5VL)
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* This is a minimal test to ensure VOL usage (setting a VOL, etc.)
|
|
|
|
* works as expected. Actual VOL functionality is tested using
|
|
|
|
* other mechanisms.
|
|
|
|
*/
|
|
|
|
|
2020-11-24 00:18:26 +08:00
|
|
|
/* Headers needed */
|
2018-10-10 23:10:15 +08:00
|
|
|
#include "h5test.h"
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
#include "H5Iprivate.h" /* IDs */
|
|
|
|
#define H5T_FRIEND /* Suppress error about including H5Tpkg */
|
|
|
|
#include "H5Tpkg.h" /* Datatypes */
|
|
|
|
#define H5VL_FRIEND /* Suppress error about including H5VLpkg */
|
|
|
|
#define H5VL_TESTING
|
|
|
|
#include "H5VLpkg.h" /* Virtual Object Layer */
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Filename */
|
2020-09-30 22:27:10 +08:00
|
|
|
const char *FILENAME[] = {"native_vol_test", NULL};
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define NATIVE_VOL_TEST_GROUP_NAME "test_group"
|
|
|
|
#define NATIVE_VOL_TEST_DATASET_NAME "test_dataset"
|
|
|
|
#define NATIVE_VOL_TEST_ATTRIBUTE_NAME "test_dataset"
|
|
|
|
#define NATIVE_VOL_TEST_HARD_LINK_NAME "test_hard_link"
|
|
|
|
#define NATIVE_VOL_TEST_SOFT_LINK_NAME "test_soft_link"
|
|
|
|
#define NATIVE_VOL_TEST_MOVE_LINK_NAME "test_move_link"
|
|
|
|
#define NATIVE_VOL_TEST_COPY_LINK_NAME "test_copy_link"
|
|
|
|
#define NATIVE_VOL_TEST_DATATYPE_NAME "test_datatype"
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define N_ELEMENTS 10
|
2018-10-10 23:10:15 +08:00
|
|
|
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
/* A VOL class struct to verify registering optional operations */
|
|
|
|
static int reg_opt_curr_op_val;
|
|
|
|
static herr_t reg_opt_op_optional(void *obj, H5VL_optional_args_t *args, hid_t dxpl_id, void **req);
|
|
|
|
static herr_t reg_opt_link_optional(void *obj, const H5VL_loc_params_t *loc_params,
|
|
|
|
H5VL_optional_args_t *args, hid_t dxpl_id, void **req);
|
|
|
|
static herr_t reg_opt_datatype_get(void *obj, H5VL_datatype_get_args_t *args, hid_t dxpl_id, void **req);
|
|
|
|
#define REG_OPT_VOL_NAME "reg_opt"
|
|
|
|
#define REG_OPT_VOL_VALUE ((H5VL_class_value_t)502)
|
|
|
|
static const H5VL_class_t reg_opt_vol_g = {
|
|
|
|
H5VL_VERSION, /* VOL class struct version */
|
|
|
|
REG_OPT_VOL_VALUE, /* value */
|
|
|
|
REG_OPT_VOL_NAME, /* name */
|
|
|
|
0, /* version */
|
|
|
|
0, /* capability flags */
|
|
|
|
NULL, /* initialize */
|
|
|
|
NULL, /* terminate */
|
|
|
|
{
|
|
|
|
/* info_cls */
|
|
|
|
(size_t)0, /* size */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* compare */
|
|
|
|
NULL, /* free */
|
|
|
|
NULL, /* to_str */
|
|
|
|
NULL, /* from_str */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* wrap_cls */
|
|
|
|
NULL, /* get_object */
|
|
|
|
NULL, /* get_wrap_ctx */
|
|
|
|
NULL, /* wrap_object */
|
|
|
|
NULL, /* unwrap_object */
|
|
|
|
NULL, /* free_wrap_ctx */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* attribute_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* read */
|
|
|
|
NULL, /* write */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
reg_opt_op_optional, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* dataset_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* read */
|
|
|
|
NULL, /* write */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
reg_opt_op_optional, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* datatype_cls */
|
|
|
|
NULL, /* commit */
|
|
|
|
NULL, /* open */
|
|
|
|
reg_opt_datatype_get, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
reg_opt_op_optional, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* file_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
reg_opt_op_optional, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* group_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
reg_opt_op_optional, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* link_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* move */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
reg_opt_link_optional /* optional */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* object_cls */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
reg_opt_link_optional /* optional */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* introspect_cls */
|
|
|
|
NULL, /* get_conn_cls */
|
|
|
|
NULL, /* get_cap_flags */
|
|
|
|
NULL, /* opt_query */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* request_cls */
|
|
|
|
NULL, /* wait */
|
|
|
|
NULL, /* notify */
|
|
|
|
NULL, /* cancel */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* free */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* blob_cls */
|
|
|
|
NULL, /* put */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL /* optional */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* token_cls */
|
|
|
|
NULL, /* cmp */
|
|
|
|
NULL, /* to_str */
|
|
|
|
NULL /* from_str */
|
|
|
|
},
|
|
|
|
NULL /* optional */
|
|
|
|
};
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
#define FAKE_VOL_NAME "fake"
|
2020-01-29 08:18:38 +08:00
|
|
|
#define FAKE_VOL_VALUE ((H5VL_class_value_t)501)
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
/* A VOL class struct that describes a VOL class with no
|
|
|
|
* functionality.
|
|
|
|
*/
|
|
|
|
static const H5VL_class_t fake_vol_g = {
|
2020-12-11 01:01:04 +08:00
|
|
|
H5VL_VERSION, /* VOL class struct version */
|
2020-09-30 22:27:10 +08:00
|
|
|
FAKE_VOL_VALUE, /* value */
|
|
|
|
FAKE_VOL_NAME, /* name */
|
2020-12-11 01:01:04 +08:00
|
|
|
0, /* connector version */
|
2020-09-30 22:27:10 +08:00
|
|
|
0, /* capability flags */
|
|
|
|
NULL, /* initialize */
|
|
|
|
NULL, /* terminate */
|
|
|
|
{
|
|
|
|
/* info_cls */
|
|
|
|
(size_t)0, /* size */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* compare */
|
|
|
|
NULL, /* free */
|
|
|
|
NULL, /* to_str */
|
|
|
|
NULL, /* from_str */
|
2019-02-24 07:02:29 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* wrap_cls */
|
|
|
|
NULL, /* get_object */
|
|
|
|
NULL, /* get_wrap_ctx */
|
|
|
|
NULL, /* wrap_object */
|
|
|
|
NULL, /* unwrap_object */
|
|
|
|
NULL, /* free_wrap_ctx */
|
2019-02-24 07:02:29 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* attribute_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* read */
|
|
|
|
NULL, /* write */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* dataset_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* read */
|
|
|
|
NULL, /* write */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
{
|
|
|
|
/* datatype_cls */
|
|
|
|
NULL, /* commit */
|
|
|
|
NULL, /* open */
|
|
|
|
reg_opt_datatype_get, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* file_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* group_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* link_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* move */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL /* optional */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* object_cls */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL /* optional */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* introspect_cls */
|
|
|
|
NULL, /* get_conn_cls */
|
|
|
|
NULL, /* get_cap_flags */
|
|
|
|
NULL, /* opt_query */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* request_cls */
|
|
|
|
NULL, /* wait */
|
|
|
|
NULL, /* notify */
|
|
|
|
NULL, /* cancel */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* free */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* blob_cls */
|
|
|
|
NULL, /* put */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL /* optional */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* token_cls */
|
|
|
|
NULL, /* cmp */
|
|
|
|
NULL, /* to_str */
|
|
|
|
NULL /* from_str */
|
|
|
|
},
|
|
|
|
NULL /* optional */
|
|
|
|
};
|
|
|
|
|
|
|
|
static herr_t fake_async_get_cap_flags(const void *info, unsigned *cap_flags);
|
|
|
|
|
|
|
|
#define FAKE_ASYNC_VOL_NAME "fake_async"
|
|
|
|
#define FAKE_ASYNC_VOL_VALUE ((H5VL_class_value_t)503)
|
|
|
|
|
|
|
|
/* A VOL class struct that describes a VOL class with no
|
|
|
|
* functionality except to set the async capability flag.
|
|
|
|
*/
|
|
|
|
static const H5VL_class_t fake_async_vol_g = {
|
|
|
|
H5VL_VERSION, /* VOL class struct version */
|
|
|
|
FAKE_ASYNC_VOL_VALUE, /* value */
|
|
|
|
FAKE_ASYNC_VOL_NAME, /* name */
|
|
|
|
0, /* connector version */
|
|
|
|
H5VL_CAP_FLAG_ASYNC, /* capability flags */
|
|
|
|
NULL, /* initialize */
|
|
|
|
NULL, /* terminate */
|
|
|
|
{
|
|
|
|
/* info_cls */
|
|
|
|
(size_t)0, /* size */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* compare */
|
|
|
|
NULL, /* free */
|
|
|
|
NULL, /* to_str */
|
|
|
|
NULL, /* from_str */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* wrap_cls */
|
|
|
|
NULL, /* get_object */
|
|
|
|
NULL, /* get_wrap_ctx */
|
|
|
|
NULL, /* wrap_object */
|
|
|
|
NULL, /* unwrap_object */
|
|
|
|
NULL, /* free_wrap_ctx */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* attribute_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* read */
|
|
|
|
NULL, /* write */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
|
|
|
{
|
|
|
|
/* dataset_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* read */
|
|
|
|
NULL, /* write */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* datatype_cls */
|
|
|
|
NULL, /* commit */
|
|
|
|
NULL, /* open */
|
2020-11-24 00:18:26 +08:00
|
|
|
NULL, /* get */
|
2020-09-30 22:27:10 +08:00
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* file_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* group_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* close */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* link_cls */
|
|
|
|
NULL, /* create */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* move */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL /* optional */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* object_cls */
|
|
|
|
NULL, /* open */
|
|
|
|
NULL, /* copy */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL /* optional */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* introspect_cls */
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
NULL, /* get_conn_cls */
|
|
|
|
fake_async_get_cap_flags, /* get_cap_flags */
|
|
|
|
NULL, /* opt_query */
|
Refactor all the 'H5VL_*_optional' callbacks to move the type of operation out
of the va_list, so it's at least possible for another connector to know what
the operation is and decide whether to implement it or not.
Added a new VOL sub-class called "introspect" where callbacks that report
information about the connector or container can be placed. Added an
'opt_query' callback to this sub-class, for a connector to report back
to the library whether a particular optional callback operation is supported.
Also added a 'get_conn_cls' introspection callback, to retrieve the H5VL_class_t
of a connector (either the "current" connector, H5VL_GET_CONN_LVL_CURR, or
the terminal connector, H5VL_GET_CONN_LVL_TERM).
Moved the "post open" operation from a file 'specific' operation to a file
'optional' operation, now that it's possible to detect (with the 'opt_query'
introspection callback) whether a VOL connector implements an optional
operation, without just returning an error.
Added new internal VOL helper routines: H5VL_object_is_native, to determine
if an object is in (or is a) native file, and H5VL_file_is_same, to determine
if two objects are in (or are) the same terminal VOL connector's container.
(And moved the special handling for FILE_IS_EQUAL operation out of internal VOL
callback routine into H5VL_file_is_same)
Made new dataset 'get' operation for H5Dvlen_get_buf_size, aligning it better
with other 'get' operations in API.
Fixed several issues with pass-through connectors, which are now passing the
'make check-passthrough-vol' tests again.
A bunch of warning and style cleanups as well.
2019-12-20 12:41:37 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* request_cls */
|
|
|
|
NULL, /* wait */
|
|
|
|
NULL, /* notify */
|
|
|
|
NULL, /* cancel */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL, /* optional */
|
|
|
|
NULL /* free */
|
2018-10-10 23:10:15 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* blob_cls */
|
|
|
|
NULL, /* put */
|
|
|
|
NULL, /* get */
|
|
|
|
NULL, /* specific */
|
|
|
|
NULL /* optional */
|
2019-12-04 07:14:57 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
{
|
|
|
|
/* token_cls */
|
|
|
|
NULL, /* cmp */
|
|
|
|
NULL, /* to_str */
|
|
|
|
NULL /* from_str */
|
2020-01-17 05:29:34 +08:00
|
|
|
},
|
2020-09-30 22:27:10 +08:00
|
|
|
NULL /* optional */
|
2018-10-10 23:10:15 +08:00
|
|
|
};
|
|
|
|
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: reg_opt_op_optional_verify
|
|
|
|
*
|
|
|
|
* Purpose: Common verification routine for dynamic optional operations
|
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
reg_opt_op_optional_verify(void *obj, H5VL_optional_args_t *args)
|
|
|
|
{
|
|
|
|
int *o = (int *)obj;
|
|
|
|
int *op_args;
|
|
|
|
|
|
|
|
/* Check for receiving correct operation value */
|
|
|
|
if (args->op_type != reg_opt_curr_op_val)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
/* Check that the object is correct */
|
|
|
|
if ((-1) != *o)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
/* Update the object, with the operation value */
|
|
|
|
*o = args->op_type;
|
|
|
|
|
|
|
|
/* Check that the argument is correct */
|
|
|
|
op_args = args->args;
|
|
|
|
if (NULL == op_args)
|
|
|
|
return -1;
|
|
|
|
if ((-1) != *op_args)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
/* Update the argument return parameter */
|
|
|
|
*op_args = args->op_type;
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
} /* end reg_opt_op_optional_verify() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: reg_opt_op_optional
|
|
|
|
*
|
|
|
|
* Purpose: Common callback to perform a connector-specific operation
|
|
|
|
* on an object
|
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
reg_opt_op_optional(void *obj, H5VL_optional_args_t *args, hid_t H5_ATTR_UNUSED dxpl_id,
|
|
|
|
void H5_ATTR_UNUSED **req)
|
|
|
|
{
|
|
|
|
/* Invoke the common value verification routine */
|
|
|
|
return reg_opt_op_optional_verify(obj, args);
|
|
|
|
} /* end reg_opt_op_optional() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: reg_opt_link_optional
|
|
|
|
*
|
|
|
|
* Purpose: Callback to perform a connector-specific operation
|
|
|
|
* on a link
|
|
|
|
*
|
|
|
|
* Return: Success: 0
|
|
|
|
* Failure: -1
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
reg_opt_link_optional(void *obj, const H5VL_loc_params_t *loc_params, H5VL_optional_args_t *args,
|
|
|
|
hid_t H5_ATTR_UNUSED dxpl_id, void H5_ATTR_UNUSED **req)
|
|
|
|
{
|
|
|
|
/* Check for receiving correct loc_params info */
|
|
|
|
if (loc_params->type != H5VL_OBJECT_BY_NAME)
|
|
|
|
return -1;
|
|
|
|
if (loc_params->obj_type != H5I_GROUP)
|
|
|
|
return -1;
|
|
|
|
if (HDstrcmp(loc_params->loc_data.loc_by_name.name, ".") != 0)
|
|
|
|
return -1;
|
|
|
|
if (loc_params->loc_data.loc_by_name.lapl_id != H5P_LINK_ACCESS_DEFAULT)
|
|
|
|
return -1;
|
|
|
|
|
|
|
|
/* Invoke the common value verification routine */
|
|
|
|
return reg_opt_op_optional_verify(obj, args);
|
|
|
|
} /* end reg_opt_link_optional() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: reg_opt_datatype_get
|
|
|
|
*
|
|
|
|
* Purpose: Handles the datatype get callback
|
|
|
|
*
|
|
|
|
* Note: This is _strictly_ a testing fixture to support the
|
|
|
|
* exercise_reg_opt_oper() testing routine. It fakes just
|
|
|
|
* enough of the named datatype VOL callback for the
|
|
|
|
* H5VL_register_using_vol_id() call in that test routine to
|
|
|
|
* succeed.
|
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
reg_opt_datatype_get(void H5_ATTR_UNUSED *obj, H5VL_datatype_get_args_t *args, hid_t H5_ATTR_UNUSED dxpl_id,
|
|
|
|
void H5_ATTR_UNUSED **req)
|
|
|
|
{
|
|
|
|
herr_t ret_value = SUCCEED; /* Return value */
|
|
|
|
|
|
|
|
if (H5VL_DATATYPE_GET_BINARY_SIZE == args->op_type) {
|
|
|
|
if (H5Tencode(H5T_NATIVE_INT, NULL, args->args.get_binary_size.size) < 0)
|
|
|
|
ret_value = FAIL;
|
|
|
|
} /* end if */
|
|
|
|
else if (H5VL_DATATYPE_GET_BINARY == args->op_type) {
|
|
|
|
if (H5Tencode(H5T_NATIVE_INT, args->args.get_binary.buf, &args->args.get_binary.buf_size) < 0)
|
|
|
|
ret_value = FAIL;
|
|
|
|
} /* end if */
|
|
|
|
else
|
|
|
|
ret_value = FAIL;
|
|
|
|
|
|
|
|
return ret_value;
|
|
|
|
} /* end reg_opt_datatype_get() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: fake_async_get_cap_flags
|
|
|
|
*
|
|
|
|
* Purpose: Return the capability flags for the 'fake async' connector
|
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
fake_async_get_cap_flags(const void H5_ATTR_UNUSED *info, unsigned *cap_flags)
|
|
|
|
{
|
|
|
|
*cap_flags = fake_async_vol_g.cap_flags;
|
|
|
|
|
|
|
|
return SUCCEED;
|
|
|
|
} /* end fake_async_get_cap_flags() */
|
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_vol_registration()
|
|
|
|
*
|
|
|
|
* Purpose: Tests if we can load, register, and close a simple
|
2018-11-04 14:27:23 +08:00
|
|
|
* VOL connector.
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_vol_registration(void)
|
|
|
|
{
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
hid_t native_id = H5I_INVALID_HID;
|
|
|
|
hid_t lapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t vipl_id = H5I_INVALID_HID;
|
|
|
|
herr_t ret = SUCCEED;
|
|
|
|
htri_t is_registered = FAIL;
|
|
|
|
hid_t vol_id = H5I_INVALID_HID;
|
|
|
|
hid_t vol_id2 = H5I_INVALID_HID;
|
2020-12-11 01:01:04 +08:00
|
|
|
H5VL_class_t *bad_fake_vol_class = NULL;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
TESTING("VOL registration");
|
|
|
|
|
2018-11-04 14:27:23 +08:00
|
|
|
/* The test/fake VOL connector should not be registered at the start of the test */
|
2020-01-29 08:18:38 +08:00
|
|
|
if ((is_registered = H5VLis_connector_registered_by_name(FAKE_VOL_NAME)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (is_registered > 0)
|
|
|
|
FAIL_PUTS_ERROR("VOL connector is inappropriately registered");
|
|
|
|
if ((is_registered = H5VLis_connector_registered_by_value(FAKE_VOL_VALUE)) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
if (is_registered > 0)
|
2019-05-25 04:39:45 +08:00
|
|
|
FAIL_PUTS_ERROR("VOL connector is inappropriately registered");
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2019-06-05 19:34:36 +08:00
|
|
|
/* Test registering a connector with an incorrect property list (SHOULD FAIL) */
|
|
|
|
if ((lapl_id = H5Pcreate(H5P_LINK_ACCESS)) < 0)
|
|
|
|
TEST_ERROR;
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
vol_id = H5VLregister_connector(&fake_vol_g, lapl_id);
|
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_END_TRY;
|
2019-06-05 19:34:36 +08:00
|
|
|
if (H5I_INVALID_HID != vol_id)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to register a connector with an incorrect property list");
|
|
|
|
if (H5Pclose(lapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2020-12-11 01:01:04 +08:00
|
|
|
/* Test registering a VOL connector with an incompatible version # */
|
|
|
|
if (NULL == (bad_fake_vol_class = HDmalloc(sizeof(H5VL_class_t))))
|
|
|
|
TEST_ERROR;
|
|
|
|
HDmemcpy(bad_fake_vol_class, &fake_vol_g, sizeof(H5VL_class_t));
|
|
|
|
bad_fake_vol_class->version = H5VL_VERSION + 1;
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
vol_id = H5VLregister_connector(bad_fake_vol_class, H5P_DEFAULT);
|
|
|
|
}
|
Bring async branch to develop (#166)
* Add H5Fwait, H5Dwait, and other changes for async vol connector
* Revert temporary testing changes
* Add H5Fwait to header file
* Add H5VLreset_lib_state() routine.
* Correct VOL wrap context when retrieving library state for file open & create.
* Manage the API context's VOL connector state as part of the library state.
* Set the 'VOL connector property valid' flag when restoring the library state.
* Don't push new API context on stack when retrieving "current" one.
* Check for NULL VOL wrap context before decrementing refcount on it, when
freeing the API context state.
* Manage recount of underlying connector for VOL wrap context.
* Add H5TSmutex_acquire() and H5TSmutex_release() routines to acquire and
release the global lock on the HDF5 library.
* Update library with new functions related to library global lock
* Add asynchronous token API
* Add new lightweight FUNC_ENTER / LEAVE macros for helping to structure the
threadsafety (H5TS*) routines.
* Sync w/develop
* Initial event set code framework.
* Elaborate on the H5ES routines, starting to add API routines.
Update the "close ID" callbacks to allow asynchronous request tokens to be
passed in from an asynchronous close API call.
Refactor current asynchronous API routines (H5Fopen/H5Fclose and
H5Dread/H5Dread) to use event sets instead of directly working with request
tokens from the application.
Clean up a few other minor warnings & code style issues.
* Implement H5EScreate, H5ESget_count, and H5ESclose.
It should be possible to write a simple application that creates an event
set and uses it with H5Fopen_async, H5Dread_async, H5Dwrite_async, and
H5Fclose_async, then calls H5ESclose (which waits for all async events to
complete).
* Add source file for event set test.
* Refactor sync & async API routines to call common routine.
Move dataset API read / write routines to src/H5D.c, along with all the other
API routines.
Progress on "fake" async VOL connector, for testing.
* Modify async implementation to wrap async requests in a H5VL_object_t
struct so the VOL layer can find the connector when accessing the
request at a later point.
* Free the requests is H5ESclose. Remove comments implying that request
wait, notify, and cancel callbacks should free the request.
* Fix bug in error handling in H5Fclose.
* Fix bugs in async file routines. Rename H5VL_create_object_generic to
H5VL_create_object.
* Add explicit async version of H5Fcreate.
* Add more _async routines
* Correct typo for return value from H5Awrite changes
* Add H5EStest and H5ESwait routines
* Updated with API tracing info
* Fix NULL pointer dereference in H5ES__wait
* Add H5is_library_terminating() routine, so that VOL connectors can detect
when the library is shutting down.
* Fix typo
* Remove event from event set's linked list
* Move block of code so that vol_obj is valid
* Avoid setting properties in the DXPL when reseting the library state (and in
the test code).
* Refactor argument tracing to implement new capability for tracing arguments
of non-API routines, with the H5ARG_TRACE macro. This macro is updated
automatically with the bin/trace script that runs as part of the autogen.sh
process. Major changes were in src/H5trace.c and bin/trace, with the other
changes being cleanups to the argument lists, to improve their presentation
in the tracing output.
Also - added the "managed string" routines, which can dynamically allocate
strings, appending printf-formatted output to the string efficiently.
* Release memory for managed strings
* Fix printf() formats.
* More printf() format fixes.
* Add H5Eappend_stack routine and regression tests
* Clean up a few missed merge conflicts and update the error stacks.
* Remove unnecessary fork() operations and ten second sleep().
* Restore commented out attribute out, to better enable tracking down the previous failure
* Allow multiple H5ARG_TRACE macros within a routine to be updated
* Switch to using "new" H5ES_insert (which takes the arguments for the caller routine) for all event set operations. Renames H5ES_insert_new to H5ES_insert and removes the previous H5ES_insert.
* Merge "managed" string routines into "ref-counted" strings, and refactor code to use them.
* Add missing file.
* Add caller's name and arguments to event, for error reporting
* Refactor event set setup for "API common" internal routines
* Checkin async API routines for H5A* and H5G* modules as listed in ID-283.
Fix couple h5dump expected output files due to the changes.
* Add some of the error query routines needed for event sets.
* Refactor to make async setup / teardown and "common" routines cleaner
* (1) Add async APIs to H5L, H5F, and H5D modules
(2) Fix errors in previous checkins of async APIs in H5A and H5G modules
(3) h5dump expected output changes
* Enhance event info, for better error handling
* Change name of temporary vol_obj variable, to help reduce coding errors
* Fix oversight with vol_obj pointer
* Minor code cleanup
* Add missing \'valid\' flag for VOL wrapper context, when restoring the library\'s state
* Run source formatter
* Change H5TSmutex lock and release to include a lock count
* Update error reporting ideas
* Minor updates to improve sanity checking for retrieving / restoring library state
* Updated with feedback from h5py team members
* Refactor internal event set list and event handling, add implementation for H5ESget_err_info
* Change the VOL request subclass callbacks that switch from using "H5ES_status_t" to "H5VL_request_status_t", and also add a H5VL_request_status_t* parameter to the 'cancel' callback in the request subclass. Also more code quality cleanups to add iterator callbacks to internal event set routines.
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Fix missed merge marker, and reformatted line
* Clean up some warnings
* Correct level of indirection
* Relocate prototype (and doxygen info) for H5Aclose
* Change non-static function declarations to be static
* Ensure that H5TSpublic.h header gets installed (#129)
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
Co-authored-by: Houjun Tang <htang4@lbl.gov>
Co-authored-by: Neil Fortner <nfortne2@hdfgroup.org>
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
2020-12-14 08:02:17 +08:00
|
|
|
H5E_END_TRY;
|
2020-12-11 01:01:04 +08:00
|
|
|
if (H5I_INVALID_HID != vol_id)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to register a connector with an incompatible version #");
|
|
|
|
HDfree(bad_fake_vol_class);
|
|
|
|
bad_fake_vol_class = NULL;
|
|
|
|
|
2019-06-05 19:34:36 +08:00
|
|
|
/* Load a VOL interface
|
|
|
|
* The vipl_id does nothing without a VOL that needs it, but we do need to
|
|
|
|
* test creating a property list of that class and passing it along as a
|
|
|
|
* smoke check.
|
|
|
|
*/
|
|
|
|
if ((vipl_id = H5Pcreate(H5P_VOL_INITIALIZE)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if ((vol_id = H5VLregister_connector(&fake_vol_g, vipl_id)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pclose(vipl_id) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2018-11-04 14:27:23 +08:00
|
|
|
/* The test/fake VOL connector should be registered now */
|
2020-01-29 08:18:38 +08:00
|
|
|
if ((is_registered = H5VLis_connector_registered_by_name(FAKE_VOL_NAME)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (0 == is_registered)
|
|
|
|
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
|
|
|
if ((is_registered = H5VLis_connector_registered_by_value(FAKE_VOL_VALUE)) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
if (0 == is_registered)
|
2019-05-25 04:39:45 +08:00
|
|
|
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2018-11-04 14:27:23 +08:00
|
|
|
/* Re-register a VOL connector */
|
|
|
|
if ((vol_id2 = H5VLregister_connector(&fake_vol_g, H5P_DEFAULT)) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2018-10-25 12:52:47 +08:00
|
|
|
|
2018-11-04 14:27:23 +08:00
|
|
|
/* The test/fake VOL connector should still be registered now */
|
2020-01-29 08:18:38 +08:00
|
|
|
if ((is_registered = H5VLis_connector_registered_by_name(FAKE_VOL_NAME)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (0 == is_registered)
|
|
|
|
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
|
|
|
if ((is_registered = H5VLis_connector_registered_by_value(FAKE_VOL_VALUE)) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2018-10-25 12:52:47 +08:00
|
|
|
if (0 == is_registered)
|
2019-05-25 04:39:45 +08:00
|
|
|
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
2018-10-25 12:52:47 +08:00
|
|
|
|
|
|
|
/* Unregister the second test/fake VOL ID */
|
2018-11-04 14:27:23 +08:00
|
|
|
if (H5VLunregister_connector(vol_id2) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2018-10-25 12:52:47 +08:00
|
|
|
|
2018-11-04 14:27:23 +08:00
|
|
|
/* The test/fake VOL connector should still be registered now */
|
2020-01-29 08:18:38 +08:00
|
|
|
if ((is_registered = H5VLis_connector_registered_by_name(FAKE_VOL_NAME)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (0 == is_registered)
|
|
|
|
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
|
|
|
if ((is_registered = H5VLis_connector_registered_by_value(FAKE_VOL_VALUE)) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2018-10-25 12:52:47 +08:00
|
|
|
if (0 == is_registered)
|
2019-05-25 04:39:45 +08:00
|
|
|
FAIL_PUTS_ERROR("VOL connector is un-registered");
|
2018-10-25 12:52:47 +08:00
|
|
|
|
|
|
|
/* Unregister the original test/fake VOL ID */
|
2018-11-04 14:27:23 +08:00
|
|
|
if (H5VLunregister_connector(vol_id) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2019-05-25 04:39:45 +08:00
|
|
|
/* Try to unregister the native VOL connector (should fail) */
|
2020-01-17 05:29:34 +08:00
|
|
|
if (H5I_INVALID_HID == (native_id = H5VLget_connector_id_by_name(H5VL_NATIVE_NAME)))
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2021-03-17 23:25:39 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLunregister_connector(native_id);
|
|
|
|
}
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_END_TRY;
|
2019-05-25 04:39:45 +08:00
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to unregister the native VOL connector");
|
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-11-04 14:27:23 +08:00
|
|
|
H5VLunregister_connector(vol_id);
|
2019-06-05 19:34:36 +08:00
|
|
|
H5Pclose(lapl_id);
|
|
|
|
H5Pclose(vipl_id);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2020-12-11 01:01:04 +08:00
|
|
|
if (bad_fake_vol_class)
|
|
|
|
HDfree(bad_fake_vol_class);
|
|
|
|
|
|
|
|
return FAIL;
|
2018-10-10 23:10:15 +08:00
|
|
|
} /* end test_vol_registration() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_native_vol_init()
|
|
|
|
*
|
2018-11-04 14:27:23 +08:00
|
|
|
* Purpose: Tests if the native VOL connector gets initialized.
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_native_vol_init(void)
|
|
|
|
{
|
|
|
|
htri_t is_registered;
|
|
|
|
|
2018-11-04 14:27:23 +08:00
|
|
|
TESTING("Native VOL connector initialization");
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2018-11-04 14:27:23 +08:00
|
|
|
/* The native VOL connector should always be registered */
|
2020-01-29 08:18:38 +08:00
|
|
|
if ((is_registered = H5VLis_connector_registered_by_name(H5VL_NATIVE_NAME)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (0 == is_registered)
|
|
|
|
FAIL_PUTS_ERROR("native VOL connector is un-registered");
|
|
|
|
|
|
|
|
if ((is_registered = H5VLis_connector_registered_by_value(H5VL_NATIVE_VALUE)) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
if (0 == is_registered)
|
2018-11-04 14:27:23 +08:00
|
|
|
FAIL_PUTS_ERROR("native VOL connector is un-registered");
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
|
|
|
return FAIL;
|
|
|
|
|
|
|
|
} /* end test_native_vol_init() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_basic_file_operation()
|
|
|
|
*
|
2018-11-04 14:27:23 +08:00
|
|
|
* Purpose: Uses the native VOL connector to test basic VOL file operations
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
2019-01-06 13:06:45 +08:00
|
|
|
test_basic_file_operation(const char *env_h5_drvr)
|
2018-10-10 23:10:15 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fid = H5I_INVALID_HID;
|
|
|
|
hid_t fid_reopen = H5I_INVALID_HID;
|
|
|
|
hid_t fapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t fapl_id2 = H5I_INVALID_HID;
|
|
|
|
hid_t fcpl_id = H5I_INVALID_HID;
|
|
|
|
|
|
|
|
char filename[1024];
|
|
|
|
ssize_t obj_count;
|
|
|
|
hid_t obj_id_list[1];
|
|
|
|
hsize_t file_size;
|
|
|
|
unsigned intent;
|
|
|
|
void * os_file_handle = NULL;
|
|
|
|
H5F_info2_t finfo;
|
|
|
|
char name[32];
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
TESTING("Basic VOL file operations");
|
|
|
|
|
2018-11-18 14:38:29 +08:00
|
|
|
/* Retrieve the file access property for testing */
|
|
|
|
fapl_id = h5_fileaccess();
|
2019-01-06 13:06:45 +08:00
|
|
|
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
|
2018-11-18 14:38:29 +08:00
|
|
|
|
|
|
|
/* Set the file close degree to a non-default value, to make the H5Pequal
|
|
|
|
* work out. This is kinda odd, but the library's current behavior with
|
|
|
|
* a default value is to return the value chosen (H5F_CLOSE_SEMI) instead
|
|
|
|
* of the default value (H5F_CLOSE_DEFAULT) from the property and then
|
|
|
|
* the H5Pequal doesn't detect that the property lists are the same. Since
|
|
|
|
* this is the documented behavior for file close degree for many years,
|
|
|
|
* I'm not fighting it, just getting the testing to verify that the VOL
|
|
|
|
* connector property is returned correctly. -QAK, 2018/11/17
|
|
|
|
*/
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pset_fclose_degree(fapl_id, H5F_CLOSE_SEMI) < 0)
|
2018-11-18 14:38:29 +08:00
|
|
|
TEST_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pset_metadata_read_attempts(fapl_id, 9) < 0)
|
2019-06-05 19:34:36 +08:00
|
|
|
TEST_ERROR
|
2018-11-18 14:38:29 +08:00
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
/* H5Fcreate */
|
2019-01-06 13:06:45 +08:00
|
|
|
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fget_obj_count */
|
|
|
|
if ((obj_count = H5Fget_obj_count(fid, H5F_OBJ_FILE)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if ((obj_count = H5Fget_obj_count(fid, H5F_OBJ_ALL)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if ((obj_count = H5Fget_obj_count((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATASET)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fget_obj_ids */
|
|
|
|
if ((obj_count = H5Fget_obj_ids(fid, H5F_OBJ_ALL, 2, obj_id_list)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if ((obj_count = H5Fget_obj_ids((hid_t)H5F_OBJ_ALL, H5F_OBJ_DATASET, 2, obj_id_list)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2021-09-30 02:28:12 +08:00
|
|
|
/* Can't compare VFD properties for several VFDs */
|
2021-03-11 02:42:35 +08:00
|
|
|
if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
|
2021-09-30 02:28:12 +08:00
|
|
|
HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
|
2021-09-30 23:37:40 +08:00
|
|
|
HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
|
|
|
|
HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
|
2019-01-06 13:06:45 +08:00
|
|
|
/* H5Fget_access_plist */
|
|
|
|
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pequal(fapl_id, fapl_id2) != TRUE)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pclose(fapl_id2) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
} /* end if */
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
/* H5Fget_create_plist */
|
|
|
|
if ((fcpl_id = H5Fget_create_plist(fid)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pclose(fcpl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fget_filesize */
|
|
|
|
if (H5Fget_filesize(fid, &file_size) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Can't retrieve VFD handle for split / multi / family VFDs */
|
2021-03-11 02:42:35 +08:00
|
|
|
if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
|
|
|
|
HDstrcmp(env_h5_drvr, "family") != 0)) {
|
2019-01-06 13:06:45 +08:00
|
|
|
/* H5Fget_vfd_handle */
|
|
|
|
if (H5Fget_vfd_handle(fid, H5P_DEFAULT, &os_file_handle) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
} /* end if */
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
/* H5Fget_intent */
|
|
|
|
if (H5Fget_intent(fid, &intent) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fget_info2 */
|
|
|
|
if (H5Fget_info2(fid, &finfo) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fget_name */
|
|
|
|
if (H5Fget_name(fid, name, 32) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fclear_elink_file_cache */
|
|
|
|
if (H5Fclear_elink_file_cache(fid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fflush */
|
|
|
|
if (H5Fflush(fid, H5F_SCOPE_GLOBAL) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fclose */
|
|
|
|
if (H5Fclose(fid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fis_accessible */
|
2019-01-06 13:06:45 +08:00
|
|
|
if (H5Fis_accessible(filename, fapl_id) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Fopen */
|
2019-01-06 13:06:45 +08:00
|
|
|
if ((fid = H5Fopen(filename, H5F_ACC_RDWR, fapl_id)) < 0)
|
2018-11-18 14:38:29 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2021-09-30 02:28:12 +08:00
|
|
|
/* Can't compare VFD properties for several VFDs */
|
2021-03-11 02:42:35 +08:00
|
|
|
if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
|
2021-09-30 02:28:12 +08:00
|
|
|
HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
|
2021-09-30 23:37:40 +08:00
|
|
|
HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
|
|
|
|
HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
|
2019-01-06 13:06:45 +08:00
|
|
|
/* H5Fget_access_plist */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((fapl_id2 = H5Fget_access_plist(fid)) < 0)
|
2019-01-06 13:06:45 +08:00
|
|
|
TEST_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pequal(fapl_id, fapl_id2) != TRUE)
|
2019-01-06 13:06:45 +08:00
|
|
|
TEST_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pclose(fapl_id2) < 0)
|
2019-01-06 13:06:45 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
} /* end if */
|
2018-11-18 14:38:29 +08:00
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
if ((fid_reopen = H5Freopen(fid)) < 0)
|
|
|
|
TEST_ERROR;
|
2018-11-18 14:38:29 +08:00
|
|
|
|
2021-09-30 02:28:12 +08:00
|
|
|
/* Can't compare VFD properties for several VFDs */
|
2021-03-11 02:42:35 +08:00
|
|
|
if ((hbool_t)(HDstrcmp(env_h5_drvr, "split") != 0 && HDstrcmp(env_h5_drvr, "multi") != 0 &&
|
2021-09-30 02:28:12 +08:00
|
|
|
HDstrcmp(env_h5_drvr, "family") != 0 && HDstrcmp(env_h5_drvr, "direct") != 0 &&
|
2021-09-30 23:37:40 +08:00
|
|
|
HDstrcmp(env_h5_drvr, "core") != 0 && HDstrcmp(env_h5_drvr, "core_paged") != 0 &&
|
|
|
|
HDstrcmp(env_h5_drvr, "mpio") != 0 && HDstrcmp(env_h5_drvr, "splitter") != 0)) {
|
2019-01-06 13:06:45 +08:00
|
|
|
/* H5Fget_access_plist */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((fapl_id2 = H5Fget_access_plist(fid_reopen)) < 0)
|
2019-01-06 13:06:45 +08:00
|
|
|
TEST_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pequal(fapl_id, fapl_id2) != TRUE)
|
2019-01-06 13:06:45 +08:00
|
|
|
TEST_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Pclose(fapl_id2) < 0)
|
2019-01-06 13:06:45 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
} /* end if */
|
2018-11-18 14:38:29 +08:00
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
if (H5Fclose(fid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Fclose(fid_reopen) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
h5_delete_test_file(FILENAME[0], fapl_id);
|
|
|
|
|
2018-11-18 14:38:29 +08:00
|
|
|
/* H5Pclose */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Fclose(fid);
|
|
|
|
H5Fclose(fid_reopen);
|
|
|
|
H5Pclose(fapl_id);
|
2018-11-18 14:38:29 +08:00
|
|
|
H5Pclose(fapl_id2);
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Pclose(fcpl_id);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
|
|
|
|
} /* end test_basic_file_operation() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_basic_group_operation()
|
|
|
|
*
|
2018-11-04 14:27:23 +08:00
|
|
|
* Purpose: Uses the native VOL connector to test basic VOL group operations
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
2021-09-30 02:28:12 +08:00
|
|
|
test_basic_group_operation(const char *env_h5_drvr)
|
2018-10-10 23:10:15 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fid = H5I_INVALID_HID;
|
|
|
|
hid_t fapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t gid = H5I_INVALID_HID;
|
|
|
|
hid_t gid_a = H5I_INVALID_HID;
|
|
|
|
hid_t gcpl_id = H5I_INVALID_HID;
|
|
|
|
char filename[1024];
|
2018-10-10 23:10:15 +08:00
|
|
|
H5G_info_t info;
|
|
|
|
|
|
|
|
TESTING("Basic VOL group operations");
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Retrieve the file access property for testing */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
|
|
|
|
|
|
|
|
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Gcreate */
|
|
|
|
if ((gid = H5Gcreate2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Gget_create_plist */
|
|
|
|
if ((gcpl_id = H5Gget_create_plist(gid)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pclose(gcpl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Gget_info */
|
|
|
|
if (H5Gget_info(gid, &info) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Gget_info(fid, &info) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Gget_info_by_name */
|
|
|
|
if (H5Gget_info_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, &info, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Gget_info_by_idx */
|
|
|
|
if (H5Gget_info_by_idx(fid, "/", H5_INDEX_NAME, H5_ITER_NATIVE, 0, &info, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2021-09-30 02:28:12 +08:00
|
|
|
/* H5Gflush - skip for MPIO file driver as flush calls cause assertions in the library */
|
|
|
|
if (HDstrcmp(env_h5_drvr, "mpio") != 0)
|
|
|
|
if (H5Gflush(gid) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
/* H5Gclose */
|
|
|
|
if (H5Gclose(gid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Gopen */
|
|
|
|
if ((gid = H5Gopen2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Gcreate_anon */
|
|
|
|
if ((gid_a = H5Gcreate_anon(fid, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Grefresh */
|
|
|
|
if (H5Grefresh(gid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
if (H5Gclose(gid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Gclose(gid_a) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Fclose(fid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
h5_delete_test_file(FILENAME[0], fapl_id);
|
|
|
|
|
|
|
|
/* H5Pclose */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Fclose(fid);
|
|
|
|
H5Gclose(gid);
|
2019-01-06 13:06:45 +08:00
|
|
|
H5Pclose(fapl_id);
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Pclose(gcpl_id);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
|
|
|
|
} /* end test_basic_group_operation() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_basic_dataset_operation()
|
|
|
|
*
|
2018-11-04 14:27:23 +08:00
|
|
|
* Purpose: Uses the native VOL connector to test basic VOL dataset operations
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
2021-09-30 02:28:12 +08:00
|
|
|
test_basic_dataset_operation(const char *env_h5_drvr)
|
2018-10-10 23:10:15 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fid = H5I_INVALID_HID;
|
|
|
|
hid_t fapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t dcpl_id = H5I_INVALID_HID;
|
|
|
|
hid_t dapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t did = H5I_INVALID_HID;
|
|
|
|
hid_t did_a = H5I_INVALID_HID;
|
|
|
|
hid_t sid = H5I_INVALID_HID;
|
|
|
|
hid_t tid = H5I_INVALID_HID;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
char filename[1024];
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
hsize_t curr_dims = 0;
|
|
|
|
hsize_t max_dims = H5S_UNLIMITED;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
hsize_t storage_size;
|
|
|
|
haddr_t offset;
|
2018-10-10 23:10:15 +08:00
|
|
|
H5D_space_status_t status;
|
|
|
|
|
|
|
|
int in_buf[N_ELEMENTS];
|
|
|
|
int out_buf[N_ELEMENTS];
|
|
|
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
TESTING("Basic VOL dataset operations");
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Retrieve the file access property for testing */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
|
|
|
|
|
|
|
|
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
for (i = 0; i < N_ELEMENTS; i++) {
|
2020-09-30 22:27:10 +08:00
|
|
|
in_buf[i] = i;
|
2018-10-10 23:10:15 +08:00
|
|
|
out_buf[i] = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* H5Dcreate */
|
|
|
|
curr_dims = 0;
|
|
|
|
if ((sid = H5Screate_simple(1, &curr_dims, &max_dims)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
curr_dims = N_ELEMENTS;
|
|
|
|
if ((dcpl_id = H5Pcreate(H5P_DATASET_CREATE)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pset_chunk(dcpl_id, 1, &curr_dims) < 0)
|
|
|
|
TEST_ERROR;
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((did = H5Dcreate2(fid, NATIVE_VOL_TEST_DATASET_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT, dcpl_id,
|
|
|
|
H5P_DEFAULT)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dcreate_anon */
|
|
|
|
if ((did_a = H5Dcreate_anon(fid, H5T_NATIVE_INT, sid, dcpl_id, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
if (H5Sclose(sid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pclose(dcpl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dset_extent */
|
|
|
|
curr_dims = N_ELEMENTS;
|
|
|
|
if (H5Dset_extent(did, &curr_dims) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2021-09-30 02:28:12 +08:00
|
|
|
/* H5Dflush - skip for MPIO file driver as flush calls cause assertions in the library */
|
|
|
|
if (HDstrcmp(env_h5_drvr, "mpio") != 0)
|
|
|
|
if (H5Dflush(did) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
/* H5Dwrite */
|
|
|
|
if (H5Dwrite(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, in_buf) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Drefresh */
|
|
|
|
if (H5Drefresh(did) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dclose */
|
|
|
|
if (H5Dclose(did) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Dclose(did_a) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dopen */
|
|
|
|
if ((did = H5Dopen2(fid, NATIVE_VOL_TEST_DATASET_NAME, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dget_space */
|
|
|
|
if ((sid = H5Dget_space(did)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Sclose(sid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dget_space_status */
|
|
|
|
if (H5Dget_space_status(did, &status) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dget_type */
|
|
|
|
if ((tid = H5Dget_type(did)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Tclose(tid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Tcopy (when used w/ a dataset, it gets an H5VL struct */
|
|
|
|
if ((tid = H5Tcopy(did)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Tclose(tid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dget_create_plist */
|
|
|
|
if ((dcpl_id = H5Dget_create_plist(did)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pclose(dcpl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dget_access_plist */
|
|
|
|
if ((dapl_id = H5Dget_access_plist(did)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Pclose(dapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dget_storage_size */
|
|
|
|
/* XXX: This is a terrible API call that can't truly indicate failure */
|
|
|
|
if (0 == (storage_size = H5Dget_storage_size(did)))
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dget_offset */
|
|
|
|
/* XXX: Another bad API call that can't flag error values. Also, this
|
|
|
|
* returns HADDR_UNDEF for chunked datasets, which is bizarre.
|
|
|
|
*/
|
|
|
|
if (HADDR_UNDEF != (offset = H5Dget_offset(did)))
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Dread */
|
|
|
|
if (H5Dread(did, H5T_NATIVE_INT, H5S_ALL, H5S_ALL, H5P_DEFAULT, out_buf) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
for (i = 0; i < N_ELEMENTS; i++)
|
|
|
|
if (in_buf[i] != out_buf[i])
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
if (H5Dclose(did) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Fclose(fid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
h5_delete_test_file(FILENAME[0], fapl_id);
|
|
|
|
|
|
|
|
/* H5Pclose */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Fclose(fid);
|
|
|
|
H5Dclose(did);
|
|
|
|
H5Dclose(did_a);
|
|
|
|
H5Sclose(sid);
|
|
|
|
H5Tclose(tid);
|
2019-01-06 13:06:45 +08:00
|
|
|
H5Pclose(fapl_id);
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Pclose(dapl_id);
|
|
|
|
H5Pclose(dcpl_id);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
|
|
|
|
} /* end test_basic_dataset_operation() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_basic_attribute_operation()
|
|
|
|
*
|
2018-11-04 14:27:23 +08:00
|
|
|
* Purpose: Uses the native VOL connector to test basic VOL attribute operations
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_basic_attribute_operation(void)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fid = H5I_INVALID_HID;
|
|
|
|
hid_t fapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t gid = H5I_INVALID_HID;
|
|
|
|
hid_t aid = H5I_INVALID_HID;
|
|
|
|
hid_t aid_name = H5I_INVALID_HID;
|
|
|
|
hid_t sid = H5I_INVALID_HID;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
char filename[1024];
|
2019-01-06 13:06:45 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
hsize_t dims = 1;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
int data_in = 42;
|
|
|
|
int data_out = 0;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
TESTING("Basic VOL attribute operations");
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Retrieve the file access property for testing */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
|
|
|
|
|
|
|
|
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
if ((gid = H5Gcreate2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
dims = 1;
|
|
|
|
if ((sid = H5Screate_simple(1, &dims, &dims)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Acreate */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((aid = H5Acreate2(fid, NATIVE_VOL_TEST_ATTRIBUTE_NAME, H5T_NATIVE_INT, sid, H5P_DEFAULT,
|
|
|
|
H5P_DEFAULT)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Awrite */
|
|
|
|
if (H5Awrite(aid, H5T_NATIVE_INT, &data_in) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Aread */
|
|
|
|
if (H5Aread(aid, H5T_NATIVE_INT, &data_out) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (data_in != data_out)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Aclose */
|
|
|
|
if (H5Aclose(aid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Aopen */
|
|
|
|
if ((aid = H5Aopen(fid, NATIVE_VOL_TEST_ATTRIBUTE_NAME, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Aclose(aid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Adelete */
|
|
|
|
if (H5Adelete(fid, NATIVE_VOL_TEST_ATTRIBUTE_NAME) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Acreate_by_name */
|
2020-09-30 22:27:10 +08:00
|
|
|
if ((aid_name = H5Acreate_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, NATIVE_VOL_TEST_ATTRIBUTE_NAME,
|
|
|
|
H5T_NATIVE_INT, sid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
/* H5Aclose */
|
|
|
|
if (H5Aclose(aid_name) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Adelete_by_name */
|
|
|
|
if (H5Adelete_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, NATIVE_VOL_TEST_ATTRIBUTE_NAME, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
if (H5Sclose(sid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Gclose(gid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Fclose(fid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
h5_delete_test_file(FILENAME[0], fapl_id);
|
|
|
|
|
|
|
|
/* H5Pclose */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Fclose(fid);
|
2019-01-06 13:06:45 +08:00
|
|
|
H5Pclose(fapl_id);
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Gclose(gid);
|
|
|
|
H5Sclose(sid);
|
|
|
|
H5Aclose(aid);
|
|
|
|
H5Aclose(aid_name);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
|
|
|
|
} /* end test_basic_attribute_operation() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_basic_object_operation()
|
|
|
|
*
|
2018-11-04 14:27:23 +08:00
|
|
|
* Purpose: Uses the native VOL connector to test basic VOL object operations
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_basic_object_operation(void)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fid = H5I_INVALID_HID;
|
|
|
|
hid_t fapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t gid = H5I_INVALID_HID;
|
|
|
|
hid_t oid = H5I_INVALID_HID;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
char filename[1024];
|
2020-01-17 05:29:34 +08:00
|
|
|
H5O_info2_t object_info;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
TESTING("Basic VOL object operations");
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Retrieve the file access property for testing */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
|
|
|
|
|
|
|
|
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
if ((gid = H5Gcreate2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Oget_info */
|
2020-01-17 05:29:34 +08:00
|
|
|
if (H5Oget_info3(fid, &object_info, H5O_INFO_ALL) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2021-01-08 06:16:00 +08:00
|
|
|
//! [H5Oget_info_by_name3_snip]
|
2020-12-16 11:18:54 +08:00
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
/* H5Oget_info_by_name */
|
2020-01-17 05:29:34 +08:00
|
|
|
if (H5Oget_info_by_name3(fid, NATIVE_VOL_TEST_GROUP_NAME, &object_info, H5O_INFO_ALL, H5P_DEFAULT) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
2021-01-08 06:16:00 +08:00
|
|
|
//! [H5Oget_info_by_name3_snip]
|
2020-12-16 11:18:54 +08:00
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
/* H5Oexists_by_name */
|
2020-04-21 07:12:00 +08:00
|
|
|
if (H5Oexists_by_name(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT) != TRUE)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Oopen/close */
|
2020-04-21 07:12:00 +08:00
|
|
|
if ((oid = H5Oopen(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Oclose(oid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
if (H5Gclose(gid) < 0)
|
|
|
|
TEST_ERROR;
|
2021-09-30 02:28:12 +08:00
|
|
|
if (H5Fclose(fid) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
h5_delete_test_file(FILENAME[0], fapl_id);
|
|
|
|
|
|
|
|
/* H5Pclose */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Fclose(fid);
|
2019-01-06 13:06:45 +08:00
|
|
|
H5Pclose(fapl_id);
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Gclose(gid);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
|
|
|
|
} /* end test_basic_object_operation() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_basic_link_operation()
|
|
|
|
*
|
2018-11-04 14:27:23 +08:00
|
|
|
* Purpose: Uses the native VOL connector to test basic VOL link operations
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_basic_link_operation(void)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fid = H5I_INVALID_HID;
|
|
|
|
hid_t gid = H5I_INVALID_HID;
|
|
|
|
hid_t fapl_id = H5I_INVALID_HID;
|
|
|
|
char filename[1024];
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
TESTING("Basic VOL link operations");
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Retrieve the file access property for testing */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
|
|
|
|
|
|
|
|
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
if ((gid = H5Gcreate2(fid, NATIVE_VOL_TEST_GROUP_NAME, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Lcreate_hard */
|
|
|
|
if (H5Lcreate_hard(fid, "/", gid, NATIVE_VOL_TEST_HARD_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Lcreate_soft (to itself) */
|
|
|
|
if (H5Lcreate_soft("/", fid, NATIVE_VOL_TEST_SOFT_LINK_NAME, H5P_DEFAULT, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Lexists */
|
|
|
|
if (H5Lexists(gid, NATIVE_VOL_TEST_HARD_LINK_NAME, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Lexists(fid, NATIVE_VOL_TEST_SOFT_LINK_NAME, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Lcopy */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Lcopy(gid, NATIVE_VOL_TEST_HARD_LINK_NAME, fid, NATIVE_VOL_TEST_COPY_LINK_NAME, H5P_DEFAULT,
|
|
|
|
H5P_DEFAULT) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Lmove */
|
2020-09-30 22:27:10 +08:00
|
|
|
if (H5Lmove(fid, NATIVE_VOL_TEST_COPY_LINK_NAME, gid, NATIVE_VOL_TEST_MOVE_LINK_NAME, H5P_DEFAULT,
|
|
|
|
H5P_DEFAULT) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
if (H5Gclose(gid) < 0)
|
|
|
|
TEST_ERROR;
|
2021-09-30 02:28:12 +08:00
|
|
|
if (H5Fclose(fid) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
h5_delete_test_file(FILENAME[0], fapl_id);
|
|
|
|
|
|
|
|
/* H5Pclose */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Fclose(fid);
|
|
|
|
H5Fclose(gid);
|
2019-01-06 13:06:45 +08:00
|
|
|
H5Pclose(fapl_id);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
|
|
|
|
} /* end test_basic_link_operation() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_basic_datatype_operation()
|
|
|
|
*
|
2018-11-04 14:27:23 +08:00
|
|
|
* Purpose: Uses the native VOL connector to test basic VOL datatype operations
|
2018-10-10 23:10:15 +08:00
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
2021-09-30 02:28:12 +08:00
|
|
|
test_basic_datatype_operation(const char *env_h5_drvr)
|
2018-10-10 23:10:15 +08:00
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
hid_t fid = H5I_INVALID_HID;
|
|
|
|
hid_t fapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t tid = H5I_INVALID_HID;
|
|
|
|
hid_t tid_anon = H5I_INVALID_HID;
|
|
|
|
hid_t tcpl_id = H5I_INVALID_HID;
|
|
|
|
char filename[1024];
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
TESTING("Basic VOL datatype operations");
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Retrieve the file access property for testing */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
h5_fixname(FILENAME[0], fapl_id, filename, sizeof filename);
|
|
|
|
|
|
|
|
if ((fid = H5Fcreate(filename, H5F_ACC_TRUNC, H5P_DEFAULT, fapl_id)) < 0)
|
2018-10-10 23:10:15 +08:00
|
|
|
TEST_ERROR;
|
|
|
|
if ((tid = H5Tcopy(H5T_NATIVE_INT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Tcommit */
|
|
|
|
if (H5Tcommit2(fid, NATIVE_VOL_TEST_DATATYPE_NAME, tid, H5P_DEFAULT, H5P_DEFAULT, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2021-09-30 02:28:12 +08:00
|
|
|
/* H5Tflush - skip for MPIO file driver as flush calls cause assertions in the library */
|
|
|
|
if (HDstrcmp(env_h5_drvr, "mpio") != 0)
|
|
|
|
if (H5Tflush(tid) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
/* H5Trefresh */
|
|
|
|
if (H5Trefresh(tid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Tclose */
|
|
|
|
if (H5Tclose(tid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Topen */
|
|
|
|
if ((tid = H5Topen2(fid, NATIVE_VOL_TEST_DATATYPE_NAME, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Tget_create_plist */
|
|
|
|
if ((tcpl_id = H5Tget_create_plist(tid)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* H5Tcommit_anon */
|
|
|
|
if ((tid_anon = H5Tcopy(H5T_NATIVE_INT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Tcommit_anon(fid, tid_anon, H5P_DEFAULT, H5P_DEFAULT) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
if (H5Pclose(tcpl_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Tclose(tid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Tclose(tid_anon) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5Fclose(fid) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
h5_delete_test_file(FILENAME[0], fapl_id);
|
|
|
|
|
|
|
|
/* H5Pclose */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
TEST_ERROR;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
PASSED();
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
2020-09-30 22:27:10 +08:00
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Pclose(tcpl_id);
|
|
|
|
H5Fclose(fid);
|
2019-01-06 13:06:45 +08:00
|
|
|
H5Pclose(fapl_id);
|
2018-10-10 23:10:15 +08:00
|
|
|
H5Tclose(tid);
|
|
|
|
H5Tclose(tid_anon);
|
2020-09-30 22:27:10 +08:00
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
|
|
|
|
} /* end test_basic_datatype_operation() */
|
|
|
|
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
typedef herr_t (*reg_opt_obj_oper_t)(const char *app_file, const char *app_func, unsigned app_line,
|
|
|
|
hid_t obj_id, H5VL_optional_args_t *args, hid_t dxpl_id, hid_t es_id);
|
|
|
|
typedef herr_t (*reg_opt_link_oper_t)(const char *app_file, const char *app_func, unsigned app_line,
|
|
|
|
hid_t obj_id, const char *name, hid_t lapl_id,
|
|
|
|
H5VL_optional_args_t *args, hid_t dxpl_id, hid_t es_id);
|
|
|
|
typedef union {
|
|
|
|
reg_opt_obj_oper_t obj_op;
|
|
|
|
reg_opt_link_oper_t link_op;
|
|
|
|
} reg_opt_oper_t;
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: exercise_reg_opt_oper()
|
|
|
|
*
|
|
|
|
* Purpose: Exercise a particular optional operation for a type.
|
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
exercise_reg_opt_oper(hid_t fake_vol_id, hid_t reg_opt_vol_id, H5VL_subclass_t subcls,
|
|
|
|
const char *subcls_name, H5I_type_t id_type, reg_opt_oper_t reg_opt_op)
|
|
|
|
{
|
|
|
|
char op_name[256]; /* Operation name to register */
|
|
|
|
hid_t obj_id = H5I_INVALID_HID;
|
|
|
|
H5VL_object_t * vol_obj;
|
|
|
|
H5VL_optional_args_t vol_cb_args;
|
|
|
|
int fake_obj, fake_arg;
|
|
|
|
int op_val = -1, op_val2 = -1;
|
|
|
|
int find_op_val;
|
|
|
|
herr_t ret = SUCCEED;
|
|
|
|
|
|
|
|
/* Test registering optional operation */
|
|
|
|
HDsnprintf(op_name, sizeof(op_name), "%s-op1", subcls_name);
|
|
|
|
if (H5VLregister_opt_operation(subcls, op_name, &op_val) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Verify that the reserved amount of optional operations is obeyed */
|
|
|
|
/* (The first optional operation registered should be at the lower limit) */
|
|
|
|
if (op_val != H5VL_RESERVED_NATIVE_OPTIONAL)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Look up 1st registered optional operation */
|
|
|
|
find_op_val = 0;
|
|
|
|
if (H5VLfind_opt_operation(subcls, op_name, &find_op_val) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Verify that the operation was looked up successfully */
|
|
|
|
if (op_val != find_op_val)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Test registering second optional operation */
|
|
|
|
HDsnprintf(op_name, sizeof(op_name), "%s-op2", subcls_name);
|
|
|
|
if (H5VLregister_opt_operation(subcls, op_name, &op_val2) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Verify that the reserved amount of optional operations is obeyed */
|
|
|
|
/* (The 2nd optional operation registered should be at the lower limit + 1) */
|
|
|
|
if (op_val2 != (H5VL_RESERVED_NATIVE_OPTIONAL + 1))
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Look up 2nd registered optional operation */
|
|
|
|
find_op_val = 0;
|
|
|
|
if (H5VLfind_opt_operation(subcls, op_name, &find_op_val) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Verify that the operation was looked up successfully */
|
|
|
|
if (op_val2 != find_op_val)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Push a new API context on the stack */
|
|
|
|
/* (Necessary for the named datatype construction routines) */
|
|
|
|
if (H5VL_SUBCLS_DATATYPE == subcls)
|
|
|
|
H5CX_push();
|
|
|
|
|
|
|
|
/* Create fake object on fake VOL connector */
|
|
|
|
if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, fake_vol_id, TRUE)))
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Pop the API context off the stack */
|
|
|
|
if (H5VL_SUBCLS_DATATYPE == subcls)
|
|
|
|
H5CX_pop(FALSE);
|
|
|
|
|
|
|
|
/* Attempt to issue operation on fake VOL connector */
|
|
|
|
fake_obj = -1;
|
|
|
|
fake_arg = -1;
|
|
|
|
vol_cb_args.op_type = op_val;
|
|
|
|
vol_cb_args.args = &fake_arg;
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
if (H5VL_SUBCLS_LINK == subcls || H5VL_SUBCLS_OBJECT == subcls)
|
|
|
|
ret = (*reg_opt_op.link_op)(__FILE__, __func__, __LINE__, obj_id, ".", H5P_DEFAULT, &vol_cb_args,
|
|
|
|
H5P_DEFAULT, H5ES_NONE);
|
|
|
|
else
|
|
|
|
ret = (*reg_opt_op.obj_op)(__FILE__, __func__, __LINE__, obj_id, &vol_cb_args, H5P_DEFAULT,
|
|
|
|
H5ES_NONE);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to perform an optional operation with a NULL callback");
|
|
|
|
if ((-1) != fake_obj)
|
|
|
|
FAIL_PUTS_ERROR("'fake_obj' changed during failed operation?");
|
|
|
|
if ((-1) != fake_arg)
|
|
|
|
FAIL_PUTS_ERROR("'fake_arg' changed during failed operation?");
|
|
|
|
|
|
|
|
/* Named datatypes must be destroyed differently */
|
|
|
|
if (H5VL_SUBCLS_DATATYPE == subcls) {
|
|
|
|
H5T_t *dt;
|
|
|
|
|
|
|
|
/* Destroy fake datatype object */
|
|
|
|
if (NULL == (dt = H5I_remove(obj_id)))
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5VL_free_object(dt->vol_obj) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
dt->vol_obj = NULL;
|
|
|
|
if (H5T_close(dt) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
} /* end if */
|
|
|
|
else {
|
|
|
|
/* Destroy fake object */
|
|
|
|
if (NULL == (vol_obj = H5I_remove(obj_id)))
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5VL_free_object(vol_obj) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
} /* end else */
|
|
|
|
|
|
|
|
/* Push a new API context on the stack */
|
|
|
|
/* (Necessary for the named datatype construction routines) */
|
|
|
|
if (H5VL_SUBCLS_DATATYPE == subcls)
|
|
|
|
H5CX_push();
|
|
|
|
|
|
|
|
/* Create fake object on reg_opt VOL connector */
|
|
|
|
if (H5I_INVALID_HID == (obj_id = H5VL_register_using_vol_id(id_type, &fake_obj, reg_opt_vol_id, TRUE)))
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Pop the API context off the stack */
|
|
|
|
if (H5VL_SUBCLS_DATATYPE == subcls)
|
|
|
|
H5CX_pop(FALSE);
|
|
|
|
|
|
|
|
/* Issue first operation */
|
|
|
|
fake_obj = -1;
|
|
|
|
fake_arg = -1;
|
|
|
|
reg_opt_curr_op_val = op_val;
|
|
|
|
vol_cb_args.op_type = op_val;
|
|
|
|
vol_cb_args.args = &fake_arg;
|
|
|
|
if (H5VL_SUBCLS_LINK == subcls || H5VL_SUBCLS_OBJECT == subcls)
|
|
|
|
ret = (*reg_opt_op.link_op)(__FILE__, __func__, __LINE__, obj_id, ".", H5P_DEFAULT, &vol_cb_args,
|
|
|
|
H5P_DEFAULT, H5ES_NONE);
|
|
|
|
else
|
|
|
|
ret =
|
|
|
|
(*reg_opt_op.obj_op)(__FILE__, __func__, __LINE__, obj_id, &vol_cb_args, H5P_DEFAULT, H5ES_NONE);
|
|
|
|
if (ret < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Verify that fake object & argument were modified correctly */
|
|
|
|
if (op_val != fake_obj)
|
|
|
|
FAIL_PUTS_ERROR("'fake_obj' not updated");
|
|
|
|
if (op_val != fake_arg)
|
|
|
|
FAIL_PUTS_ERROR("'fake_arg' not updated");
|
|
|
|
|
|
|
|
/* Issue second operation */
|
|
|
|
fake_obj = -1;
|
|
|
|
fake_arg = -1;
|
|
|
|
reg_opt_curr_op_val = op_val2;
|
|
|
|
vol_cb_args.op_type = op_val2;
|
|
|
|
vol_cb_args.args = &fake_arg;
|
|
|
|
if (H5VL_SUBCLS_LINK == subcls || H5VL_SUBCLS_OBJECT == subcls)
|
|
|
|
ret = (*reg_opt_op.link_op)(__FILE__, __func__, __LINE__, obj_id, ".", H5P_DEFAULT, &vol_cb_args,
|
|
|
|
H5P_DEFAULT, H5ES_NONE);
|
|
|
|
else
|
|
|
|
ret =
|
|
|
|
(*reg_opt_op.obj_op)(__FILE__, __func__, __LINE__, obj_id, &vol_cb_args, H5P_DEFAULT, H5ES_NONE);
|
|
|
|
if (ret < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Verify that fake object & argument were modified correctly */
|
|
|
|
if (op_val2 != fake_obj)
|
|
|
|
FAIL_PUTS_ERROR("'fake_obj' not updated");
|
|
|
|
if (op_val2 != fake_arg)
|
|
|
|
FAIL_PUTS_ERROR("'fake_arg' not updated");
|
|
|
|
|
|
|
|
/* Named datatypes must be destroyed differently */
|
|
|
|
if (H5VL_SUBCLS_DATATYPE == subcls) {
|
|
|
|
H5T_t *dt;
|
|
|
|
|
|
|
|
/* Destroy fake datatype object */
|
|
|
|
if (NULL == (dt = H5I_remove(obj_id)))
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5VL_free_object(dt->vol_obj) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
dt->vol_obj = NULL;
|
|
|
|
if (H5T_close(dt) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
} /* end if */
|
|
|
|
else {
|
|
|
|
/* Destroy fake object */
|
|
|
|
if (NULL == (vol_obj = H5I_remove(obj_id)))
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5VL_free_object(vol_obj) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
} /* end else */
|
|
|
|
|
|
|
|
/* Unregister 2nd registered optional operation */
|
|
|
|
if (H5VLunregister_opt_operation(subcls, op_name) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
|
|
|
return FAIL;
|
|
|
|
} /* end exercise_reg_opt_oper() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_register_opt_operation()
|
|
|
|
*
|
|
|
|
* Purpose: Tests if we can load, register, and close a simple
|
|
|
|
* VOL connector.
|
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_register_opt_operation(void)
|
|
|
|
{
|
|
|
|
hid_t fake_vol_id = H5I_INVALID_HID;
|
|
|
|
hid_t reg_opt_vol_id = H5I_INVALID_HID;
|
|
|
|
struct {
|
|
|
|
H5VL_subclass_t subcls;
|
|
|
|
const char * subcls_name;
|
|
|
|
H5I_type_t id_type;
|
|
|
|
reg_opt_oper_t reg_opt_op;
|
|
|
|
} test_params[] = {{H5VL_SUBCLS_ATTR, "attr", H5I_ATTR, {.obj_op = H5VLattr_optional_op}},
|
|
|
|
{H5VL_SUBCLS_DATASET, "dataset", H5I_DATASET, {.obj_op = H5VLdataset_optional_op}},
|
|
|
|
{H5VL_SUBCLS_DATATYPE, "datatype", H5I_DATATYPE, {.obj_op = H5VLdatatype_optional_op}},
|
|
|
|
{H5VL_SUBCLS_FILE, "file", H5I_FILE, {.obj_op = H5VLfile_optional_op}},
|
|
|
|
{H5VL_SUBCLS_GROUP, "group", H5I_GROUP, {.obj_op = H5VLgroup_optional_op}},
|
|
|
|
{H5VL_SUBCLS_LINK, "link", H5I_GROUP, {.link_op = H5VLlink_optional_op}},
|
|
|
|
{H5VL_SUBCLS_OBJECT, "object", H5I_GROUP, {.link_op = H5VLobject_optional_op}}};
|
|
|
|
int op_val = -1;
|
|
|
|
unsigned u;
|
|
|
|
herr_t ret = SUCCEED;
|
|
|
|
|
|
|
|
TESTING("dynamically registering optional operations");
|
|
|
|
|
|
|
|
/* Register the VOL connectors for testing */
|
|
|
|
if ((fake_vol_id = H5VLregister_connector(&fake_vol_g, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if ((reg_opt_vol_id = H5VLregister_connector(®_opt_vol_g, H5P_DEFAULT)) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Test registering invalid optional VOL subclass operations */
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLregister_opt_operation(H5VL_SUBCLS_NONE, "fail", &op_val);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to register an optional operation for the 'NONE' VOL subclass");
|
|
|
|
if ((-1) != op_val)
|
|
|
|
FAIL_PUTS_ERROR("'op_val' changed during failed operation?");
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLregister_opt_operation(H5VL_SUBCLS_INFO, "fail2", &op_val);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to register an optional operation for the 'INFO' VOL subclass");
|
|
|
|
if ((-1) != op_val)
|
|
|
|
FAIL_PUTS_ERROR("'op_val' changed during failed operation?");
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLregister_opt_operation(H5VL_SUBCLS_WRAP, "fail3", &op_val);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to register an optional operation for the 'WRAP' VOL subclass");
|
|
|
|
if ((-1) != op_val)
|
|
|
|
FAIL_PUTS_ERROR("'op_val' changed during failed operation?");
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLregister_opt_operation(H5VL_SUBCLS_BLOB, "fail4", &op_val);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to register an optional operation for the 'BLOB' VOL subclass");
|
|
|
|
if ((-1) != op_val)
|
|
|
|
FAIL_PUTS_ERROR("'op_val' changed during failed operation?");
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLregister_opt_operation(H5VL_SUBCLS_TOKEN, "fail5", &op_val);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to register an optional operation for the 'TOKEN' VOL subclass");
|
|
|
|
if ((-1) != op_val)
|
|
|
|
FAIL_PUTS_ERROR("'op_val' changed during failed operation?");
|
|
|
|
|
|
|
|
/* Test registering valid optional VOL subclass operation with NULL op_val ptr*/
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLregister_opt_operation(H5VL_SUBCLS_FILE, "fail6", NULL);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to register an optional operation with a NULL 'op_val'");
|
|
|
|
|
|
|
|
/* Try finding a non-existent optional VOL subclass operation */
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLfind_opt_operation(H5VL_SUBCLS_DATASET, "fail", &op_val);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to find a non-existent optional operation");
|
|
|
|
|
|
|
|
/* Try unregistering a non-existent optional VOL subclass operation */
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
ret = H5VLunregister_opt_operation(H5VL_SUBCLS_DATASET, "fail");
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
if (FAIL != ret)
|
|
|
|
FAIL_PUTS_ERROR("should not be able to unregister a non-existent optional operation");
|
|
|
|
|
|
|
|
/* Optional operations on requests are supported (but difficult to test further) */
|
|
|
|
if (H5VLregister_opt_operation(H5VL_SUBCLS_REQUEST, "req_op", &op_val) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Register & test calling optional operations for each valid VOL subclass */
|
|
|
|
/* (Table-driven, with test_params array) */
|
|
|
|
for (u = 0; u < NELMTS(test_params); u++)
|
|
|
|
/* Exercise appropriate callback, for each VOL subclass */
|
|
|
|
if (exercise_reg_opt_oper(fake_vol_id, reg_opt_vol_id, test_params[u].subcls,
|
|
|
|
test_params[u].subcls_name, test_params[u].id_type,
|
|
|
|
test_params[u].reg_opt_op) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Unregister the VOL connectors */
|
|
|
|
if (H5VLunregister_connector(fake_vol_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
if (H5VLunregister_connector(reg_opt_vol_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
PASSED();
|
|
|
|
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
H5VLunregister_connector(fake_vol_id);
|
|
|
|
H5VLunregister_connector(reg_opt_vol_id);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
} /* end test_register_opt_operation() */
|
|
|
|
|
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: test_async_vol_props()
|
|
|
|
*
|
|
|
|
* Purpose: Test properties related to asynchronous VOL connector operation
|
|
|
|
*
|
|
|
|
* Note: Overrides the HDF5_VOL_CONNECTOR environment variable, to
|
|
|
|
* provide stable testing environment.
|
|
|
|
*
|
|
|
|
* Return: SUCCEED/FAIL
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
static herr_t
|
|
|
|
test_async_vol_props(void)
|
|
|
|
{
|
|
|
|
hid_t fapl_id = H5I_INVALID_HID;
|
|
|
|
hid_t vol_id = H5I_INVALID_HID;
|
|
|
|
H5VL_pass_through_info_t passthru_info;
|
|
|
|
unsigned cap_flags = 0;
|
|
|
|
char * conn_env_str = NULL;
|
|
|
|
|
|
|
|
TESTING("Async VOL props");
|
|
|
|
|
|
|
|
/* Retrieve the file access property for testing */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
|
|
|
|
/* Test 'capability flags' property */
|
|
|
|
|
|
|
|
/* Test query w/NULL for cap_flags parameter */
|
|
|
|
if (H5Pget_vol_cap_flags(fapl_id, NULL) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
|
|
|
|
/* Override possible environment variable & re-initialize default VOL connector */
|
2021-09-30 02:28:12 +08:00
|
|
|
conn_env_str = HDgetenv(HDF5_VOL_CONNECTOR);
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
if (conn_env_str) {
|
|
|
|
if (NULL == (conn_env_str = HDstrdup(conn_env_str)))
|
|
|
|
TEST_ERROR
|
2021-09-30 02:28:12 +08:00
|
|
|
if (HDunsetenv(HDF5_VOL_CONNECTOR) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
TEST_ERROR
|
|
|
|
if (H5VL__reparse_def_vol_conn_variable_test() < 0)
|
|
|
|
TEST_ERROR
|
|
|
|
} /* end if */
|
|
|
|
|
|
|
|
/* Test query w/default VOL, which should indicate no async, since native connector
|
|
|
|
* doesn't support async.
|
|
|
|
*/
|
|
|
|
if (H5Pget_vol_cap_flags(fapl_id, &cap_flags) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
if ((cap_flags & H5VL_CAP_FLAG_ASYNC) > 0)
|
|
|
|
TEST_ERROR
|
|
|
|
if ((cap_flags & H5VL_CAP_FLAG_NATIVE_FILES) == 0)
|
|
|
|
TEST_ERROR
|
|
|
|
|
|
|
|
/* Close FAPL */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
|
|
|
|
/* Register a fake VOL connector that sets the async capability flag */
|
|
|
|
if ((vol_id = H5VLregister_connector(&fake_async_vol_g, H5P_DEFAULT)) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
|
|
|
|
/* Set environment variable to use 'fake async' connector & re-init default connector */
|
2021-09-30 02:28:12 +08:00
|
|
|
if (HDsetenv(HDF5_VOL_CONNECTOR, "fake_async", TRUE) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
TEST_ERROR
|
|
|
|
if (H5VL__reparse_def_vol_conn_variable_test() < 0)
|
|
|
|
TEST_ERROR
|
|
|
|
|
|
|
|
/* Retrieve the file access property again */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
|
|
|
|
/* Test query w/fake async VOL, which should succeed */
|
|
|
|
cap_flags = 0;
|
|
|
|
if (H5Pget_vol_cap_flags(fapl_id, &cap_flags) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
if ((cap_flags & H5VL_CAP_FLAG_ASYNC) == 0)
|
|
|
|
TEST_ERROR
|
|
|
|
if ((cap_flags & H5VL_CAP_FLAG_NATIVE_FILES) > 0)
|
|
|
|
TEST_ERROR
|
|
|
|
|
|
|
|
/* Reset environment variable & re-init default connector */
|
2021-09-30 02:28:12 +08:00
|
|
|
if (HDunsetenv(HDF5_VOL_CONNECTOR) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
TEST_ERROR
|
|
|
|
if (H5VL__reparse_def_vol_conn_variable_test() < 0)
|
|
|
|
TEST_ERROR
|
|
|
|
|
|
|
|
/* Close FAPL */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
|
|
|
|
/* Retrieve the file access property again */
|
|
|
|
fapl_id = h5_fileaccess();
|
|
|
|
|
|
|
|
/* Set the VOL connector for the FAPL to the fake async connector */
|
|
|
|
if (H5Pset_vol(fapl_id, vol_id, NULL) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
|
|
|
|
/* Test query w/fake async VOL, which should succeed */
|
|
|
|
cap_flags = 0;
|
|
|
|
if (H5Pget_vol_cap_flags(fapl_id, &cap_flags) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
if ((cap_flags & H5VL_CAP_FLAG_ASYNC) == 0)
|
|
|
|
TEST_ERROR
|
|
|
|
if ((cap_flags & H5VL_CAP_FLAG_NATIVE_FILES) > 0)
|
|
|
|
TEST_ERROR
|
|
|
|
|
|
|
|
/* Stack the [internal] passthrough VOL connector on top of the fake async connector */
|
|
|
|
passthru_info.under_vol_id = vol_id;
|
|
|
|
passthru_info.under_vol_info = NULL;
|
|
|
|
if (H5Pset_vol(fapl_id, H5VL_PASSTHRU, &passthru_info) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
|
|
|
|
/* Test query w/passthru -> fake async VOL, which should succeed */
|
|
|
|
cap_flags = 0;
|
|
|
|
if (H5Pget_vol_cap_flags(fapl_id, &cap_flags) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
if ((cap_flags & H5VL_CAP_FLAG_ASYNC) == 0)
|
|
|
|
TEST_ERROR
|
|
|
|
if ((cap_flags & H5VL_CAP_FLAG_NATIVE_FILES) > 0)
|
|
|
|
TEST_ERROR
|
|
|
|
|
|
|
|
/* Unregister the fake async VOL ID */
|
|
|
|
if (H5VLunregister_connector(vol_id) < 0)
|
|
|
|
TEST_ERROR;
|
|
|
|
|
|
|
|
/* Close FAPL */
|
|
|
|
if (H5Pclose(fapl_id) < 0)
|
|
|
|
FAIL_STACK_ERROR;
|
|
|
|
|
|
|
|
/* Restore environment variable, if there was one */
|
|
|
|
if (conn_env_str) {
|
2021-09-30 02:28:12 +08:00
|
|
|
if (HDsetenv(HDF5_VOL_CONNECTOR, conn_env_str, TRUE) < 0)
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
TEST_ERROR
|
|
|
|
HDfree(conn_env_str);
|
|
|
|
|
|
|
|
if (H5VL__reparse_def_vol_conn_variable_test() < 0)
|
|
|
|
TEST_ERROR
|
|
|
|
} /* end if */
|
|
|
|
|
|
|
|
PASSED();
|
|
|
|
|
|
|
|
return SUCCEED;
|
|
|
|
|
|
|
|
error:
|
|
|
|
H5E_BEGIN_TRY
|
|
|
|
{
|
|
|
|
H5Pclose(fapl_id);
|
|
|
|
H5VLunregister_connector(vol_id);
|
|
|
|
}
|
|
|
|
H5E_END_TRY;
|
|
|
|
HDfree(conn_env_str);
|
|
|
|
|
|
|
|
return FAIL;
|
|
|
|
} /* end test_async_vol_props() */
|
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
/*-------------------------------------------------------------------------
|
|
|
|
* Function: main
|
|
|
|
*
|
|
|
|
* Purpose: Tests the virtual object layer interface (H5VL)
|
|
|
|
*
|
|
|
|
* Return: EXIT_SUCCESS/EXIT_FAILURE
|
|
|
|
*
|
|
|
|
*-------------------------------------------------------------------------
|
|
|
|
*/
|
|
|
|
int
|
|
|
|
main(void)
|
|
|
|
{
|
2020-09-30 22:27:10 +08:00
|
|
|
const char *env_h5_drvr; /* File driver value from environment */
|
|
|
|
int nerrors = 0;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
2019-01-06 13:06:45 +08:00
|
|
|
/* Get the VFD to use */
|
2021-09-30 02:28:12 +08:00
|
|
|
env_h5_drvr = HDgetenv(HDF5_DRIVER);
|
2020-09-30 22:27:10 +08:00
|
|
|
if (env_h5_drvr == NULL)
|
2019-01-06 13:06:45 +08:00
|
|
|
env_h5_drvr = "nomatch";
|
|
|
|
|
2018-10-10 23:10:15 +08:00
|
|
|
h5_reset();
|
|
|
|
|
|
|
|
HDputs("Testing basic Virtual Object Layer (VOL) functionality.");
|
|
|
|
|
2020-09-30 22:27:10 +08:00
|
|
|
nerrors += test_vol_registration() < 0 ? 1 : 0;
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
nerrors += test_register_opt_operation() < 0 ? 1 : 0;
|
2020-09-30 22:27:10 +08:00
|
|
|
nerrors += test_native_vol_init() < 0 ? 1 : 0;
|
2019-01-06 13:06:45 +08:00
|
|
|
nerrors += test_basic_file_operation(env_h5_drvr) < 0 ? 1 : 0;
|
2021-09-30 02:28:12 +08:00
|
|
|
nerrors += test_basic_group_operation(env_h5_drvr) < 0 ? 1 : 0;
|
|
|
|
nerrors += test_basic_dataset_operation(env_h5_drvr) < 0 ? 1 : 0;
|
2018-10-10 23:10:15 +08:00
|
|
|
nerrors += test_basic_attribute_operation() < 0 ? 1 : 0;
|
2020-09-30 22:27:10 +08:00
|
|
|
nerrors += test_basic_object_operation() < 0 ? 1 : 0;
|
|
|
|
nerrors += test_basic_link_operation() < 0 ? 1 : 0;
|
2021-09-30 02:28:12 +08:00
|
|
|
nerrors += test_basic_datatype_operation(env_h5_drvr) < 0 ? 1 : 0;
|
Combo set of async and other changes (#161)
* Update API tracing for new H5VL_request_status_t typedef
* Finish converting internal event set operations to use list iterator callbacks, instead of directly accessing the list structure
* Add H5VL_REQUEST_GET_ERR_STACK operation to request subclass, for retrieving a copy of the error stack for a failed asynchronous operation
* Remove 'canceled' event status from Java constants
* Be safer about releasing resources when inserting a newly opened/created object or file into an event set
* Remove H5EStest, add H5ES_WAIT_NONE for 0 timeout, and revise parameters to H5ESwait, to make it more "aggregate".
* Remove H5ES_STATUS_CANCELED from Java wrappers also
* Apply patch for dynamically registering optional VOL operations
* (a) Add async APIs for H5O module as listed in jira issue ID-283.
(b) Remove verification of name parameter in async related routines for H55A and H5L modules
because it is checked in H5VL_setup* routine.
(c) Modify h5dump expected output due to the async changes.
* Corrections based on PR feedback.
* Further changes to make based on PR feedback.
* Remove H5Dwait & H5Fwait (moved to the async connector). Added H5atclose
routine. Updated 'optional op' operations.
* Fix missed merge marker, and reformatted line
* Update API tracing infrastructure for H5atclose callback
* Clean up some warnings
* Normalize against develop branch
* Correct level of indirection
* Add doxygen info for H5is_library_terminating and regression tests for it and H5atclose
* Relocate prototype (and doxygen info) for H5Aclose
* Align w/changes on develop
* Move group package initialization code to H5Gint.c, and update tracing macros
* Change non-static function declarations to be static
* Correct GCC diagnostic macro
* Ensure that H5TSpublic.h header gets installed (#129)
* Finish moving API routines that invoke VOL framework to main source files.
* Fix position of H5Fmount and H5Funmount
* Add 'wrapper' versions of async calls, to allow language wrappers and layers on top of HDF5 to pass in their application information.
* Add wrappers for dynamically registered optional operations
* Fix typo
* Update doxygen comment for H5atclose with additional detail.
* Add H5VL\*_vararg versions of H5VL routines that use va_list parameters
* Implement and test H5S_BLOCK
* Switch H5Aexists\*_async and H5Lexists\*_async to use flag to return status, instead of return value. Make the corresponding changes through most of the v1 and v2 B-tree code. Clean up warnings in H5public.h and cmpd_dtransform.c.
* Add H5Iregister_future routine and tests.
* Correct return value for H5Lexists_async
* Add H5_DLL macro to public H5ES API routines
* Update supported -> flags parameter for introspect_query callback
* Remove my email address. Update passthrough VOL connector ID.
* Fix comment for post_open_api_common
* Remove unused non-blocking VOL connector
* Minor cleanup in async branch in preparation for merge to develop
* Update CMake and the Autotools to use the new pass-through VOL ID
* Finish another iteration on public H5ES routines, along with running the code reformatter
* Another round of reformatting
* Fix for SWMR daily test failures (#160)
The H5I_register_using_existing_id() call did not initialize the future
ID callbacks, causing the library to segfault when it tried to
resolve those function pointers.
* Added selective async APIs (#150)
* Added selective async APIs
Description:
Added the following APIs:
H5Ropen_attr_async
H5Ropen_object_async
H5Ropen_region_async
H5Mcreate_async
H5Mopen_async
H5Mput_async
H5Mget_async
H5Mclose_async
H5Tcommit_async
H5Topen_async
H5Tcopy_async
H5Tclose_async
- Updated an expected output file to include a new internal function
in the error stack for the failure case.
* Updated async APIs per reviews, including removing async version of
H5Tcopy.
* Removed statements that were added by mistake in the previous commit.
* Fix compile issues in H5M and warnings elsewhere
* Reformat code
* Brings VOL_LIST changes from develop. (#163)
* Remove H5Dwait and H5Fwait calls, which were incorrectly brought back in
* Tiny cleanup of H5Lcreate_hard_async
* Run source formatter
* Allow for canceled operation in wait_cb
* Attempt to fix switch on string value
* Re-run source formatter
* Add H5S_BLOCK testfile to CMake clean target
* Add H5Pset_vol_async API routine and 'get_cap_flags' VOL introspection callback
* Clean up warnings
* Add H5P(set\|get)_vol_implicit_async API routines to allow \/ disallow implicit asynchronous operations (default is disallowed)
* Run formatting script
* Remove H5VL_REQUEST_WAIT\*
* Warning cleanup
* Eliminate strdup()s on statically allocated strings
* Warning cleanup
* Split H5VLrestore_lib_state into H5VLstart_lib_state and H5VLrestore_lib_state, and rename H5VLreset_lib_state to H5VLfinish_lib_state.
* Duplicate strings when building err_info to return to applicatin
* Move connector author routines into seperate header files, all included in the new hdf5dev.h header
* Run bin/trace to add TRACE macros
* Allow H5ES_NONE as a valid, but no-op, parameter to all H5ES API routines that accept an event set ID
* Clean up formatting
* Remove H5Pset/get_vol_implicit_async
* Clean up warning
* Remove H5Pget_vol_async and replace with more generic H5Pget_vol_cap_flags
* Clean up warnings
* Add H5ESfree_err_info convenience routine
* Fix typo
* Correct matching for cached VOL plugins
* Add developer header file
* Update for C99 compatibility
* Add missing trace macro
* Stop clang-format from messing with the trace macros. Don't set up VOL wrappers for 'infrastructure' objects like requests and blobs
* Fix warning about formatting a directory
* Clean up formatting for H5E_BEGIN_TRY / H5E_END_TRY
* Reduce scope of H5ES__close
* Enable CMake checks for various types on MacOS
* Clean up properly when H5CX_retrieve_state() fails. Also clean up many compiler warnings.
* Committing clang-format changes
* Merge from develop
* Fix mis-placed assert
* Remove commented-out code
* Re-add macro for unsetenv on Windows (I think it accidentally was merged out)
* Strengthen sanity check from error report to assertion
* Committing clang-format changes
* Add units to the comments for a few fields
* Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it.
* Committing clang-format changes
* Remove H5ESget_time_estimate
* Committing clang-format changes
* Create developer header for datatype routines and move type conversion register/unregister routines there.
* Simplify internal H5VL_setup_name_args and H5VL_setup_idx_args routines
* Add H5VLlink_optional_op, allowing dynamicly registered optional operations for the link VOL subclass, also added H5VL_loc_params argument to the link 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Add H5VLobject_optional_op, allowing dynamicly registered optional operations for the object VOL subclass, also added H5VL_loc_params argument to the object 'optional' callback to allow them to work correctly.
* Run bin/format_source on current code
* Committing clang-format changes
* Revert "Switch 'get execution time' operation for async request tokens to be an optional operation and query if connector supports operation before retrieving it."
This reverts commit 5ac92014da2682bdba62d7a2524b8d90e38f6b19.
* Committing clang-format changes
* Convert attribute 'get' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Update tracing macros
* Convert attribute 'specific' operation to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert dataset 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to attribute 'get' and 'specific' operation parameters.
* Convert datatype 'get' and 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also, minor tweaks to H5O_refresh_metadata arguments.
* Reduce warnings
* Reduce warnings
* Track change to datatype 'get' callback
* Fix bug with file pointer getting invalidated when object closed
* Reformat source
* Convert file and group VOL classes 'get' and 'specific' operations to use
struct-of-tagged-union pattern for VOL callback arguments, instead of using
varargs. Also small cleanup to the attribute get name operation. Also moved
'mount' and 'unmount' operations to be group specific operations, instead of
file specific, to better align with their behavior (mounted files are on
groups, so a group is what is operated on).
* Remove remainder of merge conflict marking
* Convert link VOL class 'create' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Remove some unused local variables
* Convert link VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor 'get name by idx' routines to return actual length of name with a parameter instead of the return value, and move some callback context structs for the link interface from the private header file into the source code module, to reduce their visibility scope.
* Update tracing macros
* Convert link VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'get' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert object VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also refactor H5G_loc_exists, et al, to return 'exists' flag in a parameter and errors with the function return value, instead of overloading both into the return value. And, corrected logic error in test/links.c around non-existant objects in a file.
* Convert request VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs.
* Convert blob VOL class 'specific' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Also removes the H5VL_BLOB_GETSIZE operation, as it's unused in the library and the blob ID size for a container is now returned with H5VL_FILE_GET_CONT_INFO.
* Add 'const' to several parameters that are only queried.
* Convert all VOL classes' 'optional' operations to use struct-of-tagged-union pattern for VOL callback arguments, instead of using varargs. Convert several 'get' routines to return the length of an array in a parameter instead of combining it into the return value. Move several routines to be in less public namespace. Correct direct_chunk test to verify that parameters aren't modified on error.
* Switch get/specific/optional VOL callback argument structures to be 'async-friendly'. Also other minor cleanups and bug-fixes.
* Add H5Pset_dataset_io_hyperslab_selection / H5S_PLIST feature, to allow skipping H5Dget_space + H5Sselect_hyperslab for async operation
* Add dynamic optional operations for request objects
* Update dynamic operation test for optional request operations
* Update a comment for an operation argument
* Run trace and format_source scripts
* Committing clang-format changes
* Committing clang-format changes
Co-authored-by: vchoi <vchoi@jelly.ad.hdfgroup.org>
Co-authored-by: vchoi-hdfgroup <55293060+vchoi-hdfgroup@users.noreply.github.com>
Co-authored-by: jhendersonHDF <jhenderson@hdfgroup.org>
Co-authored-by: Dana Robinson <derobins@hdfgroup.org>
Co-authored-by: Dana Robinson <43805+derobins@users.noreply.github.com>
Co-authored-by: bmribler <39579120+bmribler@users.noreply.github.com>
Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-03 04:29:46 +08:00
|
|
|
nerrors += test_async_vol_props() < 0 ? 1 : 0;
|
2018-10-10 23:10:15 +08:00
|
|
|
|
|
|
|
if (nerrors) {
|
2020-09-30 22:27:10 +08:00
|
|
|
HDprintf("***** %d Virtual Object Layer TEST%s FAILED! *****\n", nerrors, nerrors > 1 ? "S" : "");
|
2018-10-10 23:10:15 +08:00
|
|
|
HDexit(EXIT_FAILURE);
|
|
|
|
}
|
|
|
|
|
|
|
|
HDputs("All Virtual Object Layer (VOL) tests passed.");
|
|
|
|
|
|
|
|
HDexit(EXIT_SUCCESS);
|
|
|
|
|
|
|
|
} /* end main() */
|