From patchwork Tue Jan 6 19:43:22 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 5576421 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.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 8C9AFBF6C3 for ; Tue, 6 Jan 2015 19:48:54 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id ACA8B20254 for ; Tue, 6 Jan 2015 19:48:53 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 71E7320221 for ; Tue, 6 Jan 2015 19:48:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932546AbbAFTst (ORCPT ); Tue, 6 Jan 2015 14:48:49 -0500 Received: from resqmta-ch2-04v.sys.comcast.net ([69.252.207.36]:50825 "EHLO resqmta-ch2-04v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932407AbbAFTss (ORCPT ); Tue, 6 Jan 2015 14:48:48 -0500 X-Greylist: delayed 303 seconds by postgrey-1.27 at vger.kernel.org; Tue, 06 Jan 2015 14:48:48 EST Received: from resomta-ch2-20v.sys.comcast.net ([69.252.207.116]) by resqmta-ch2-04v.sys.comcast.net with comcast id cjju1p0042XD5SV01jju4o; Tue, 06 Jan 2015 19:43:54 +0000 Received: from mail.gonehiking.org ([50.134.149.16]) by resomta-ch2-20v.sys.comcast.net with comcast id cjjs1p0020MU7Qa01jjsX3; Tue, 06 Jan 2015 19:43:54 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id B299840C1C; Tue, 6 Jan 2015 12:43:51 -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, masami.hiramatsu.pt@hitachi.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 v4 08/20] selftests/memfd: add install target to enable test install Date: Tue, 6 Jan 2015 12:43:22 -0700 Message-Id: <4353762c318dad84798bb9f45bb338be7bb3891f.1420571615.git.shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: In-Reply-To: References: DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net; s=q20140121; t=1420573434; bh=/BANzweBZf9MuTzJdPoX0DA7NtkXF4/XJRzeZpPkcdc=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=ZCP5jNJJWpQ35M4PLmls9b/02x0DtaauVLki+vBnZaKupHmPcHhbNfRfa0FWHWh4C T+D12woqPW3T5lMs3fbD0mi+liju+/W5inXQVGzOxJB7BaarPlYP4BafEH6xb4DOEF PIeYT757jK+Dv3NfTAsjUE+GIxKLKNx2sGZBwDGcOBmgmWoMzU5+BNdGM6beXiMqtr nI4xv9mqibXUrJDHfyAM9jV0tGJFqlyD4lYqChNZjLMour0CIXxe49H3t++7KEhS2I hwkKpNv0iSTwNTdAR0v/VYgteB/xwpMb0iE6kQjdk1Hlkkd/7TNGzepjwwT9qeMasw BIRtLWNAcuj1g== 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.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID,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/memfd/Makefile | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/memfd/Makefile b/tools/testing/selftests/memfd/Makefile index b80cd10..23c84bf 100644 --- a/tools/testing/selftests/memfd/Makefile +++ b/tools/testing/selftests/memfd/Makefile @@ -2,19 +2,30 @@ CFLAGS += -D_FILE_OFFSET_BITS=64 CFLAGS += -I../../../../include/uapi/ CFLAGS += -I../../../../include/ +INSTALL_PROGS = memfd_test fuse_test run_fuse_test.sh +MEMFD_TEST_STR = ./memfd_test || echo 'memfd_test: [FAIL]' +FUSE_TEST_STR = ./run_fuse_test.sh || echo 'fuse_test: [FAIL]' + all: gcc $(CFLAGS) memfd_test.c -o memfd_test +install: +ifdef INSTALL_KSFT_PATH + install $(INSTALL_PROGS) $(INSTALL_KSFT_PATH) + @echo "$(MEMFD_TEST_STR)" >> $(KSELFTEST) +else + @echo "Run make kselftest_install in top level source directory" +endif + run_tests: all - gcc $(CFLAGS) memfd_test.c -o memfd_test - @./memfd_test || echo "memfd_test: [FAIL]" + @$(MEMFD_TEST_STR) build_fuse: gcc $(CFLAGS) fuse_mnt.c `pkg-config fuse --cflags --libs` -o fuse_mnt gcc $(CFLAGS) fuse_test.c -o fuse_test run_fuse: build_fuse - @./run_fuse_test.sh || echo "fuse_test: [FAIL]" + @$(FUSE_TEST_STR) clean: $(RM) memfd_test fuse_test