test_user_copy.sh 417 B

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