Skip to content
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

prog: recognize ENOTSUPP in testRun() #653

Merged
merged 1 commit into from May 4, 2022

Conversation

ti-mo
Copy link
Collaborator

@ti-mo ti-mo commented May 2, 2022

Not all program types support PROG_TEST_RUN on all kernel versions. Previously, when testing a program type that didn't have a test runner implemented, the following error would be returned:

Error when running: can't test program: can't run test: errno 524

Since this isn't overly descriptive, make it clear to the caller that the kernel supports test runs, just not for the particular program type.

@ti-mo ti-mo requested a review from lmb May 2, 2022 15:37
prog.go Outdated Show resolved Hide resolved
Not all program types support PROG_TEST_RUN on all kernel versions.
Previously, when testing a program type that didn't have a test runner
implemented, the following error would be returned:

  Error when running: can't test program: can't run test: errno 524

Since this isn't overly descriptive, make it clear to the caller that
the kernel supports test runs, just not for the particular program type.

Also fixes haveProgTestRun on kernels between 4.12 (where PROG_TEST_RUN
was introduced) and 4.16 (where sk_filter test runner was added).

Signed-off-by: Timo Beckers <timo@isovalent.com>
@ti-mo ti-mo force-pushed the tb/prog-test-run-enotsupp branch from d1732f5 to 0a7276f Compare May 4, 2022 07:34
@ti-mo ti-mo merged commit aed00a2 into cilium:master May 4, 2022
@ti-mo ti-mo deleted the tb/prog-test-run-enotsupp branch May 4, 2022 07:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants