Page MenuHomeFreeBSD

Improve pjdfstest run instructions
ClosedPublic

Authored by asomers on Jan 25 2017, 11:54 PM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, May 8, 3:59 PM
Unknown Object (File)
Wed, May 8, 2:55 PM
Unknown Object (File)
Apr 7 2024, 11:35 AM
Unknown Object (File)
Mar 11 2024, 1:23 PM
Unknown Object (File)
Mar 11 2024, 1:23 PM
Unknown Object (File)
Mar 11 2024, 1:23 PM
Unknown Object (File)
Mar 11 2024, 1:14 PM
Unknown Object (File)
Mar 11 2024, 1:13 PM
Subscribers

Details

Summary

Improve pjdfstest run instructions

Kyua will honor TMPDIR. Using that instead of PJDFSTEST_TEST_PATH preserves
Kyua's automatic cleanup mechanisms.

Diff Detail

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

Event Timeline

asomers retitled this revision from to Improve pjdfstest run instructions.
asomers updated this object.
asomers edited the test plan for this revision. (Show Details)
asomers added a reviewer: ngie.
share/doc/pjdfstest/README
26

This variable is still referenced in tests/sys/pjdfstest/tests/conf. It should be removed.

Also, I wrote this logic in a few years ago prior to atf/kyua overriding $TMPDIR. It might be a good idea to note that in the commit message.

32

Why remove this paragraph? I explicitly put this in because I ran into a scenario a handful of years ago where it was extremely difficult to fix my workstation after I ran pjdfstest on it and ran into some weird edgecase with the test suite that wasn't being handled properly.

share/doc/pjdfstest/README
32

I removed it because there's no need to set it when running with Kyua. Do you think there are still good reasons to run without Kyua?

share/doc/pjdfstest/README
32

I've seen people do interesting things running things manually.. if we're going to use $TMPDIR in the new directions, the code needs to support it as well so that repros remain consistent in all setups, assuming that they are complete repros.

share/doc/pjdfstest/README
32

Are you suggesting that pjdfstest should use TMPDIR even when not run by Kyua? Because that would break Kyua's isolation mechanisms, unless it does something complicated like:

if [ -n "$TMPDIR" -a ${PWD##$TMPDIR} != "$PWD" ]; then
    # PWD is under TMPIR.  We must be in Kyua
    PJDFSTEST_TEST_PATH="."
else
   PJDFSTEST_TEST_PATH=${TMPDIR:-/tmp}
fi
ngie edited edge metadata.
ngie added inline comments.
share/doc/pjdfstest/README
32

Yes. I'd rather the directions and the code did the same thing at the same time.

: ${TMPDIR:-/tmp}

... should suffice. I don't know of many people who are using pjdfstest to be honest, other than us, so if you add in a RelNotes: yes to the commit when making the change, I think it'll be ok

I'll be sure to file an internal bug to track this change and proactively update our automation to use $TMPDIR.

This revision is now accepted and ready to land.Feb 8 2017, 12:19 AM
ngie requested changes to this revision.Feb 8 2017, 12:19 AM
ngie edited edge metadata.

Sorry... I shouldn't have hit accept yet :/.

This revision now requires changes to proceed.Feb 8 2017, 12:19 AM
asomers added inline comments.
share/doc/pjdfstest/README
32

I don't like the snippet that I posted above. It's too complicated. How about I just remove handling for the PJDFSTEST_TEST_PATH variable and update the docs to say that if you're going to run it outside of Kyua, you must cd to the appropriate directory first?

share/doc/pjdfstest/README
32

That's fine -- please be sure to note that you need kyua 0.11 in order to use pjdfstest as noted in the commit message and add "Relnotes: yes".

asomers edited edge metadata.
asomers marked 5 inline comments as done.

Eliminate PJDFSTEST_TEST_PATH entirely

If the comment I noted above is changed to use prove, the change is good to go!

share/doc/pjdfstest/README
40

I don't recommend doing this. Running the test with prove is best given that it will analyze the results for pass/fail determination, e.g.

$ prove -rv /usr/tests/sys/pjdfstest/chmod/00
ok 199
not ok 200 # TODO S_ISGID should be removed and chmod(2) should success and FreeBSD returns EPERM.
ok 201
ok 202
ok 203
Failed 67/203 subtests 

Test Summary Report
-------------------
/usr/tests/sys/pjdfstest/chmod/00 (Wstat: 0 Tests: 203 Failed: 67)
  Failed tests:  44-46, 48-50, 53-60, 62-64, 67-71, 114-129
                143, 147, 151, 155, 159, 163, 166-181, 183
                187, 191, 195-198
Files=1, Tests=203, 29 wallclock secs ( 0.06 usr  0.05 sys +  0.27 cusr  0.60 csys =  0.98 CPU)
Result: FAIL
$

(the test run failed because I ran it as a non-root user)

asomers marked an inline comment as done.
asomers edited edge metadata.

If not using Kyua, use prove

ngie edited edge metadata.

Thank you <3!

This revision is now accepted and ready to land.Feb 21 2017, 8:56 PM
This revision was automatically updated to reflect the committed changes.