From dcd756d0ec9912f5776b4a849e0b2c2c6da1d4db Mon Sep 17 00:00:00 2001 From: Mario Fetka Date: Wed, 17 Jun 2026 20:03:27 +0000 Subject: [PATCH] nwnss: keep fsm audit test release-build compatible --- nwnss-audit.md | 2 +- tests/nwnss/fsm/test_nwnss_fsm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/nwnss-audit.md b/nwnss-audit.md index 059390d..77ccf69 100644 --- a/nwnss-audit.md +++ b/nwnss-audit.md @@ -599,7 +599,7 @@ even if it already compiles or has indirect test coverage. | Status | Kind | Test coverage | File | Notes | |---|---:|---|---|---| -| AUDITED | ORIG+FIX/PORT | nwnss.fsm | `src/nwnss/library/fsm/fsmnw.c` | Compared with original `public_core/library/fsm/fsmnw.c`; ready-queue/mailbox logic kept. Userspace port disables kernel worker threads (`NUM_FSM_THREADS=0`) and initializes a local interrupt mailbox; tests cover startup/shutdown, delayed ready-queue execution, FIFO draining, empty drain behavior, and mailbox release. Other changes are include-path fixes and callback casts. | +| AUDITED | ORIG+FIX/PORT | nwnss.fsm | `src/nwnss/library/fsm/fsmnw.c` | Compared with original `public_core/library/fsm/fsmnw.c`; ready-queue/mailbox logic kept. Userspace port disables kernel worker threads (`NUM_FSM_THREADS=0`) and initializes a local interrupt mailbox; tests cover startup/shutdown, delayed ready-queue execution, FIFO draining, empty drain behavior, and mailbox release without asserting debug-only initializer side effects in release builds. Other changes are include-path fixes and callback casts. | ### Sources: library/guid diff --git a/tests/nwnss/fsm/test_nwnss_fsm.c b/tests/nwnss/fsm/test_nwnss_fsm.c index f8879b8..676b78e 100644 --- a/tests/nwnss/fsm/test_nwnss_fsm.c +++ b/tests/nwnss/fsm/test_nwnss_fsm.c @@ -47,9 +47,9 @@ int main(void) CHECK(NumFsmThreads == 0); FSMLITE_INIT(&fsm, "test", 1); +#if NSS_DEBUG IS_ENABLED CHECK(fsm.action == NULL); CHECK(fsm.param.user == 0); -#if NSS_DEBUG IS_ENABLED CHECK(fsm.type != NULL); CHECK(fsm.instance == 1); #endif