-
Notifications
You must be signed in to change notification settings - Fork 702
[FIX]: #4012 follow-ups (fixes and target test binaries) #4180
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[FIX]: #4012 follow-ups (fixes and target test binaries) #4180
Conversation
4a59607
to
b9e19f7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
Thanks @AkihiroSuda |
4a83d6d
to
f15db06
Compare
@AkihiroSuda updated the initial comment with some details about the UX. lmk your thoughts. Also, I am pretty sure there currently are tests that do not pass with the gomodjail targets (seen on another PR), but I think we can address that separately. Pending (mostly) green that should be good to go (going to do another proofread rn). |
testCase := nerdtest.Setup() | ||
|
||
testCase.Require = require.Not(nerdtest.Gomodjail) // FIXME | ||
// XXX Why? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To be removed once we confirm this passes - or uncommented with some details.
func TestRunSigProxy(t *testing.T) { | ||
testCase := nerdtest.Setup() | ||
testCase.Require = require.Not(nerdtest.Gomodjail) // FIXME | ||
// XXX Why? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ibid.
The PR title isn't descriptive |
f15db06
to
836ab28
Compare
|
Maybe... I am reading their source now. Do not like seeing an Curious why would that prevent the signal from being caught by the bash trap? Anyhow, I think the priority one is the flock question so that we can debug on a more solid ground. |
Why would we even need to actively check capabilities in that code path? 🤔
|
@AkihiroSuda this is new. v2.0.4 we do not have this. This got dragged in by cdi. IMHO this is just wrong (well, especially the init part). |
It is likely printed everywhere (where we hit one of the code paths above) |
I think it is a red herring. Well, this thing is a big problem in itself - but I am not convinced it is responsible for the test failure, which is probably a different issue. |
Cross posting a lot... |
Morning there (or whatever time it is) :-)
I am going to disable signal related tests for gomodjail for now, so that we can merge this PR. |
Signed-off-by: apostasie <[email protected]>
836ab28
to
4dd9ad9
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
This addresses a few issues from #4012 as a follow-up.
Besides a couple of mundane fixes, the bulk of it focuses on the ability to test binaries that are not named
docker
nornerdctl
.This feature is especially interesting:
Here is a list of things I wish I could test:
~/docker.xyz
nerdctl.gomodjail
lepton
/somerandompath/nerdctl.xyz
The proposal here is to expand on the existing
--test.target
flag, that currently only allowsdocker
andnerdctl
.The upside is that it strictly minimizes the amount of change required by the rest of the test tooling, is strictly backward compatible, and does not introduce new knobs.
Of course we still need a way to differentiate between docker, and "nerdishctl" binaries (cli that are expected to behave like nerdctl), as we do have specialized test behavior.
We do that here by checking
strings.HasPrefix(filepath.Base(binary), "docker")
.So:
go test ./cmd/nerdctl/... -test.target=~/docker.xyz
is treated as docker, while any other variant above is treated as a "nerdishctl".NOTE that:
nerdctl
, so, they got modifiedTarget
type and a couple of (now useless) consts have been removedThere is still some level of duplication between testutil / testutil/nerdtest - this is not new, and is transitory while we move to the new testing tooling - can be cleaned-up later on to keep this small.