From patchwork Wed Dec 24 16:27:46 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 5539821 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id EF2E5BEEA8 for ; Wed, 24 Dec 2014 16:34:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 26AD22012D for ; Wed, 24 Dec 2014 16:34:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4F5F5201CD for ; Wed, 24 Dec 2014 16:34:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752584AbaLXQdP (ORCPT ); Wed, 24 Dec 2014 11:33:15 -0500 Received: from resqmta-po-10v.sys.comcast.net ([96.114.154.169]:40428 "EHLO resqmta-po-10v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752557AbaLXQdM (ORCPT ); Wed, 24 Dec 2014 11:33:12 -0500 Received: from resomta-po-04v.sys.comcast.net ([96.114.154.228]) by resqmta-po-10v.sys.comcast.net with comcast id XUU81p00A4vw8ds01UU8Pl; Wed, 24 Dec 2014 16:28:08 +0000 Received: from mail.gonehiking.org ([50.134.149.16]) by resomta-po-04v.sys.comcast.net with comcast id XUU71p00L0MU7Qa01UU7AL; Wed, 24 Dec 2014 16:28:08 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id 84EB13FED4; Wed, 24 Dec 2014 09:28:07 -0700 (MST) From: Shuah Khan To: mmarek@suse.cz, gregkh@linuxfoundation.org, akpm@linux-foundation.org, rostedt@goodmis.org, mingo@redhat.com, davem@davemloft.net, keescook@chromium.org, tranmanphong@gmail.com, mpe@ellerman.id.au, cov@codeaurora.org, dh.herrmann@gmail.com, hughd@google.com, bobby.prani@gmail.com, serge.hallyn@ubuntu.com, ebiederm@xmission.com, tim.bird@sonymobile.com, josh@joshtriplett.org, koct9i@gmail.com Cc: Shuah Khan , linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, netdev@vger.kernel.org Subject: [PATCH v3 10/20] selftests/mount: add install target to enable test install Date: Wed, 24 Dec 2014 09:27:46 -0700 Message-Id: <79fc8be2721f4b035bee4610ff5ba08da4422d7d.1419387513.git.shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: In-Reply-To: References: Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Add a new make target to enable installing test. This target installs test in the kselftest install location and add to the kselftest script to run the test. Install target can be run only from top level kernel source directory. Signed-off-by: Shuah Khan --- tools/testing/selftests/mount/Makefile | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/tools/testing/selftests/mount/Makefile b/tools/testing/selftests/mount/Makefile index 337d853..607de4c 100644 --- a/tools/testing/selftests/mount/Makefile +++ b/tools/testing/selftests/mount/Makefile @@ -1,5 +1,7 @@ # Makefile for mount selftests. +TEST_STR = if [ -f /proc/self/uid_map ] ; then ./unprivileged-remount-test ; fi + all: unprivileged-remount-test unprivileged-remount-test: unprivileged-remount-test.c @@ -7,7 +9,15 @@ unprivileged-remount-test: unprivileged-remount-test.c # Allow specific tests to be selected. test_unprivileged_remount: unprivileged-remount-test - @if [ -f /proc/self/uid_map ] ; then ./unprivileged-remount-test ; fi + @$(TEST_STR) + +install: +ifdef INSTALL_KSFT_PATH + install ./unprivileged-remount-test $(INSTALL_KSFT_PATH) + @echo "$(TEST_STR)" >> $(KSELFTEST) +else + @echo Run make kselftest_install in top level source directory +endif run_tests: all test_unprivileged_remount