Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/user: move test out of Makefile into a shell script

Currently user copy test is run from the Makefile. Move it out
of the Makefile to be run from a shell script to allow the test
to be run as stand-alone test, in addition to allowing the test
run from a make target.

Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>

+11 -7
+1 -7
tools/testing/selftests/user/Makefile
··· 4 4 all: 5 5 6 6 run_tests: all 7 - @if /sbin/modprobe test_user_copy ; then \ 8 - rmmod test_user_copy; \ 9 - echo "user_copy: ok"; \ 10 - else \ 11 - echo "user_copy: [FAIL]"; \ 12 - exit 1; \ 13 - fi 7 + ./test_user_copy.sh
+10
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 + if /sbin/modprobe -q test_user_copy; then 5 + /sbin/modprobe -q -r test_user_copy 6 + echo "user_copy: ok" 7 + else 8 + echo "user_copy: [FAIL]" 9 + exit 1 10 + fi