Prevent a failure if system compiled with a WITHOUT_JAIL.
Details
- Reviewers
thj kp - Group Reviewers
tests - Commits
- rS363868: Skip sbin/route tests if jail not installed (WITHOUT_JAIL).
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
I have complicated feelings about this.
On the one hand, yes, this doesn't work if WITHOUT_JAIL is set. On there other hand, we can't reasonably enumerate all the tools we use just in case they get disabled (say we build WITHOUT_INET).
On the gripping hand, I've seen other tests where WITHOUT_$foo breaks something and I've fixed it with this same sort of change.
There's a larger problem I don't really see a solution to. I suspect we may end up simply having to accept that we need a default-built world to reliably run the tests.
I don't want to hold up your work, especially not for as small a change as this, so let's do this now, and hope someone smart (so not me) comes up with a good solution.
LGTM.
I was a bit surprised to learn that this code relies on the jq utility from ports, by the way:
$ grep -r jq sbin/route/tests/ sbin/route/tests/utils.subr: gateway=$(echo $result | jq -r ${query}.gateway) sbin/route/tests/basic.sh: atf_set require.progs jq sbin/route/tests/basic.sh: atf_set require.progs jq
I wish we had a tool capable of ingesting json in base :/...
CC: @lwhsu (unsure if jq is being installed as part of CI runs)
Yeah, that'd be nice, and it'd make a lot of sense, considering the libxo-ification of a lot of tools.
CC: @lwhsu (unsure if jq is being installed as part of CI runs)
It is, yes: https://github.com/freebsd/freebsd-ci/blob/master/scripts/build/build-test_image-head.sh#L76
One of the bridge tests used to also rely on it, but that test got changed.