Skip to content

Comments

tests: clean up ClangEndian#1389

Merged
lmb merged 2 commits intocilium:mainfrom
lmb:tests-clang-endian-cleanup
Mar 22, 2024
Merged

tests: clean up ClangEndian#1389
lmb merged 2 commits intocilium:mainfrom
lmb:tests-clang-endian-cleanup

Conversation

@lmb
Copy link
Contributor

@lmb lmb commented Mar 22, 2024

internal: remove ClangEndian

Replace uses of ClangEndian with a NativeFile test utility.

Signed-off-by: Lorenz Bauer <[email protected]>

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 <[email protected]>

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

Signed-off-by: Lorenz Bauer <[email protected]>
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 <[email protected]>
@lmb lmb marked this pull request as ready for review March 22, 2024 11:28
@lmb lmb requested review from a team, dylandreimerink and mmat11 as code owners March 22, 2024 11:28
@lmb lmb merged commit 9a277ae into cilium:main Mar 22, 2024
@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