mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-31 21:59:06 +08:00
The disk image is updated to 2020-03-11. blacklist for LATEST kernel: attach_probe (needs root cause) perf_buffer (needs root cause) send_signal (flaky) sockmap_listen (flaky) Run test_maps and test_verifier. test_maps is not expected to pass for kernels other then LATEST. Signed-off-by: Julia Kartseva (hex@fb.com)
44 lines
844 B
Bash
Executable File
44 lines
844 B
Bash
Executable File
#!/bin/bash
|
|
|
|
set -euxo pipefail
|
|
|
|
test_progs() {
|
|
echo TEST_PROGS
|
|
./test_progs ${BLACKLIST:+-b$BLACKLIST} ${WHITELIST:+-t$WHITELIST}
|
|
}
|
|
|
|
test_maps() {
|
|
echo TEST_MAPS
|
|
# Allow failing on older kernels.
|
|
./test_maps || [ ${KERNEL} != 'LATEST' ]
|
|
}
|
|
|
|
test_verifier() {
|
|
echo TEST_VERIFIER
|
|
./test_verifier
|
|
}
|
|
|
|
configs_path='libbpf/travis-ci/vmtest/configs'
|
|
blacklist_path="$configs_path/blacklist/BLACKLIST-${KERNEL}"
|
|
if [[ -s "${blacklist_path}" ]]; then
|
|
BLACKLIST=$(cat "${blacklist_path}" | tr '\n' ',')
|
|
fi
|
|
|
|
whitelist_path="$configs_path/whitelist/WHITELIST-${KERNEL}"
|
|
if [[ -s "${whitelist_path}" ]]; then
|
|
WHITELIST=$(cat "${whitelist_path}" | tr '\n' ',')
|
|
fi
|
|
|
|
cd libbpf/selftests/bpf
|
|
|
|
set +e
|
|
exitcode=0
|
|
for test_func in test_progs test_maps test_verifier; do
|
|
${test_func}; c=$?
|
|
if [[ $c -ne 0 ]]; then
|
|
exitcode=$c
|
|
fi
|
|
done
|
|
|
|
exit $exitcode
|