Skip to content

Commit

Permalink
features: prog_test - make LircMode2 test optional again
Browse files Browse the repository at this point in the history
As it turns out, some mainstream distributions (Ubuntu, for one) build with
LIRC disabled, which also disables this prog type. To keep the test suite
compatible with most hosts, make it optional once more.
  • Loading branch information
ti-mo committed Aug 12, 2021
1 parent 7140d2c commit 896b668
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions features/prog_test.go
Expand Up @@ -66,6 +66,13 @@ func TestHaveProgType(t *testing.T) {
testutils.SkipOnOldKernel(t, minVersion, feature)

if err := HaveProgType(pt); err != nil {
if pt == ebpf.LircMode2 {
// CI kernels are built with CONFIG_BPF_LIRC_MODE2, but some
// mainstream distro's don't ship with it. Make this prog type
// optional to retain compatibility with those kernels.
testutils.SkipIfNotSupported(t, err)
}

t.Fatalf("Program type %s isn't supported even though kernel is at least %s: %v", pt.String(), minVersion, err)
}
})
Expand Down

0 comments on commit 896b668

Please sign in to comment.