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

ci: ignore kprobe_multi test failures on arm64 #1461

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ jobs:
runs-on: actuated-arm64-2cpu-8gb
needs: build-and-lint
timeout-minutes: 15
env:
EBPF_TEST_IGNORE_KERNEL_VERSION: 'TestKprobeMulti,TestKprobeMultiErrors,TestKprobeMultiCookie,TestKprobeMultiProgramCall,TestHaveBPFLinkKprobeMulti'
steps:
- uses: actions/checkout@v4

Expand All @@ -153,7 +155,7 @@ jobs:
- run: go install gotest.tools/[email protected]

- name: Test
run: gotestsum --ignore-non-json-output-lines --junitfile junit.xml -- -exec sudo -short -count 1 -json ./...
run: gotestsum --ignore-non-json-output-lines --junitfile junit.xml -- -exec 'sudo -E' -short -count 1 -json ./...

- name: Benchmark
run: go test -exec sudo -short -run '^$' -bench . -benchtime=1x ./...
Expand Down
13 changes: 7 additions & 6 deletions internal/testutils/feature.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ func checkFeatureTestError(t *testing.T, err error) {

var ufe *internal.UnsupportedFeatureError
if errors.As(err, &ufe) {
if ignoreKernelVersionCheck(t.Name()) {
t.Skipf("Ignoring error due to %s: %s", ignoreKernelVersionEnvVar, ufe.Error())
} else {
checkKernelVersion(t, ufe)
}
checkKernelVersion(t, ufe)
} else {
t.Error("Feature test failed:", err)
}
Expand Down Expand Up @@ -66,8 +62,13 @@ func checkKernelVersion(tb testing.TB, ufe *internal.UnsupportedFeatureError) {
return
}

tb.Helper()

if ignoreKernelVersionCheck(tb.Name()) {
tb.Skipf("Ignoring error due to %s: %s", ignoreKernelVersionEnvVar, ufe.Error())
}

if !isKernelLessThan(tb, ufe.MinimumVersion) {
tb.Helper()
tb.Fatalf("Feature '%s' isn't supported even though kernel is newer than %s",
ufe.Name, ufe.MinimumVersion)
}
Expand Down
Loading