From c04ec9bd19b752351ab3a3545824a8701deefdff Mon Sep 17 00:00:00 2001 From: Matthew Larson Date: Wed, 30 Oct 2024 10:10:52 -0500 Subject: [PATCH] Test production and debug build in CI --- .github/workflows/test.yml | 5 +++-- src/H5I.c | 1 - src/H5private.h | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 67ec6391a5f..a4ab22b9672 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -6,7 +6,7 @@ on: - '*' env: - HDF5TestExpress: 2 + HDF5TestExpress: 1 jobs: build-and-test: @@ -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: @@ -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}} diff --git a/src/H5I.c b/src/H5I.c index b8f7877bfb2..58b5cad35fe 100644 --- a/src/H5I.c +++ b/src/H5I.c @@ -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); } diff --git a/src/H5private.h b/src/H5private.h index 87287f75130..d272fadddc4 100644 --- a/src/H5private.h +++ b/src/H5private.h @@ -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 */\ @@ -1514,10 +1514,10 @@ 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");*/\ } @@ -1525,7 +1525,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_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 */\ @@ -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"); */\ }