Skip to content

Conversation

lmb
Copy link
Collaborator

@lmb lmb commented Mar 3, 2025

More prep work to make the Windows support easier to add.

collection: remove obsolete TestCollectionSpecLoadCopy

The test was added in bf5a6cd6 ("collection: don't copy btf.Spec in
CollectionSpec.Copy()"). We now copy the spec, so the test doesn't add
anything meaningful.

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

collection: remove TestCollectionSpecLoadMutate

Replace the test added in 278a9141 ("map: check MapReplacements 
compatibility after applying BPF_F_MMAPABLE") with one that doesn't rely on
the ELF reader.

collection: fix missing Map.Close in collectionLoader.loadMap

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

program: rework TestProgramRunEmptyData

Remove the test in favour of a much shorter assert in TestProgramRun. Also
remove the now unnecessary version skip, since we don't test against such
old kernel versions anymore.

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

program: remove duplicate TestProgramVerifierOutput

The test is a less exhaustive version of TestProgramVerifierLog, remove it.

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

testutils: add missing t.Helper() calls

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

lmb added 3 commits March 3, 2025 11:05
The test was added in bf5a6cd ("collection: don't copy btf.Spec
in CollectionSpec.Copy()"). We now copy the spec, so the test doesn't
add anything meaningful.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Replace the test added in 278a914 ("map: check MapReplacements
compatibility after applying BPF_F_MMAPABLE") with one that doesn't
rely on the ELF reader.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb force-pushed the windows-test-fixes-more branch from 7424d92 to 84865dc Compare March 3, 2025 19:20
lmb added 3 commits March 3, 2025 19:54
Stop relying on SkLookup for the test and instead use a SocketFilter.
Simply assert that we get EINVAL from the kernel.

Also remove a now unnecessary version skip, since we don't test
against such old kernel versions anymore.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
The test is a less exhaustive version of TestProgramVerifierLog,
remove it.

Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
Signed-off-by: Lorenz Bauer <lmb@isovalent.com>
@lmb lmb force-pushed the windows-test-fixes-more branch from 84865dc to d78cf4c Compare March 3, 2025 19:55
@lmb lmb marked this pull request as ready for review March 3, 2025 21:35
@lmb lmb requested a review from a team as a code owner March 3, 2025 21:35
@lmb lmb merged commit 322ef4a into cilium:main Mar 3, 2025
17 checks passed
@lmb lmb deleted the windows-test-fixes-more branch March 3, 2025 21:35
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.

2 participants