mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-29 20:59:07 +08:00
A lot of tests in test_progs fail due to the missing trampoline implementation on s390x (and a handful for other reasons). Yet, a lot more pass, so disabling test_progs altogether is too heavy-handed. So add a mechanism for arch-specific blacklists (as discussed in [1]) and introduce a s390x blacklist, that simply reflects the status quo. [1] https://github.com/libbpf/libbpf/pull/204#discussion_r601768628 Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
43 lines
1.1 KiB
Bash
Executable File
43 lines
1.1 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
|
|
source $(cd $(dirname $0) && pwd)/helpers.sh
|
|
|
|
travis_fold start prepare_selftests "Building selftests"
|
|
|
|
sudo apt-get -y install python3-docutils # for rst2man
|
|
|
|
LLVM_VER=14
|
|
LIBBPF_PATH="${REPO_ROOT}"
|
|
|
|
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
|
|
|
|
if [[ "${KERNEL}" = 'LATEST' ]]; then
|
|
VMLINUX_H=
|
|
else
|
|
VMLINUX_H=${VMTEST_ROOT}/vmlinux.h
|
|
fi
|
|
|
|
make \
|
|
CLANG=clang-${LLVM_VER} \
|
|
LLC=llc-${LLVM_VER} \
|
|
LLVM_STRIP=llvm-strip-${LLVM_VER} \
|
|
VMLINUX_BTF="${VMLINUX_BTF}" \
|
|
VMLINUX_H=${VMLINUX_H} \
|
|
-C "${REPO_ROOT}/${REPO_PATH}/tools/testing/selftests/bpf" \
|
|
-j $((4*$(nproc))) >/dev/null
|
|
mkdir ${LIBBPF_PATH}/selftests
|
|
cp -R "${REPO_ROOT}/${REPO_PATH}/tools/testing/selftests/bpf" \
|
|
${LIBBPF_PATH}/selftests
|
|
cd ${LIBBPF_PATH}
|
|
rm selftests/bpf/.gitignore
|
|
git add selftests
|
|
|
|
git add "${VMTEST_ROOT}"/configs/blacklist/BLACKLIST-* "${VMTEST_ROOT}"/configs/whitelist/WHITELIST-*
|
|
|
|
travis_fold end prepare_selftests
|