Skip to content

Commit

Permalink
Add new connector stacks to CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Dec 6, 2024
1 parent c5b3b80 commit cb61a02
Show file tree
Hide file tree
Showing 2 changed files with 105 additions and 2 deletions.
72 changes: 72 additions & 0 deletions .github/workflows/multithread_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,78 @@ jobs:
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - ST to Native (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "pass_through under_vol=0\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - MT to Native (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=0\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - MT to MT Native Wrapper (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=162\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - ST to MT Native Wrapper (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "pass_through under_vol=162\\;under_info={}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - MT to ST to Native (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=1\\;under_info={under_vol=0\\;under_info={}}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - ST to MT to Native (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "pass_through under_vol=163\\;under_info={under_vol=0\\;under_info={}}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - MT to ST to MT Native Wrapper (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "mt_passthru_wrapper_vol_connector under_vol=1\\;under_info={under_vol=162\\;under_info={}}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: API Tests - ST to MT to MT Native Wrapper (Multi-threaded)
if: matrix.api_tests == '--enable-api-tests' && matrix.multi_thread == '--enable-multithread --disable-hl'
working-directory: ${{github.workspace}}
env:
HDF5_PLUGIN_PATH: ${{github.workspace}}/test/.libs
HDF5_VOL_CONNECTOR: "pass_through under_vol=163\\;under_info={under_vol=162\\;under_info={}}"
run: |
valgrind ./test/API/h5_api_test -maxthreads ${{ env.num_threads }}
- name: MT VL Tests (Non-threaded)
working-directory: ${{github.workspace}}/test/
run: |
Expand Down
35 changes: 33 additions & 2 deletions test/mt_passthru_wrapper_vol_connector.c
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ static herr_t mt_pass_through_wrapper_free_obj(mt_pass_through_wra
H5PL_type_t H5PLget_plugin_type(void);
const void *H5PLget_plugin_info(void);

static herr_t mt_pass_through_wrapper_initialize(hid_t vipl_id);
static herr_t mt_pass_through_wrapper_terminate(void);

/* VOL info callbacks */
static void *mt_pass_through_wrapper_info_copy(const void *info);
static herr_t mt_pass_through_wrapper_info_cmp(int *cmp_value, const void *info1, const void *info2);
Expand Down Expand Up @@ -245,8 +248,8 @@ static const H5VL_class_t mt_pass_through_wrapper_g = {
MT_PASSTHRU_WRAPPER_NAME, /* name */
0, /* connector version */
0, /* capability flags */
NULL, /* initialize */
NULL, /* terminate */
mt_pass_through_wrapper_initialize, /* initialize */
mt_pass_through_wrapper_terminate, /* terminate */
{
/* info_cls */
sizeof(mt_pass_through_wrapper_info_t), /* size */
Expand Down Expand Up @@ -414,6 +417,34 @@ mt_pass_through_wrapper_free_obj(mt_pass_through_wrapper_t *obj)
return 0;
} /* end H5VL__pass_through_free_obj() */


static herr_t
mt_pass_through_wrapper_initialize(hid_t vipl_id) {
/* Initialize the Internal Passthrough VOL
* to support testing with multiple passthrough connectors
*/
hid_t passthru_id = H5I_INVALID_HID;
herr_t ret_value = 0;

(void) vipl_id;

if ((passthru_id = H5VL_PASSTHRU) < 0)
ret_value = -1;

return ret_value;
}

static herr_t
mt_pass_through_wrapper_terminate(void) {
/* Terminate the Internal Passthrough VOL */
herr_t ret_value = 0;

if (H5Idec_ref(H5VL_PASSTHRU) < 0)
ret_value = -1;

return ret_value;
}

/*---------------------------------------------------------------------------
* Function: mt_pass_through_wrapper_info_copy
*
Expand Down

0 comments on commit cb61a02

Please sign in to comment.