HomeFreeBSD

Fix two failing tests after ATF update

Description

Fix two failing tests after ATF update

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 just to check that
socketpair returns fd 3+4 and thereby also closes the ATF results file.
This then results in an EBADF when writing the result so the test is
reported as broken.

While system calls that create new file descriptors (must?) use the lowest
available file descriptor number, it does not seem useful to test this
property here. Drop the check for FD==3/4 to unbreak the testsuite.

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.

Reviewed By: cem
Differential Revision: https://reviews.freebsd.org/D28683

(cherry picked from commit 10fc4c3218381fef7189a5b8d46a757cd1989dff)

Details

Provenance
arichardsonAuthored on Feb 15 2021, 10:11 PM
Reviewer
cem
Differential Revision
D28683: Fix two failing tests after ATF update
Parents
rG4643e1e84616: tests/sys/vfs/lookup_cap_dotdot: No longer aborts after ATF update
Branches
Unknown
Tags
Unknown