test_user_copy.sh 452 B

123456789101112131415161718
  1. #!/bin/sh
  2. # SPDX-License-Identifier: GPL-2.0
  3. # Runs copy_to/from_user infrastructure using test_user_copy kernel module
  4. # Kselftest framework requirement - SKIP code is 4.
  5. ksft_skip=4
  6. if ! /sbin/modprobe -q -n test_user_copy; then
  7. echo "user: module test_user_copy is not found [SKIP]"
  8. exit $ksft_skip
  9. fi
  10. if /sbin/modprobe -q test_user_copy; then
  11. /sbin/modprobe -q -r test_user_copy
  12. echo "user_copy: ok"
  13. else
  14. echo "user_copy: [FAIL]"
  15. exit 1
  16. fi