Page MenuHomeFreeBSD

libc: Fix t_spawn_fileactions test after ATF update
ClosedPublic

Authored by arichardson on Feb 15 2021, 11:00 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Apr 23, 10:29 AM
Unknown Object (File)
Sat, Apr 20, 1:51 AM
Unknown Object (File)
Thu, Apr 18, 11:25 PM
Unknown Object (File)
Mar 10 2024, 6:29 PM
Unknown Object (File)
Mar 10 2024, 6:29 PM
Unknown Object (File)
Mar 7 2024, 8:57 PM
Unknown Object (File)
Mar 7 2024, 8:45 PM
Unknown Object (File)
Feb 13 2024, 5:15 PM
Subscribers

Details

Summary

Since https://github.com/freebsd/atf/commit/4581cefc1e3811dd3c926b5dd4b15fd63d2e19da
ATF opens the results file on startup. This fixes problems like
capsicumized tests not being able to open the file on exit.

However, this test closes all file descriptors above 3 to get a
deterministic fd table allocation for the child. Instead of using closefrom
(which will close the ATF output file FD) I've changed this test use
the lowest available fd and pass that to the helper program as a string.

We could also try to re-open the results file in ATF if we get a EBADF
error, but that will fail when running under Capsicum.

Test Plan

test passes now.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
No Lint Coverage
Unit
No Test Coverage
Build Status
Buildable 37015
Build 33904: arc lint + arc unit