Remove testsuite.test for leanTLS builds#10510
Open
miyazakh wants to merge 1 commit into
Open
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts the autotools build rules so testsuite/testsuite.test is not built (and therefore not run during make check) when configuring with --enable-leantls, avoiding a macOS-specific crash and skipping a test binary that would be effectively inert under leanTLS.
Changes:
- Gate
testsuite/testsuite.testbehindBUILD_EXAMPLE_SERVERS(which is false for leanTLS) instead ofBUILD_TESTS. - Conditionalize
tests/unit.logandscripts/unit.logordering rules so they are only emitted when the testsuite target exists.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
testsuite/include.am |
Switch testsuite build conditional to BUILD_EXAMPLE_SERVERS to exclude leanTLS builds. |
Makefile.am |
Emit log-ordering dependencies only when BUILD_EXAMPLE_SERVERS is true, preventing missing-dependency errors when testsuite is absent. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
wolfSSL-Fenrir-bot
left a comment
There was a problem hiding this comment.
Fenrir Automated Review — PR #10510
No scan targets match the changed files in this PR. Review skipped.
Contributor
Author
|
retest this please |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fix: Skip testsuite/testsuite.test for --enable-leantls builds
Problem
When configuring with
--enable-leantls, runningmake checkcausestestsuite/testsuite.testto crash with a segmentation fault (exit code 139)before
main()is ever reached.Root Cause
The leantls configuration adds
-fvisibility=hidden(via the standardwolfSSL visibility check) together with
-DNO_WOLFSSL_SERVERand otherstripping flags. On macOS, this combination causes Apple's linker to set
LC_MAIN.entryoff = 0in the resulting Mach-O binary — pointing theOS entry-point dispatcher at the Mach-O header itself rather than at the
main()function. When dyld hands control to offset 0, the CPU tries toexecute the magic bytes
0xCF 0xFA 0xED 0xFEas x86-64 instructions;0xCFis the privilegediretopcode, which immediately raises aGeneral Protection Fault in user space.
This is confirmed by the crash report:
Even though
_mainexists in the binary at the correct address, theincorrect
entryoffvalue prevents it from ever being called. The crashis reproducible on macOS (Apple Silicon via Rosetta) on the unmodified
master branch; it is a build-system issue unrelated to any logic change.
Why the test is meaningless with leantls
Even if the binary were not crashing,
testsuite/testsuite.testwouldperform no useful work under
--enable-leantls: the entire test body intestsuite/testsuite.cis guarded byand leantls defines
-DNO_WOLFSSL_SERVER, so the function returnsEXIT_SUCCESSimmediately without executing any TLS tests.Fix
testsuite/include.amReplace the
BUILD_TESTSconditional withBUILD_EXAMPLE_SERVERS.BUILD_EXAMPLE_SERVERSis already defined inconfigure.acas:This prevents
testsuite/testsuite.testfrom being built or added tothe
check_PROGRAMSlist when leantls is enabled, eliminating both thecrash and the pointless build overhead.
Makefile.amThe existing rules
order
tests/unit.testandscripts/unit.testto run only after thetestsuite finishes. Without this guard they would become unsatisfied
dependencies whenever
testsuite/testsuite.testis absent from thebuild. The rules are conditioned with the automake
@COND_TRUE@syntax:so they are emitted into the generated
Makefileonly when serverexamples (and thus the testsuite) are actually built.
Files Changed
testsuite/include.amBUILD_EXAMPLE_SERVERSinstead ofBUILD_TESTSMakefile.amtests/unit.logandscripts/unit.logordering rulesTesting
./configure(default)make checkpassesmake checkpasses (no change)./configure --enable-allmake checkpassesmake checkpasses (no change)./configure --enable-leantlstestsuite/testsuite.testcrashes (SIGSEGV)testsuite/testsuite.testnot built;make checkcompletesChecklist