-
Notifications
You must be signed in to change notification settings - Fork 457
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
Automatically disable p4tc tests when the necessary environment is missing #5177
base: main
Are you sure you want to change the base?
Conversation
09febd1
to
763bfd5
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.
With the caveat I have no TC knowledge the changes look good to me, but I don't see how are the python changes related. I'll wait from someone from TC to take a look before I approve.
The TC script had a problem where they caused exceptions to be thrown when a binary was missing. The Python changes handle these exceptions gracefully. Let me move them to a separate PR. |
c09ce43
to
371a3c1
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.
Unless I'm misunderstanding something, with this PR the p4tc compilation tests have stopped running even when the p4tc tag is on
Guess I was a bit too aggressive. Need to have two separate checks for the normal compilation tests and the STF ones. |
@vbnogueira I remember now why the tests were disabled. Could you look at the failures and tell me on what system or CI they are meant to be run? |
So the mac tests shouldn't run any of the p4tc compilation tests |
It seems like the ubuntu-18 test was skipped on all the previous PRs, so we didn't catch this |
Let me see how we can check for that. Ideally I want to get to a point where we do not have to add all these filters to |
For ubuntu, you can try checking whether the
|
eebd7bf
to
2eb0cae
Compare
It looks like tests are now running as expected and are also being filtered correctly. @vbnogueira let me know whether the CMake requirements and changes make sense to you. Edit: Actually need to make sure to check the package correctly to filter the 18.04 tests. |
c93f968
to
3c1425a
Compare
I'll wait for the tests to finish to approve, but it looks ok to me |
Working on some tweaks which are causing failures. Hope to resolve that soon. The problem is when you run in Docker, the kernel version can be mismatched with the Linux headers, which is what I am running into here. |
3c1425a
to
cbacc50
Compare
set (SUPPORTS_KERNEL True) | ||
endif() | ||
include(CheckLinuxKernel) | ||
check_minimum_kernel_version("4.15.0" SUPPORTS_KERNEL) |
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.
Just a minor nit, shouldn't you also check the linux libc version
as well here for consistency?
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.
Was thinking about this, yeah. But wasn't sure whether that could have unintended side effects. I think it is safe though.
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.
I see
I don't think there would be any side effects, the check shouldn't cause any trouble
It's just that you could encounter the same issue in the future where the host's kernel version is supported, but the libc version in the container isn't for the ebpf backend as well
It should be a rare case, but could happen
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.
There was a bunch of commit spam because I ran into an (unrelated) bug. The latest version should include the additional check.
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.
Looks good to me
c6a89f1
to
740bcce
Compare
dc8ccf9
to
412f1db
Compare
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
Signed-off-by: fruffy <[email protected]>
412f1db
to
bafd232
Compare
Signed-off-by: fruffy <[email protected]>
bafd232
to
e3fbe36
Compare
Do not add P4TC STF tests when certain components are missing. Currently this is just
brctl
andclang-15
, but there might be other things we can check for.Also add some typing to the
run-tc-test.py
and fix some incorrect error output and handling.@vbnogueira Could you give this a review?