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

tests: clean up ClangEndian #1389

Merged
merged 2 commits into from
Mar 22, 2024
Merged

tests: clean up ClangEndian #1389

merged 2 commits into from
Mar 22, 2024

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Mar 22, 2024

internal: remove ClangEndian

Replace uses of ClangEndian with a NativeFile test utility.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

tests: remove !IsNativeEndian skips

We have a lot of tests which first glob a list of files containing BPF for
little and big endian, then parse those files and finally skip a test if the
files endianness doesn't match the native endianness.

This is pretty wasteful, since we parse BPF for no good reason and makes the
tests more verbose than they have to be. Use NativeFile instead and remove
almost all checks for IsNativeEndian from tests.

The two remaining cases are in the ELF loader tests, where they do have
value: we want to make sure that we can parse things from any endianness.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>

lmb added 2 commits March 22, 2024 10:11
Replace uses of ClangEndian with a NativeFile test utility.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
We have a lot of tests which first glob a list of files containing
BPF for little and big endian, then parse those files and finally
skip a test if the files endianness doesn't match the native
endianness.

This is pretty wasteful, since we parse BPF for no good reason and
makes the tests more verbose than they have to be. Use NativeFile
instead and remove almost all checks for IsNativeEndian from tests.

The two remaining cases are in the ELF loader tests, where they do
have value: we want to make sure that we can parse things from any
endianness.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb marked this pull request as ready for review March 22, 2024 11:28
@lmb lmb requested review from dylandreimerink, mmat11 and a team as code owners March 22, 2024 11:28
@lmb lmb merged commit 9a277ae into cilium:main Mar 22, 2024
15 checks passed
@lmb lmb deleted the tests-clang-endian-cleanup branch March 22, 2024 11:30
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.

1 participant