On Tue, Jun 25, 2019 at 8:32 AM Dan Rue <dan.rue@xxxxxxxxxx> wrote: > > On Mon, Jun 24, 2019 at 12:58:15PM -0700, Alexei Starovoitov wrote: > > On Mon, Jun 24, 2019 at 12:53 PM Dan Rue <dan.rue@xxxxxxxxxx> wrote: > > > > > > I would say if it's not possible to check at runtime, and it requires > > > clang 9.0, that this test should not be enabled by default. > > > > The latest clang is the requirement. > > If environment has old clang or no clang at all these tests will be failing. > > Hi Alexei! > > I'm not certain if I'm interpreting you as you intended, but it sounds > like you're telling me that if the test build environment does not use > 'latest clang' (i guess latest as of today?), that these tests will > fail, and that is how it is going to be. If I have that wrong, please > correct me and disregard the rest of my message. > > Please understand where we are coming from. We (and many others) run > thousands of tests from a lot of test frameworks, and so our environment > often has mutually exclusive requirements when it comes to things like > toolchain selection. > > We believe, strongly, that a test should not emit a "fail" for a missing > requirement. Fail is a serious thing, and should be reserved for an > actual issue that needs to be investigated, reported, and fixed. > > This is how we treat test failures - we investigate, report, and fix > them when possible. When they're not real failures, we waste our time > (and yours, in this case). > > By adding the tests to TEST_GEN_PROGS, you're adding them to the general > test set that those of us running test farms try to run continuously > across a wide range of hardware environments and kernel branches. you run the latest selftests/bpf on the latest kernel, right? If not than selftests/bpf is not for your setup. In the past people argued that selftests/bpf should check features of the kernel and skip when features are not found. My answer to that was always the same: such changes to selftests for older kernels need to live out of tree. selftests/bpf are one to one to the latest kernel. Often kernel commit X will break selftests and they're fixed in the commit X+1. clang, pahole, bpftool, iproute2 provide those features for the kernel. In other words new kernel features rely on new clang and other tools and selftests are testing those latest kernel features. Without new clang many new features cannot be tested exhaustively. datasec and btf are just few examples. Hence if your test farm cannot install the latest clang, pahole, etc then I recommend not to run selftest/bpf.