Page MenuHomeFreeBSD

skip sbin/route jail test if jail not installed
ClosedPublic

Authored by olivier on Aug 3 2020, 9:46 PM.
Tags
None
Referenced Files
Unknown Object (File)
Oct 5 2024, 4:09 AM
Unknown Object (File)
Oct 4 2024, 11:52 PM
Unknown Object (File)
Oct 4 2024, 11:09 AM
Unknown Object (File)
Oct 1 2024, 9:11 PM
Unknown Object (File)
Oct 1 2024, 2:42 PM
Unknown Object (File)
Sep 28 2024, 4:28 AM
Unknown Object (File)
Sep 24 2024, 9:09 PM
Unknown Object (File)
Sep 24 2024, 8:55 PM
Subscribers

Details

Summary

Prevent a failure if system compiled with a WITHOUT_JAIL.

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

olivier created this revision.
kp accepted this revision.EditedAug 3 2020, 9:56 PM

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.

This revision is now accepted and ready to land.Aug 3 2020, 9:56 PM

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)

In D25935#575535, @ngie wrote:

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 :/...

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.