Skip to content

test: suite hangs at runtime with CONFIG_ZSYS_LOG_MODULE=n #58

Open

Description

@swoisz

Found while verifying the !CONFIG_ZSYS_LOG_MODULE stub path on #57. Unrelated to that PR.

Repro (linux target, IDF v5.4):

cd test
rm -rf build sdkconfig
echo "CONFIG_ZSYS_LOG_MODULE=n" >> sdkconfig.defaults
idf.py --preview set-target linux
idf.py build          # succeeds
./build/boreas_test.elf

Expected: the suite runs, or skips the log tests.
Actual: builds clean, then produces no output at all and does not exit. Killed after ~5 minutes.

I didn't diagnose past the symptom. test/main/test_log.c uses LOG_MODULE_REGISTER and LOG_BACKEND_DEFINE, both of which become no-ops when the symbol is off, and test_log_group() calls zsys_log_init() unconditionally -- so the log group is the first place to look, but the hang produced no output at all, which suggests it may be earlier than that.

Worth deciding which of these the project wants:

  1. CONFIG_ZSYS_LOG_MODULE=n is a supported configuration -> the suite should build and run under it, and CI should cover it.
  2. It is supported for the component but the test app requires the module -> the test app should depends on / assert it at compile time rather than building an image that hangs.

Right now it is neither: the build succeeds and the binary silently hangs, which is the worst of the three outcomes. CI covers only the default =y.

Activity

  1. swoisz commented on Oct 29, 2026

    @swoisz
    CollaboratorAuthor

    Possible root cause: #91. On macOS hosts, any failing Unity assertion (TEST_ABORT → longjmp) wedges the host suite later inside the k_work tests, with no output when stdout is redirected. If the CONFIG_ZSYS_LOG_MODULE=n run hits one failing assertion in the log group, that would produce exactly this symptom. Linux CI (glibc longjmp doesn't restore the signal mask) may behave differently. Not yet verified. Worth re-running this repro with the failing test moved last, or with Unity built with -Dsetjmp=_setjmp -Dlongjmp=_longjmp.

    #92 covers adding a config matrix (including non-default LOG_MODULE) to CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions