Skip to content

(release/25.0) test: fail when a child terminates abnormally - #3797

Open
metux wants to merge 1 commit into
release/25.0from
pr/release/25.0-test-fail-when-a-child-terminates-abnormally_2026-10-01_19-23-25
Open

metux wants to merge 1 commit into
release/25.0from
pr/release/25.0-test-fail-when-a-child-terminates-abnormally_2026-10-01_19-23-25

Conversation

@metux

@metux metux commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Backport-Ursprung

Dieser PR ist ein Backport. Quelle auf master:
GH-3777

Der Merge-Status des Originals steht in der Referenz oben.

Master-PR: #3777

When a later test child is killed by a signal, exit_code may still contain zero from the preceding child. Return EXIT_FAILURE explicitly so Meson cannot report a false success.

Part-of: https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2293
(cherry picked from commit 495ea74)
(cherry picked from commit 21e4929c355df7f525d0d0299781ccb6daa83780)
(cherry picked from commit d9abd11)
Signed-off-by: Lukáš Lipinský 18076-Mr-Tao@users.noreply.gitlab.freedesktop.org
(cherry picked from commit b799d88)

@metux metux self-assigned this Oct 1, 2026
@metux
metux requested a review from a team October 1, 2026 17:24
@metux

metux commented Oct 2, 2026

Copy link
Copy Markdown
Contributor Author

🤖 Automated review — generated by Starfleet ship Enterprise (model: heavy-model) on behalf of @metux. Not a human review.

Review: pass

Backport of master #3777 (test: fail when a child terminates abnormally). The
backport content was reviewed on master; this checks the backport itself.

Patch fidelity and provenance

Single commit, one file (test/tests-common.c), one changed line:
exit(exit_code) → exit(EXIT_FAILURE).

Sign-off is Lukáš Lipinský, matching the upstream author — foreign patch, so the
original author's sign-off is correct, exactly one. Same rule as #3801/#3802/#3803,
where ours had wrongly been added.

Cross-branch table

Branch PR Commit CI
release/25.2 #3800 92c7342d7bbe 28 success, 0 fail
release/25.1 #3798 adc5f461d085 see below
release/25.0 #3797 98ddb67eb408 see below

Master PR: #3777.

If CI is red on this branch — read this before deciding

On 25.0 and 25.1 the xserver-build-ubuntu lane fails, and this is expected,
not caused by the backport. It is the point of the change.

The failing assertion is:

tests: ../test/signal-logging.c:213: logging_format:
  Assertion `strcmp(&logmsg[strlen(logmsg) - 3], "en\n") == 0' failed.
13/16 xserver / unit   FAIL   0.28s

It is locale-dependent — it requires the logged line to end in the English
locale suffix, so the locale has to differ from what the assertion expects. It is
unrelated to the line this PR changes: test/tests-common.c and
test/signal-logging.c are disjoint files.

What this PR does is remove a mask. Before it, run_test_in_child() reported an
abnormally terminated child with exit(exit_code) where exit_code had kept the
previous test's value — so a crashed child that followed a passing test exited 0
and meson test reported pass. That is why release/25.1's tip was green while
this backport is red: the tip is green because failures were not getting through.

So on 25.1 the red lane is this fix working. On 25.0 the tip is red as well
(verified on the branch tip), so the defect was already visible there.

This is stated in the master review as expectation-setting so a merge is not read as
breakage caused by the backport. It is not — but the honest summary is that the
underlying test bug is still open. It is tracked as its own task and is not part of
this backport.

Rule 2 — backport

Test-harness integrity, not a user-facing fix, so not a security backport
candidate. Recommended anyway for the release lines, because their suites currently
cannot report a crash. Maintainer decides.

Rule 3 — driver ABI

No impact. tests-common.c appears in the unit-test source list in
test/meson.build; each entry becomes its own test executable. Not linked into the
server or into libxserver, no struct, no _X_EXPORT.

CI on this PR

2 failure 2 skipped 4 success on head 98ddb67eb408.

When a later test child is killed by a signal, exit_code may still contain zero from the preceding child. Return EXIT_FAILURE explicitly so Meson cannot report a false success.

Part-of: <https://gitlab.freedesktop.org/xorg/xserver/-/merge_requests/2293>
(cherry picked from commit 495ea74)
(cherry picked from commit 21e4929c355df7f525d0d0299781ccb6daa83780)
(cherry picked from commit d9abd11)
Signed-off-by: Lukáš Lipinský <18076-Mr-Tao@users.noreply.gitlab.freedesktop.org>
(cherry picked from commit b799d88)
@metux
metux force-pushed the pr/release/25.0-test-fail-when-a-child-terminates-abnormally_2026-10-01_19-23-25 branch from 98ddb67 to 113f764 Compare October 2, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot-review-passed Automated bot review found no blocking issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant