mirror of
https://github.com/netdata/libbpf.git
synced 2026-04-11 02:59:07 +08:00
vmtests: check in vmlinux.h and use it for non-latest builds
Manually generate vmlinux.h based on latest.config to be used for non-latest selftest build. This will keep bpftool and newest selftests builds succeeding, while at runtime blacklist will skip them. Signed-off-by: Andrii Nakryiko <andriin@fb.com>
This commit is contained in:
committed by
Andrii Nakryiko
parent
803243cc33
commit
d08d57cd91
@@ -11,13 +11,20 @@ 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)))
|
||||
-j $((2*$(nproc)))
|
||||
mkdir ${LIBBPF_PATH}/selftests
|
||||
cp -R "${REPO_ROOT}/${REPO_PATH}/tools/testing/selftests/bpf" \
|
||||
${LIBBPF_PATH}/selftests
|
||||
|
||||
Reference in New Issue
Block a user