https://bugs.openldap.org/show_bug.cgi?id=10472
Issue ID: 10472 Summary: Detect servers dying during tests Product: OpenLDAP Version: unspecified Hardware: All OS: All Status: UNCONFIRMED Keywords: needs_review Severity: normal Priority: --- Component: test suite Assignee: bugs@openldap.org Reporter: ondra@mistotebe.net Target Milestone: ---
Currently the test suite starts tests as background jobs and ignores when they exit prematurely or with a non-zero exit code. This makes it impossible to detect shutdown time crashes or enable any instrumentation/leak-checking tools.
https://bugs.openldap.org/show_bug.cgi?id=10472
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords|needs_review | Target Milestone|--- |2.7.0 Assignee|bugs@openldap.org |ondra@mistotebe.net
https://bugs.openldap.org/show_bug.cgi?id=10472
Ondřej Kuzník ondra@mistotebe.net changed:
What |Removed |Added ---------------------------------------------------------------------------- Ever confirmed|0 |1 Status|UNCONFIRMED |IN_PROGRESS
--- Comment #1 from Ondřej Kuzník ondra@mistotebe.net --- https://git.openldap.org/openldap/openldap/-/merge_requests/868
https://bugs.openldap.org/show_bug.cgi?id=10472
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|IN_PROGRESS |RESOLVED Resolution|--- |TEST
--- Comment #2 from Quanah Gibson-Mount quanah@openldap.org --- head:
• ca1232c1 by Ondřej Kuzník at 2026-05-01T15:13:53+00:00 ITS#10472 Enable SASL tests in CI
• 7fa8221d by Ondřej Kuzník at 2026-05-01T15:13:53+00:00 ITS#10472 Check tool return codes when missing
• d9d6eb08 by Ondřej Kuzník at 2026-05-01T15:13:53+00:00 ITS#10472 Check exit code of background jobs
Also improve KILLPIDS tracking.
Waiting on multiple jobs and relying on wait exit code being != 0 if at least one process returned != 0 might not be portable but is the best we can do for now. We can address that in the future.
• 0073224b by Ondřej Kuzník at 2026-05-01T15:13:53+00:00 ITS#10472 Check server are still running when we expect them to
• 9e9e6b8c by Ondřej Kuzník at 2026-05-01T15:13:53+00:00 ITS#10472 Make sure we kill background jobs on every path
https://bugs.openldap.org/show_bug.cgi?id=10472
--- Comment #3 from Howard Chu hyc@openldap.org --- This kills the entire test suite on Windows/MSYS2. Since slapd is usually stopped by kill -HUP, on MSYS2 the exit status is the signal number, not zero.
https://bugs.openldap.org/show_bug.cgi?id=10472
--- Comment #4 from Howard Chu hyc@openldap.org --- Currently MSYS2's method of sending signals to Win32 processes just forces them to exit, without regard to any specified signal handlers. So in the test suite, slapd is always being killed uncleanly and exiting with a non-zero status.
I've patched my build of MSYS2 to fix this but the patch is unlikely to be accepted upstream because it would make the MSYS2 runtime look like malware.
https://github.com/msys2/msys2-runtime/pull/342
Also, while the patch is sufficient for our needs, it's not general enough to handle the case of a Windows64 environment running 32bit processes, or foreign architecture processes (e.g. running on Windows for ARM64, with x86/x86-64 target processes). I'm not sure it's worth pursuing this further.
Also there's another issue with current msys2-3.6.9; slapd built with msys2's build of Cyrus SASL 2.1.28 crashes on exit because sasl_done() corrupts the heap. For now, in order to make progress in running the test suite, I've commented out the invocation of slap_sasl_destroy() in slap_shutdown().
Later I may try to build Cyrus SASL from source and see what it's doing...
https://bugs.openldap.org/show_bug.cgi?id=10472
Quanah Gibson-Mount quanah@openldap.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Resolution|TEST |FIXED Status|RESOLVED |VERIFIED