-
Notifications
You must be signed in to change notification settings - Fork 144
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
Test improvements #431
Merged
Merged
Test improvements #431
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
We missed adding these exports when adding new tools to be tested. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
We moved the libxdp tests to separate namespaces, but not the tool tests. Let's move the tool tests as well, since they also mess with namespace setups, so it's better to make sure they don't interfere with the rest of the system. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
The test_runner.sh script is derived from the test-netns script originally developed for the xdp-tutorial, and still contains a lot of the legacy from there. Specifically, it uses a state directory with file system-based state to support interactive execution, saving state across multiple invocations of the script. However, the way we execute the tests here, we always clean up everything in the same run, so all this state saving complexity is unnecessary. Get rid of it and store most things in global variables, so we save this complexity. This also makes it possible to support creating multiple namespaces at the same time, which will be needed for adding tests for the xdp-forward tool. For now, we just create two namespaces (with matching veth pairs), but only use one of them, but future tests will use both for forwarding tests. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Support passing test names to 'make test' invocations as TESTS=names... This makes it easier to debug particular tests that are failing. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Some of the xdpdump test definitions were making particular assumptions about the interface names and IP addresses used for the test setup, which broke during the test harness refactor. Fixup the test definitions to remove those assumptions. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Add support for entering interactive test debugging when DEBUG_TESTENV=1 is set in the environment. This will execute $SHELL inside the namespace that is setup for the test run, after setting up the test interfaces, making it easy to manually run tests in the same environment to debug things. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
When setting up the test environment, make sure to enable GRO on the veth interfaces, so that XDP redirection will work. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Since we run in a separate mount namespace, we should always mount a new bpffs during setup. This way, we are sure the bpffs instance will be removed once we exit the test run, which ensures that no pinned programs are left at the end of the test. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
We rely on `set -o errexit` to abort tests if any of the setup commands fail. However, we don't want this turned on during test execution, since we rely on explicit checks using check_run() to check the output of certain commands in the tests. So move the errexit to cover only the setup function. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
tohojo
force-pushed
the
test-improvements
branch
2 times, most recently
from
August 5, 2024 11:06
41f7a5f
to
20e2422
Compare
Add 6.6 and 6.10 kernels to the test matrix. Change the test definition format a bit to make it less verbose on the YAML side, making it easier to add new kernel versions in the future. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
tohojo
force-pushed
the
test-improvements
branch
2 times, most recently
from
August 5, 2024 12:22
72e907a
to
3d73785
Compare
…itly Instead of having to define the DID_UNSHARE value explicitly as part of the test matrix, set the environment variable programmatically based on the kernel version. This removes the need for an 'include' block and some copy-paste to accommodate the two old kernel versions. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Make sure we use the right apt repository for the version of Ubuntu used as the workflow runner. Explicitly select ubuntu-22.04 (instead of ubuntu-latest) to make sure the distro version doesn't change out from under us when Github updates their runner config. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Instead of only testing on LLVM 16, add different LLVM versions to the test matrix for wider test coverage. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
tohojo
force-pushed
the
test-improvements
branch
from
August 5, 2024 12:32
3d73785
to
9a56de0
Compare
Silence deprecation warnings about old node.js versions. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
The workflow job mostly consists of running the selftests, so 'selftest' is more descriptive than 'build'. Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This contains all the improvements to the test runners added while adding the xdp-forward utility (in #430). These changes make sense on their own and we can merge them independently of the xdp-forward utility.