Skip to content

Commit

Permalink
Test production and debug build in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
mattjala committed Oct 30, 2024
1 parent 5e31a0b commit c04ec9b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 9 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- '*'

env:
HDF5TestExpress: 2
HDF5TestExpress: 1

jobs:
build-and-test:
Expand All @@ -15,6 +15,7 @@ jobs:
matrix:
api_tests: ["--enable-api-tests", "--disable-api-tests"]
multi_thread: ["--enable-multithread --disable-hl", "--disable-multithread --enable-threadsafe --disable-hl", "--disable-multithread --disable-threadsafe"]
build_mode: ["production", "debug"]
fail-fast: false

steps:
Expand All @@ -30,7 +31,7 @@ jobs:
working-directory: ${{github.workspace}}
run: |
sh ./autogen.sh
./configure --enable-shared --enable-tests ${{ matrix.multi_thread }} ${{ matrix.api_tests }} --enable-build-mode=debug
./configure --enable-shared --enable-tests ${{ matrix.multi_thread }} ${{ matrix.api_tests }} --enable-build-mode=${{ matrix.build_mode }}
- name: Build HDF5
working-directory: ${{github.workspace}}
Expand Down
1 change: 0 additions & 1 deletion src/H5I.c
Original file line number Diff line number Diff line change
Expand Up @@ -2080,7 +2080,6 @@ herr_t H5I_vlock_enter(hid_t id) {
mod_info_k.do_not_disturb = false;

if (mod_info_k.lock_count <= 0) {
printf("lock count underflow\n");
HGOTO_DONE(FAIL);
}

Expand Down
12 changes: 6 additions & 6 deletions src/H5private.h
Original file line number Diff line number Diff line change
Expand Up @@ -1499,7 +1499,7 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */
{\
/* Add invalid ID to pad list in the event __VA_ARGS__ is empty */\
const hid_t _vars[] = {H5I_INVALID_HID, __VA_ARGS__}; \
bool success = true;\
bool id_virtual_lock_success = true;\
bool repeat = false;\
for (size_t _i = 1; _i < sizeof(_vars) / sizeof(hid_t); _i++) {\
/* If same ID provided twice, only virtual lock it once */\
Expand All @@ -1514,18 +1514,18 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */
continue;\
}\
if (H5I_vlock_enter(_vars[_i]) < 0) {\
success = false;\
id_virtual_lock_success = false;\
}\
}\
assert(success);\
assert(id_virtual_lock_success);\
/* HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to lock object");*/\
}

#define FUNC_LEAVE_VIRTUAL_LOCK(...) \
/* Add invalid ID to pad list in the event __VA_ARGS__ is empty */\
{\
const hid_t _vars[] = {H5I_INVALID_HID, __VA_ARGS__}; \
bool success_exit = true;\
bool id_virtual_lock_success_exit = true;\
bool repeat_exit = false;\
for (size_t _i = 1; _i < sizeof(_vars) / sizeof(hid_t); _i++) {\
/* If same ID provided twice, only virtual unlock it once */\
Expand All @@ -1540,10 +1540,10 @@ extern hbool_t H5_libterm_g; /* Is the library being shutdown? */
continue;\
}\
if (H5I_vlock_exit(_vars[_i]) < 0) {\
success_exit = false;\
id_virtual_lock_success_exit = false;\
}\
}\
assert(success_exit);\
assert(id_virtual_lock_success_exit);\
/*HGOTO_ERROR(H5E_FUNC, H5E_CANTINIT, FAIL, "unable to unlock object"); */\
}

Expand Down

0 comments on commit c04ec9b

Please sign in to comment.