Codebase list golang-github-cilium-ebpf / 896b668
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
1 changed file(s) with 7 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
6565 testutils.SkipOnOldKernel(t, minVersion, feature)
6666
6767 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
6875 t.Fatalf("Program type %s isn't supported even though kernel is at least %s: %v", pt.String(), minVersion, err)
6976 }
7077 })