vmtest: libbpf#137 follow-ups

- Run test_{maps|verifier} only with the latest kernel
- Mount run control script
- Style

Signed-off-by: Julia Kartseva (hex@fb.com)
This commit is contained in:
Julia Kartseva
2020-03-11 14:48:35 -07:00
committed by Andrii Nakryiko
parent 9a424bea42
commit ef4785f065
2 changed files with 16 additions and 18 deletions

View File

@@ -10,7 +10,7 @@ test_progs() {
test_maps() {
echo TEST_MAPS
# Allow failing on older kernels.
./test_maps || [ ${KERNEL} != 'LATEST' ]
./test_maps
}
test_verifier() {
@@ -31,13 +31,9 @@ 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
test_progs
exit $exitcode
if [[ "${KERNEL}" == 'latest' ]]; then
test_maps
test_verifier
fi