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)
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:
Date: Sun Jan 1 04:01:27 UTC 2017
New revision: 310994
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
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
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.
As suspected, the framework fix is totally trivial. Something like this should do fine:
(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:
Date: Sun Jan 15 09:13:42 UTC 2017
New revision: 312215
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
Forgotten to close?