kernel: helpers: add device present test case.

This script checks if the device is present in the kernel.
Signed-off-by: 's avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
parent 712efcd9
#!/bin/sh
TEST_CASE_ID="$1"
DRIVER="$2"
DEVICE="$3"
if [ -z "${TEST_CASE_ID}" -o -z "${DRIVER}" -o -z "${DEVICE}" ]; then
echo "Usage: $0 <test-case-id> <driver> <device>"
exit 1
fi
if [ -L /sys/bus/*/drivers/${DRIVER}/${DEVICE} ]; then
TEST_RESULT="pass"
else
TEST_RESULT="fail"
fi
lava-test-case "${TEST_CASE_ID}" --result ${TEST_RESULT}
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