GNU Linux-libre 4.9.309-gnu1
[releases.git] / tools / testing / selftests / user / test_user_copy.sh
1 #!/bin/sh
2 # Runs copy_to/from_user infrastructure using test_user_copy kernel module
3
4 # Kselftest framework requirement - SKIP code is 4.
5 ksft_skip=4
6
7 if ! /sbin/modprobe -q -n test_user_copy; then
8         echo "user: module test_user_copy is not found [SKIP]"
9         exit $ksft_skip
10 fi
11 if /sbin/modprobe -q test_user_copy; then
12         /sbin/modprobe -q -r test_user_copy
13         echo "user_copy: ok"
14 else
15         echo "user_copy: [FAIL]"
16         exit 1
17 fi