Commit e0912c01 authored by Sumit Semwal's avatar Sumit Semwal Committed by Shuah Khan

selftests: lib: Skip tests on missing test modules

With older kernels, printf.sh and bitmap.sh fail because they can't find
the respective test modules they are looking for.

Use modprobe dry run to check for missing test_XXX module. Error out with
the same error code as prime_numbers.sh.
Signed-off-by: default avatarSumit Semwal <sumit.semwal@linaro.org>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 34539b6c
#!/bin/sh
# Runs bitmap infrastructure tests using test_bitmap kernel module
if ! /sbin/modprobe -q -n test_bitmap; then
echo "bitmap: [SKIP]"
exit 77
fi
if /sbin/modprobe -q test_bitmap; then
/sbin/modprobe -q -r test_bitmap
......
#!/bin/sh
# Runs printf infrastructure using test_printf kernel module
if ! /sbin/modprobe -q -n test_printf; then
echo "printf: [SKIP]"
exit 77
fi
if /sbin/modprobe -q test_printf; then
/sbin/modprobe -q -r test_printf
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment