-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Simplify NAT46x64,recorder tests #32068
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18c737f
to
cba5202
Compare
/ci-l4lb |
efc564f
to
39c0a25
Compare
/ci-l4lb |
/test |
39c0a25
to
e828af6
Compare
/test |
joestringer
commented
Apr 22, 2024
Avoid leaving state left behind unless explicitly requested. Signed-off-by: Joe Stringer <joe@cilium.io>
Apply all of the common configurations with a variable from the top of the file, to simplify tracking down the different configurations throughout the test. Signed-off-by: Joe Stringer <joe@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
This mirrors the exact same pattern in the IPv6->IPv6 case, see commit 129bc1e ("test,l4lb: Change expected error in L4LB test") for more details. Signed-off-by: Joe Stringer <joe@cilium.io>
For some reason, the installations of Cilium in this test seem to just randomly decide whether they're going to install with nat46x64 gateway enabled or not. I can't tell if this is intentional, so this commit changes all installs in this file to enable the feature. Signed-off-by: Joe Stringer <joe@cilium.io>
Make the test output more clear by echoing to the terminal a message whenever reconfiguring Cilium. Signed-off-by: Joe Stringer <joe@cilium.io>
These configurations were already being run elsewhere in the test. Signed-off-by: Joe Stringer <joe@cilium.io>
The initial test performs NAT46, Service 6to6, then does some validation around the scenarios. The second commit does the inverse, NAT64 and 4to4 with the same basic checks afterwards. This commit reworks the initial set of tests so that the code can be shared for both tests in a subsequent commit. Signed-off-by: Joe Stringer <joe@cilium.io>
No functional changes. This will be reused in the next commit by the NAT64 test. Signed-off-by: Joe Stringer <joe@cilium.io>
These tests were running practically the same logic, just duplicated. Now that the previous commit abstracted away the differences between the frontends and backends in the tests into common variables, we can convert the core of the test into a function and call it with different variables to run the different tests. Signed-off-by: Joe Stringer <joe@cilium.io>
Centralize the connectivity checks into a common function and update the output message to fail more clearly with a line number and other details about how the connection is being generated. Signed-off-by: Joe Stringer <joe@cilium.io>
Improve the tracing and failure output in the test. Signed-off-by: Joe Stringer <joe@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
Signed-off-by: Joe Stringer <joe@cilium.io>
If cilium-agent doesn't come up ready, print the logs to the terminal and fail out. This should make a common class of possible failure conditions much easier to debug. Signed-off-by: Joe Stringer <joe@cilium.io>
Move the declaration of the arrays of filters above the test code to make it easier to read through what the test is doing. While we're at it, silence unnecessary test output unless in verbose mode (env V=1). Signed-off-by: Joe Stringer <joe@cilium.io>
Add a couple of checks to ensure that all of the requested filters end up in the BPF maps. Signed-off-by: Joe Stringer <joe@cilium.io>
BASH_LINENO is an array, and only the first index is useful to understand the line number, so only format that part. Signed-off-by: Joe Stringer <joe@cilium.io>
Apparently the CI relies on this script only cleaning up after itself upon success, so switch the default behaviour back to this. On a local TTY, the developer will be asked whether to clean up the environment if there's a failure. Otherwise it'll only be cleaned up on success. Signed-off-by: Joe Stringer <joe@cilium.io>
Move the tests for the recorder lists into a dedicated function. Suggested-by: Tobias Klauser <tobias@cilium.io> Signed-off-by: Joe Stringer <joe@cilium.io>
e828af6
to
584a1b6
Compare
/test |
aspsk
approved these changes
Apr 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/CI
Continuous Integration testing issue or flake
area/loadbalancing
Impacts load-balancing and Kubernetes service implementations
ready-to-merge
This PR has passed all tests and received consensus from code owners to merge.
release-note/ci
This PR makes changes to the CI.
sig/datapath
Impacts bpf/ or low-level forwarding details, including map management and monitor messages.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Requires #32070 to test.
Review commit-by-commit to reason through the changes over the course of the PR.
Previously, these tests would emit very verbose output which was hard to
interpret when it failed, for instance a test may fail and this is the output:
If you understand what the test is trying to do and where in the test that
these commands were run, then you might be able to debug it. But for most
mortals, this output was not very easy to understand.
With this PR, the tests are reworked to only print verbose output when the
environment variable
V=1
is set, and by default it prints a much terserset of output, such as:
Or, on failure:
The annotated lines in the square brackets also provide a test file and line number where the failure occurred to make it easier to track down the failure and attempt to reproduce.