The testcases are failing to create results files and are leaving `testdir` behind. $ sudo kyua test -k /usr/tests/sys/vfs/Kyuafile lookup_cap_dotdot lookup_cap_dotdot:capmode__negative -> broken: Premature exit; test case received signal 6 [0.005s] lookup_cap_dotdot:lookup_cap_dotdot__advanced -> broken: Premature exit; test case received signal 6 [0.006s] lookup_cap_dotdot:lookup_cap_dotdot__basic -> broken: Premature exit; test case received signal 6 [0.003s] lookup_cap_dotdot:lookup_cap_dotdot__negative -> broken: Premature exit; test case received signal 6 [0.003s] lookup_cap_dotdot:openat__basic_negative -> passed [0.003s] lookup_cap_dotdot:openat__basic_positive -> passed [0.003s] Results file id is usr_tests_sys_vfs.20170101-024440-307762 Results saved to /root/.kyua/store/results.usr_tests_sys_vfs.20170101-024440-307762.db 2/6 passed (4 failed) $ sudo kyua debug -k /usr/tests/sys/vfs/Kyuafile lookup_cap_dotdot:capmode__negative FATAL ERROR: Cannot create results file '/tmp/kyua.fAccdD/2/result.atf': Not permitted in capability mode Files left in work directory after failure: testdir lookup_cap_dotdot:capmode__negative -> broken: Premature exit; test case received signal 6
This is a framework bug and nothing the individual test can fix. These tests pass when run directly.
(In reply to Conrad E. Meyer from comment #1) *sigh* It's a test bug. The tests need to fork, enter cap mode, then make sure the invariant does the right thing.
A commit references this bug: Author: ngie Date: Sun Jan 1 04:01:27 UTC 2017 New revision: 310994 URL: https://svnweb.freebsd.org/changeset/base/310994 Log: Make sys/vfs/lookup_cap_dotdot actually work with "kyua test" The tests don't work when reading/writing to file descriptors in the sandbox after entering capability mode (and wouldn't have, regardless of the framework), so adjust the tests so they function within the framework. For tests that enter capability mode over the course of the test, the following is now done: 1. Fork child process for capability mode test. 2. In child... i. Enter capability mode. ii. Test invariants. iii. Exit after calling test function. 3. Collect status for child and determine whether or not it completed successfully. In order to test the invariants in the child process, they now use assert(3) instead of ATF_REQUIRE*, as the atf-c-api functions right to results files in the directories in order to determine where and how tests fail. While in the area, fix several -Wshadow and -Wunused warnings found when I bumped WARNS up to 6, and fix some minor style(9) issues with indentation and type alignment. PR: 215690 Changes: head/tests/sys/vfs/lookup_cap_dotdot.c
As suspected, the framework fix is totally trivial. Something like this should do fine: https://github.com/cemeyer/atf/commit/317c80628513337af41b29fceeaa62fbaf498a02
(In reply to Conrad Meyer from comment #4) I agree with the change, but why did you revert the change now (before ATF/kyua has been fixed/updated)?
A commit references this bug: Author: ngie Date: Sun Jan 15 09:13:42 UTC 2017 New revision: 312215 URL: https://svnweb.freebsd.org/changeset/base/312215 Log: Mark testcases which use cap_enter as expected failures until the PR is resolved so those of us that run the tests don't have the bogus failures counted against our overall results PR: 215690 Changes: head/tests/sys/vfs/lookup_cap_dotdot.c
Forgotten to close?
Appears to be resolved by https://cgit.freebsd.org/src/commit/?id=c203bd70b5957f85616424b6fa374479372d06e3
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=1eec5861d52e074bc20d08aef051af59cc70040e commit 1eec5861d52e074bc20d08aef051af59cc70040e Author: Alex Richardson <arichardson@FreeBSD.org> AuthorDate: 2021-02-04 17:48:29 +0000 Commit: Alex Richardson <arichardson@FreeBSD.org> CommitDate: 2021-02-04 17:57:27 +0000 tests/sys/vfs/lookup_cap_dotdot: No longer aborts after ATF update It appears this test no longer fails after c203bd70b5957f85616424b6fa374479372d06e3. PR: 215690 tests/sys/vfs/lookup_cap_dotdot.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)
A commit in branch stable/13 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4643e1e846164be5fe0599eb9fbabdeaf87459c6 commit 4643e1e846164be5fe0599eb9fbabdeaf87459c6 Author: Alex Richardson <arichardson@FreeBSD.org> AuthorDate: 2021-02-04 17:48:29 +0000 Commit: Alex Richardson <arichardson@FreeBSD.org> CommitDate: 2021-03-17 12:22:03 +0000 tests/sys/vfs/lookup_cap_dotdot: No longer aborts after ATF update It appears this test no longer fails after c203bd70b5957f85616424b6fa374479372d06e3. PR: 215690 (cherry picked from commit 1eec5861d52e074bc20d08aef051af59cc70040e) tests/sys/vfs/lookup_cap_dotdot.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-)