mirror of
https://github.com/netdata/libbpf.git
synced 2026-03-26 19:29:07 +08:00
- Run test_{maps|verifier} only with the latest kernel
- Mount run control script
- Style
Signed-off-by: Julia Kartseva (hex@fb.com)
40 lines
737 B
Bash
Executable File
40 lines
737 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
|
|
}
|
|
|
|
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
|
|
|
|
test_progs
|
|
|
|
if [[ "${KERNEL}" == 'latest' ]]; then
|
|
test_maps
|
|
test_verifier
|
|
fi
|