1.3 KiB
Test Case: Build Undefined-Symbol Tool Failure
Test ID: TC161-build-nm-failure
Category: Build Qualification
Priority: Critical
Regression: nm -u | awk could pass when nm itself failed
Objective
Verify that build.sh treats nm failure as fatal independently of the awk
bcmp check, safely removes its temporary output, preserves prior module output,
and still builds both supported configurations normally.
Procedure
-
On FreeBSD 15, run normal exact-source builds with
WITH_ZSTDIO=0and 1. Require both SUCCESS lines and save each module hash. -
Create a private executable
nmshim containing:#!/bin/sh exit 73 -
Put only that shim directory before the normal system paths and run
WITH_ZSTDIO=0 ./build.sh, capturing stdout/stderr and exit status. -
Require nonzero status,
ERROR: nm failed while checking erofs.ko, no SUCCESS line, unchanged hash for the previously publishedbuild/erofs.ko, and nobuild/obj/nm-undef.*file. -
Run one final normal build to prove the trap and shim did not contaminate the environment.
Expected Results
- The shimmed build fails after module linkage and before publication.
- Awk cannot convert an
nmexecution failure into PASS. - Temporary output is removed on failure and normal dual-configuration builds remain successful.