From patchwork Wed Dec 24 16:27:48 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 5539861 Return-Path: X-Original-To: patchwork-linux-kbuild@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id EAB249F1CD for ; Wed, 24 Dec 2014 16:34:41 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 31320201CD for ; Wed, 24 Dec 2014 16:34:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5403F201D3 for ; Wed, 24 Dec 2014 16:34:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752073AbaLXQef (ORCPT ); Wed, 24 Dec 2014 11:34:35 -0500 Received: from resqmta-po-02v.sys.comcast.net ([96.114.154.161]:49300 "EHLO resqmta-po-02v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752569AbaLXQdO (ORCPT ); Wed, 24 Dec 2014 11:33:14 -0500 Received: from resomta-po-09v.sys.comcast.net ([96.114.154.233]) by resqmta-po-02v.sys.comcast.net with comcast id XUTA1p00452QWKC01UUAtQ; Wed, 24 Dec 2014 16:28:10 +0000 Received: from mail.gonehiking.org ([50.134.149.16]) by resomta-po-09v.sys.comcast.net with comcast id XUU91p00B0MU7Qa01UU90U; Wed, 24 Dec 2014 16:28:09 +0000 Received: from lorien.internal (lorien-wl.internal [192.168.1.40]) by mail.gonehiking.org (Postfix) with ESMTP id CBDE33FED4; Wed, 24 Dec 2014 09:28:08 -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 12/20] selftests/net: add install target to enable test install Date: Wed, 24 Dec 2014 09:27:48 -0700 Message-Id: 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=1419438490; bh=d12c3aweCmTO/rcKj10kT6ChsXq3PBY+tuImiFXyW6Y=; h=Received:Received:Received:From:To:Subject:Date:Message-Id; b=QKmirBDSeV7LZyrruYmCRWJXFHgCg6NQxs8IH2ABHqTF9kcj2yhbbvgfVlIYgdeSB /B6N3FVucJVkz0sLsXz6CnCsSyHajVlOnNd6WBSR+CBhHJhSV+bWyXIBOxSvsn+D7F ZuT88TxI+uVFzmz+PrqVaTuXzkrrMo0afbzzX1Qa7vsqWGYgZ2b6sNNu+steFDVQBs bhToFVXdFpbk1Fk3FuBWg604vsjGXl1RNd+U+7BxQzfKwQJBsdzIAjbpKbzlF5rZBg iaEQxfX5LtZJ0x9Myw5IgzQK/dClzdfOb9YfHGALoSsshrzCsgINSrYd9IQj/LE5OI nSKzWb5CwB7nw== 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/net/Makefile | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/net/Makefile b/tools/testing/selftests/net/Makefile index 62f22cc..2ffc96f 100644 --- a/tools/testing/selftests/net/Makefile +++ b/tools/testing/selftests/net/Makefile @@ -6,14 +6,28 @@ CFLAGS = -Wall -O2 -g CFLAGS += -I../../../../usr/include/ NET_PROGS = socket psock_fanout psock_tpacket +INSTALL_PROGS = run_netsocktests run_afpackettests test_bpf.sh $(NET_PROGS) +NETSOCK_TEST_STR = /bin/sh ./run_netsocktests || echo sockettests: [FAIL] +AFPKT_TEST_STR = /bin/sh ./run_afpackettests || echo afpackettests: [FAIL] +BFP_TEST_STR = ./test_bpf.sh all: $(NET_PROGS) %: %.c $(CC) $(CFLAGS) -o $@ $^ +install: +ifdef INSTALL_KSFT_PATH + install $(INSTALL_PROGS) $(INSTALL_KSFT_PATH) + @echo "$(NETSOCK_TEST_STR)" >> $(KSELFTEST) + @echo "$(AFPKT_TEST_STR)" >> $(KSELFTEST) + @echo "$(BFP_TEST_STR)" >> $(KSELFTEST) +else + @echo Run make kselftest_install in top level source directory +endif + run_tests: all - @/bin/sh ./run_netsocktests || echo "sockettests: [FAIL]" - @/bin/sh ./run_afpackettests || echo "afpackettests: [FAIL]" - ./test_bpf.sh + @$(NETSOCK_TEST_STR) + @$(AFPKT_TEST_STR) + @$(BFP_TEST_STR) clean: $(RM) $(NET_PROGS)