features: prog_test - make LircMode2 test optional again
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.
Timo Beckers authored 2 years ago
Timo Beckers committed 2 years ago
65 | 65 | testutils.SkipOnOldKernel(t, minVersion, feature) |
66 | 66 | |
67 | 67 | if err := HaveProgType(pt); err != nil { |
68 | if pt == ebpf.LircMode2 { | |
69 | // CI kernels are built with CONFIG_BPF_LIRC_MODE2, but some | |
70 | // mainstream distro's don't ship with it. Make this prog type | |
71 | // optional to retain compatibility with those kernels. | |
72 | testutils.SkipIfNotSupported(t, err) | |
73 | } | |
74 | ||
68 | 75 | t.Fatalf("Program type %s isn't supported even though kernel is at least %s: %v", pt.String(), minVersion, err) |
69 | 76 | } |
70 | 77 | }) |