Bug 290837 - bin/sh/builtins/functional_test:read11 test fails intermittently on arm64 in CI
Summary: bin/sh/builtins/functional_test:read11 test fails intermittently on arm64 in CI
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: tests (show other bugs)
Version: 16.0-CURRENT
Hardware: arm64 Any
: --- Affects Only Me
Assignee: Bryan Drewery
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2025-11-06 16:24 UTC by Siva Mahadevan
Modified: 2025-11-25 03:20 UTC (History)
2 users (show)

See Also:


Attachments
kyua test report (1.63 KB, text/plain)
2025-11-06 16:24 UTC, Siva Mahadevan
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Siva Mahadevan freebsd_committer freebsd_triage 2025-11-06 16:24:58 UTC
Created attachment 265208 [details]
kyua test report

The 'bin/sh/builtins/functional_test:read11' testcase fails intermittently on arm64 in CI:


===> bin/sh/builtins/functional_test:read11
Result:     failed: atf-check failed; see the output of the test for details

Standard output:
Executing command [ /bin/sh /usr/tests/bin/sh/builtins/read11.0 ]

Standard error:
Fail: incorrect exit status: 1, expected: 0



I have reproduced this error using Bricoler with 100 runs for good measure and attached the failing test report in this bug:

$ bricoler run freebsd-src-regression-suite --param freebsd-src:url=/usr/src --param freebsd-src:branch= --param freebsd-src-regression-suite:hypervisor=bhyve --param freebsd-src-regression-suite:memory=4096 --param freebsd-src-regression-suite:ncpus=2 --param freebsd-src-regression-suite:parallelism=1 --param freebsd-src-regression-suite:count=100 --param freebsd-src-regression-suite:tests='bin/sh/builtins/functional_test:read11'

@bdrewery, since you added the test in https://cgit.freebsd.org/src/commit/?id=e31fb97148f7a392aaf6cc84579a232f2969b9d1 (read builtin: Empty variables on timeout), please triage as necessary.
Comment 1 Bryan Drewery freebsd_committer freebsd_triage 2025-11-07 17:17:47 UTC
Confirmed an easy repro.
~/git/freebsd/main2/bin/sh/tests/builtins # while sh -x read11.0; do :; done
+ rm -rf /tmp/sh-test.idwjE4
rm: /tmp/sh-test.idwjE4: Directory not empty
Comment 2 Bryan Drewery freebsd_committer freebsd_triage 2025-11-07 17:20:31 UTC
This does `rm -rf dir` and [ENOTEMPTY]. Strange.
Comment 3 Bryan Drewery freebsd_committer freebsd_triage 2025-11-07 17:25:46 UTC
Alright the problem is understood and I'll get a fix in.
Comment 4 commit-hook freebsd_committer freebsd_triage 2025-11-07 17:37:39 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=5d55553e160a93788372785300f5bd07c2451f93

commit 5d55553e160a93788372785300f5bd07c2451f93
Author:     Bryan Drewery <bdrewery@FreeBSD.org>
AuthorDate: 2025-11-07 17:28:37 +0000
Commit:     Bryan Drewery <bdrewery@FreeBSD.org>
CommitDate: 2025-11-07 17:37:19 +0000

    sh tests: Fix racy test11.0

    This was sometimes exiting while the child fifo was created resulting in
    [ENOTEMPTY] from rm.  The child fifo isn't needed, just sleep.

    PR:     290837
    Fixes:  e31fb97148f ("read builtin: Empty variables on timeout")
    MFC after:      3 days

 bin/sh/tests/builtins/read11.0 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 5 commit-hook freebsd_committer freebsd_triage 2025-11-25 03:19:35 UTC
A commit in branch stable/15 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=43b1b7cbb69b64a0afabcfa1541cc2403e4b952f

commit 43b1b7cbb69b64a0afabcfa1541cc2403e4b952f
Author:     Bryan Drewery <bdrewery@FreeBSD.org>
AuthorDate: 2025-11-07 17:28:37 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-11-25 03:18:23 +0000

    sh tests: Fix racy test11.0

    This was sometimes exiting while the child fifo was created resulting in
    [ENOTEMPTY] from rm.  The child fifo isn't needed, just sleep.

    PR:     290837
    Fixes:  e31fb97148f ("read builtin: Empty variables on timeout")
    MFC after:      3 days

    (cherry picked from commit 5d55553e160a93788372785300f5bd07c2451f93)

 bin/sh/tests/builtins/read11.0 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 6 commit-hook freebsd_committer freebsd_triage 2025-11-25 03:20:40 UTC
A commit in branch stable/14 references this bug:

URL: https://cgit.FreeBSD.org/src/commit/?id=e9019e777ca3bbb3217df7b54590dcb075430f4e

commit e9019e777ca3bbb3217df7b54590dcb075430f4e
Author:     Bryan Drewery <bdrewery@FreeBSD.org>
AuthorDate: 2025-11-07 17:28:37 +0000
Commit:     Dag-Erling Smørgrav <des@FreeBSD.org>
CommitDate: 2025-11-25 03:19:16 +0000

    sh tests: Fix racy test11.0

    This was sometimes exiting while the child fifo was created resulting in
    [ENOTEMPTY] from rm.  The child fifo isn't needed, just sleep.

    PR:     290837
    Fixes:  e31fb97148f ("read builtin: Empty variables on timeout")
    MFC after:      3 days

    (cherry picked from commit 5d55553e160a93788372785300f5bd07c2451f93)

 bin/sh/tests/builtins/read11.0 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)