diff --git a/travis-ci/vmtest/build_selftests.sh b/travis-ci/vmtest/build_selftests.sh index f09870d..24c9978 100755 --- a/travis-ci/vmtest/build_selftests.sh +++ b/travis-ci/vmtest/build_selftests.sh @@ -1,11 +1,15 @@ #!/bin/bash +set -euxo pipefail + LLVM_VER=11 LIBBPF_PATH="${REPO_ROOT}" REPO_PATH="travis-ci/vmtest/bpf-next" -# temporary work-around for failing tests -rm "${REPO_ROOT}/${REPO_PATH}/tools/testing/selftests/bpf/prog_tests/sockmap_basic.c" +PREPARE_SELFTESTS_SCRIPT=${VMTEST_ROOT}/prepare_selftests-${KERNEL}.sh +if [ -f "${PREPARE_SELFTESTS_SCRIPT}" ]; then + (cd "${REPO_ROOT}/${REPO_PATH}/tools/testing/selftests/bpf" && ${PREPARE_SELFTESTS_SCRIPT}) +fi make \ CLANG=clang-${LLVM_VER} \ @@ -21,5 +25,4 @@ cd ${LIBBPF_PATH} rm selftests/bpf/.gitignore git add selftests -blacklist_path="${VMTEST_ROOT}/configs/blacklist" -git add "${blacklist_path}" +git add "${VMTEST_ROOT}/configs/blacklist" diff --git a/travis-ci/vmtest/configs/blacklist/BLACKLIST-5.5.0 b/travis-ci/vmtest/configs/blacklist/BLACKLIST-5.5.0 index 21cd696..ebc5a4c 100644 --- a/travis-ci/vmtest/configs/blacklist/BLACKLIST-5.5.0 +++ b/travis-ci/vmtest/configs/blacklist/BLACKLIST-5.5.0 @@ -12,16 +12,25 @@ fentry_fexit # bpf_prog_test_tracing missing fentry_test # bpf_prog_test_tracing missing fexit_bpf2bpf # freplace is missing fexit_test # bpf_prog_test_tracing missing +flow_dissector # bpf_link-based flow dissector is in 5.8+ +flow_dissector_reattach get_stack_raw_tp # exercising BPF verifier bug causing infinite loop link_pinning # bpf_link is missing mmap # 5.5 kernel is too permissive with re-mmaping modify_return # fmod_ret support is missing ns_current_pid_tgid # bpf_get_ns_current_pid_tgid() helper is missing perf_branches # bpf_read_branch_records() helper is missing +ringbuf # BPF_MAP_TYPE_RINGBUF is supported in 5.8+ +reference_tracking/classifier/sk_lookup_success # bug in verifier w/ tracking references select_reuseport # UDP support is missing sk_assign # bpf_sk_assign helper missing +skb_helpers # helpers added in 5.8+ sockmap_listen # no listen socket supportin SOCKMAP skb_ctx # ctx_{size, }_{in, out} in BPF_PROG_TEST_RUN is missing +# latest Clang generates code that fails to verify +test_bpf_verif_scale/strobemeta.o +test_bpf_verif_scale/strobemeta_nounroll1.o +test_bpf_verif_scale/strobemeta_nounroll2.o test_global_funcs # kernel doesn't support BTF linkage=global on FUNCs test_lsm # no BPF_LSM support test_overhead # no fmod_ret support @@ -33,3 +42,4 @@ xdp_bpf2bpf # freplace is missing # TEMPORARILY DISABLED send_signal # flaky +cls_redirect # latest Clang breaks BPF verification diff --git a/travis-ci/vmtest/configs/blacklist/BLACKLIST-latest b/travis-ci/vmtest/configs/blacklist/BLACKLIST-latest index 30e48dc..f2cad34 100644 --- a/travis-ci/vmtest/configs/blacklist/BLACKLIST-latest +++ b/travis-ci/vmtest/configs/blacklist/BLACKLIST-latest @@ -2,3 +2,4 @@ send_signal # flaky test_lsm # semi-working sk_assign # needs better setup in Travis CI +cls_redirect # latest Clang breaks BPF verification diff --git a/travis-ci/vmtest/prepare_selftests-5.5.0.sh b/travis-ci/vmtest/prepare_selftests-5.5.0.sh new file mode 100755 index 0000000..2c874c1 --- /dev/null +++ b/travis-ci/vmtest/prepare_selftests-5.5.0.sh @@ -0,0 +1,12 @@ +#!/bin/bash + +set -euxo pipefail + +# these tests expect vmlinux.h to have latest defiition of bpf_devmap_val xdp_md->egress_ifindex +rm progs/test_xdp_with_devmap_helpers.c +rm progs/test_xdp_devmap_helpers.c +rm prog_tests/xdp_devmap_attach.c + +# no BPF_F_NO_PREALLOC in BTF and no sk_msg_md->sk field +rm progs/test_skmsg_load_helpers.c +rm prog_tests/sockmap_basic.c