All of lore.kernel.org
 help / color / mirror / Atom feed
From: Shuah Khan <shuahkh@osg.samsung.com>
To: gregkh@linuxfoundation.org, akpm@linux-foundation.org,
	mmarek@suse.cz, davem@davemloft.net, keescook@chromium.org,
	tranmanphong@gmail.com, dh.herrmann@gmail.com, hughd@google.com,
	bobby.prani@gmail.com, ebiederm@xmission.com,
	serge.hallyn@ubuntu.com
Cc: Shuah Khan <shuahkh@osg.samsung.com>,
	linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-api@vger.kernel.org, netdev@vger.kernel.org
Subject: [PATCH 01/20] selftests/user: move test out of Makefile into a shell script
Date: Tue,  4 Nov 2014 10:10:57 -0700	[thread overview]
Message-ID: <76f92b5a7f05a6da6bfc1724716882a859d69c4c.1415117102.git.shuahkh@osg.samsung.com> (raw)
In-Reply-To: <cover.1415117102.git.shuahkh@osg.samsung.com>
In-Reply-To: <cover.1415117102.git.shuahkh@osg.samsung.com>

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>
---
 tools/testing/selftests/user/Makefile          |  8 +-------
 tools/testing/selftests/user/test_user_copy.sh | 10 ++++++++++
 2 files changed, 11 insertions(+), 7 deletions(-)
 create mode 100755 tools/testing/selftests/user/test_user_copy.sh

diff --git a/tools/testing/selftests/user/Makefile b/tools/testing/selftests/user/Makefile
index 396255b..12c9d15 100644
--- a/tools/testing/selftests/user/Makefile
+++ b/tools/testing/selftests/user/Makefile
@@ -4,10 +4,4 @@
 all:
 
 run_tests: all
-	@if /sbin/modprobe test_user_copy ; then \
-		rmmod test_user_copy; \
-		echo "user_copy: ok"; \
-	else \
-		echo "user_copy: [FAIL]"; \
-		exit 1; \
-	fi
+	./test_user_copy.sh
diff --git a/tools/testing/selftests/user/test_user_copy.sh b/tools/testing/selftests/user/test_user_copy.sh
new file mode 100755
index 0000000..350107f
--- /dev/null
+++ b/tools/testing/selftests/user/test_user_copy.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+# Runs copy_to/from_user infrastructure using test_user_copy kernel module
+
+if /sbin/modprobe -q test_user_copy; then
+	/sbin/modprobe -q -r test_user_copy
+	echo "user_copy: ok"
+else
+	echo "user_copy: [FAIL]"
+	exit 1
+fi
-- 
1.9.1


  reply	other threads:[~2014-11-04 17:23 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-11-04 17:10 [PATCH 00/20] kselftest install target feature Shuah Khan
2014-11-04 17:10 ` Shuah Khan [this message]
2014-11-04 17:10 ` [PATCH 02/20] selftests/net: move test out of Makefile into a shell script Shuah Khan
2014-11-04 19:53   ` David Miller
2014-11-05 15:28     ` Shuah Khan
2014-11-04 17:10 ` [PATCH 03/20] kbuild: kselftest_install - add a new make target to install selftests Shuah Khan
2014-11-04 17:11 ` [PATCH 04/20] selftests: add install target to enable installing selftests Shuah Khan
2014-11-04 17:11 ` [PATCH 05/20] selftests/breakpoints: add install target to enable installing test Shuah Khan
2014-11-04 17:11 ` [PATCH 06/20] selftests/cpu-hotplug: " Shuah Khan
2014-11-04 17:11 ` [PATCH 07/20] selftests/efivarfs: " Shuah Khan
2014-11-04 17:11 ` [PATCH 08/20] selftests/firmware: " Shuah Khan
2014-11-04 17:11   ` Shuah Khan
2014-11-04 17:11 ` [PATCH 09/20] selftests/ipc: " Shuah Khan
2014-11-04 17:11 ` [PATCH 10/20] selftests/kcmp: " Shuah Khan
2014-11-04 17:11 ` [PATCH 11/20] selftests/memfd: " Shuah Khan
2014-11-04 17:11   ` Shuah Khan
2014-11-04 17:11 ` [PATCH 12/20] selftests/memory-hotplug: " Shuah Khan
2014-11-04 17:11 ` [PATCH 13/20] selftests/mount: " Shuah Khan
2014-11-04 17:11 ` [PATCH 14/20] selftests/mqueue: " Shuah Khan
2014-11-04 17:11   ` Shuah Khan
2014-11-04 17:11 ` [PATCH 15/20] selftests/net: " Shuah Khan
2014-11-04 17:11 ` [PATCH 16/20] selftests/ptrace: " Shuah Khan
2014-11-04 17:11 ` [PATCH 17/20] selftests/sysctl: " Shuah Khan
2014-11-04 17:11 ` [PATCH 18/20] selftests/timers: " Shuah Khan
2014-11-04 17:11 ` [PATCH 19/20] selftests/vm: " Shuah Khan
2014-11-04 17:11 ` [PATCH 20/20] selftests/user: " Shuah Khan
2014-11-04 19:22 ` [PATCH 00/20] kselftest install target feature Kees Cook
2014-11-04 19:22   ` Kees Cook
2014-11-04 23:45   ` Shuah Khan
2014-11-05 23:23     ` Kees Cook

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=76f92b5a7f05a6da6bfc1724716882a859d69c4c.1415117102.git.shuahkh@osg.samsung.com \
    --to=shuahkh@osg.samsung.com \
    --cc=akpm@linux-foundation.org \
    --cc=bobby.prani@gmail.com \
    --cc=davem@davemloft.net \
    --cc=dh.herrmann@gmail.com \
    --cc=ebiederm@xmission.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hughd@google.com \
    --cc=keescook@chromium.org \
    --cc=linux-api@vger.kernel.org \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=netdev@vger.kernel.org \
    --cc=serge.hallyn@ubuntu.com \
    --cc=tranmanphong@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.