From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-18.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED, USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id B1BCDC433E9 for ; Fri, 29 Jan 2021 17:05:49 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8B64A64E05 for ; Fri, 29 Jan 2021 17:05:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231184AbhA2RFp (ORCPT ); Fri, 29 Jan 2021 12:05:45 -0500 Received: from mx2.suse.de ([195.135.220.15]:50494 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231603AbhA2RFV (ORCPT ); Fri, 29 Jan 2021 12:05:21 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1611939835; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=Z6zR0XQqrTKBlLVvSwA+m7AR7TPB5odyWJ8IV5OKNOU=; b=TwrFvuoREDPwW2D6wjuPbnfAqMX+YEjbTPIS5mfla85VzThtD86uxNuLaXNQpS002hNgya M/d9GEBZWxuyk2gSajmnvmc4/ZSm6kB6lmxDFXmIegjFudS/RwQeBrcUUwMnFeFIXQnV1I +f6r+EnLzu1kSFgATfVipzBtsonMUMY= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C1287AE61; Fri, 29 Jan 2021 17:03:55 +0000 (UTC) From: Richard Palethorpe To: ltp@lists.linux.it Cc: linux-can@vger.kernel.org, Oliver Hartkopp , Richard Palethorpe , Cyril Hrubis , Petr Vorel Subject: [PATCH v4 6/7] can: Remove obsolete test wrapper script Date: Fri, 29 Jan 2021 17:03:04 +0000 Message-Id: <20210129170305.27383-7-rpalethorpe@suse.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20210129170305.27383-1-rpalethorpe@suse.com> References: <20210129170305.27383-1-rpalethorpe@suse.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-can@vger.kernel.org Functionality moved into can_common.h and the test executables. Signed-off-by: Richard Palethorpe Reviewed-by: Cyril Hrubis Reviewed-by: Petr Vorel Acked-by: Oliver Hartkopp --- runtest/can | 4 +- testcases/network/can/Makefile | 2 - .../can/filter-tests/00_Descriptions.txt | 1 + testcases/network/can/filter-tests/INSTALL | 3 +- testcases/network/can/filter-tests/Makefile | 2 - .../network/can/filter-tests/can_run_tests.sh | 106 ------------------ 6 files changed, 5 insertions(+), 113 deletions(-) delete mode 100755 testcases/network/can/filter-tests/can_run_tests.sh diff --git a/runtest/can b/runtest/can index 6aa2ae9f5..b637183c6 100644 --- a/runtest/can +++ b/runtest/can @@ -1,2 +1,2 @@ -can_filter can_run_tests.sh can_filter -can_rcv_own_msgs can_run_tests.sh can_rcv_own_msgs +can_filter can_filter +can_rcv_own_msgs can_rcv_own_msgs diff --git a/testcases/network/can/Makefile b/testcases/network/can/Makefile index 31744534a..a69f6be87 100644 --- a/testcases/network/can/Makefile +++ b/testcases/network/can/Makefile @@ -22,6 +22,4 @@ top_srcdir ?= ../../.. include $(top_srcdir)/include/mk/env_pre.mk -INSTALL_TARGETS := *.sh - include $(top_srcdir)/include/mk/generic_trunk_target.mk diff --git a/testcases/network/can/filter-tests/00_Descriptions.txt b/testcases/network/can/filter-tests/00_Descriptions.txt index 89610982c..55d213456 100644 --- a/testcases/network/can/filter-tests/00_Descriptions.txt +++ b/testcases/network/can/filter-tests/00_Descriptions.txt @@ -5,5 +5,6 @@ information on the CAN network protocol family PF_CAN is contained in . For any issue(s) with CAN tests please write to: + , Oliver Hartkopp , diff --git a/testcases/network/can/filter-tests/INSTALL b/testcases/network/can/filter-tests/INSTALL index e549aed0f..7d62d65fe 100644 --- a/testcases/network/can/filter-tests/INSTALL +++ b/testcases/network/can/filter-tests/INSTALL @@ -12,7 +12,8 @@ enable CAN protocol, please see ltp/README file. $ make 2) To Run the tests from this directory, do: -$ ./run_ltp-can_tests.sh +$ ./can_filter +$ ./can_rcv_own_msgs 3) To let LTP run the tests from $LTPROOT, execute: $ ./runltp -f can diff --git a/testcases/network/can/filter-tests/Makefile b/testcases/network/can/filter-tests/Makefile index 6a9474164..29aaa3240 100644 --- a/testcases/network/can/filter-tests/Makefile +++ b/testcases/network/can/filter-tests/Makefile @@ -23,6 +23,4 @@ include $(top_srcdir)/include/mk/testcases.mk CPPFLAGS += -DETH_P_CAN=0x000C -DPF_CAN=29 -DAF_CAN=PF_CAN -INSTALL_TARGETS := *.sh - include $(top_srcdir)/include/mk/generic_leaf_target.mk diff --git a/testcases/network/can/filter-tests/can_run_tests.sh b/testcases/network/can/filter-tests/can_run_tests.sh deleted file mode 100755 index 762d90eca..000000000 --- a/testcases/network/can/filter-tests/can_run_tests.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh -################################################################################ -## Copyright (c) Oliver Hartkopp , 2011 ## -## Copyright (c) International Business Machines Corp., 2009 ## -## ## -## This program is free software; you can redistribute it and#or modify ## -## it under the terms of the GNU General Public License as published by ## -## the Free Software Foundation; either version 2 of the License, or ## -## (at your option) any later version. ## -## ## -## This program is distributed in the hope that it will be useful, but ## -## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## -## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## -## for more details. ## -## ## -## You should have received a copy of the GNU General Public License ## -## along with this program; if not, write to the Free Software Foundation, ## -## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## -## ## -################################################################################ - -TCID="$1" -TST_TOTAL=1 -export TST_COUNT - -. test.sh - -setup() -{ - tst_require_root - - # load needed CAN networklayer modules - modprobe can - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TCONF "modprobe can failed: ret - $ret" - fi - - modprobe can_raw - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TCONF "modprobe can_raw failed: ret - $ret" - fi - - # ensure the vcan driver to perform the ECHO on driver level - modprobe -r vcan - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TCONF "modprobe -r vcan failed: ret - $ret" - fi - - modprobe vcan echo=1 - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TCONF "modprobe vcan echo=1 failed: ret - $ret" - fi - - VCAN=vcan0 - - # create virtual CAN device - ip link add dev $VCAN type vcan - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TBROK \ - "ip link add dev $VCAN type vcan failed: ret - $ret" - fi - - ip link set dev $VCAN up - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TBROK "ip link set dev $VCAN up failed: ret - $ret" - fi - - # check precondition for CAN frame flow test - HAS_ECHO=`ip link show $VCAN | grep -c ECHO` - if [ $HAS_ECHO -ne 1 ]; then - tst_brkm TBROK "ECHO is not 1" - fi -} - -cleanup() -{ - ip link set dev $VCAN down - ip link del dev $VCAN - modprobe -r vcan - modprobe -r can_raw - modprobe -r can -} - -if [ $# -ne 1 ]; then - tst_brkm TBROK "Usage: $0 [can_filter | can_rcv_own_msgs]" -fi - -setup -TST_CLEANUP=cleanup - -"$1" "$VCAN" -ret=$? -case "$ret" in -0) tst_resm TPASS "Test $1 PASS";; -1) tst_resm TFAIL "Test $1 FAIL";; -32) tst_resm TCONF "$1 is not appropriate for configuration flag";; -*) tst_resm TBROK "Invalid resm type $ret";; -esac - -tst_exit -- 2.30.0 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Richard Palethorpe Date: Fri, 29 Jan 2021 17:03:04 +0000 Subject: [LTP] [PATCH v4 6/7] can: Remove obsolete test wrapper script In-Reply-To: <20210129170305.27383-1-rpalethorpe@suse.com> References: <20210129170305.27383-1-rpalethorpe@suse.com> Message-ID: <20210129170305.27383-7-rpalethorpe@suse.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: ltp@lists.linux.it Functionality moved into can_common.h and the test executables. Signed-off-by: Richard Palethorpe Reviewed-by: Cyril Hrubis Reviewed-by: Petr Vorel Acked-by: Oliver Hartkopp --- runtest/can | 4 +- testcases/network/can/Makefile | 2 - .../can/filter-tests/00_Descriptions.txt | 1 + testcases/network/can/filter-tests/INSTALL | 3 +- testcases/network/can/filter-tests/Makefile | 2 - .../network/can/filter-tests/can_run_tests.sh | 106 ------------------ 6 files changed, 5 insertions(+), 113 deletions(-) delete mode 100755 testcases/network/can/filter-tests/can_run_tests.sh diff --git a/runtest/can b/runtest/can index 6aa2ae9f5..b637183c6 100644 --- a/runtest/can +++ b/runtest/can @@ -1,2 +1,2 @@ -can_filter can_run_tests.sh can_filter -can_rcv_own_msgs can_run_tests.sh can_rcv_own_msgs +can_filter can_filter +can_rcv_own_msgs can_rcv_own_msgs diff --git a/testcases/network/can/Makefile b/testcases/network/can/Makefile index 31744534a..a69f6be87 100644 --- a/testcases/network/can/Makefile +++ b/testcases/network/can/Makefile @@ -22,6 +22,4 @@ top_srcdir ?= ../../.. include $(top_srcdir)/include/mk/env_pre.mk -INSTALL_TARGETS := *.sh - include $(top_srcdir)/include/mk/generic_trunk_target.mk diff --git a/testcases/network/can/filter-tests/00_Descriptions.txt b/testcases/network/can/filter-tests/00_Descriptions.txt index 89610982c..55d213456 100644 --- a/testcases/network/can/filter-tests/00_Descriptions.txt +++ b/testcases/network/can/filter-tests/00_Descriptions.txt @@ -5,5 +5,6 @@ information on the CAN network protocol family PF_CAN is contained in . For any issue(s) with CAN tests please write to: + , Oliver Hartkopp , diff --git a/testcases/network/can/filter-tests/INSTALL b/testcases/network/can/filter-tests/INSTALL index e549aed0f..7d62d65fe 100644 --- a/testcases/network/can/filter-tests/INSTALL +++ b/testcases/network/can/filter-tests/INSTALL @@ -12,7 +12,8 @@ enable CAN protocol, please see ltp/README file. $ make 2) To Run the tests from this directory, do: -$ ./run_ltp-can_tests.sh +$ ./can_filter +$ ./can_rcv_own_msgs 3) To let LTP run the tests from $LTPROOT, execute: $ ./runltp -f can diff --git a/testcases/network/can/filter-tests/Makefile b/testcases/network/can/filter-tests/Makefile index 6a9474164..29aaa3240 100644 --- a/testcases/network/can/filter-tests/Makefile +++ b/testcases/network/can/filter-tests/Makefile @@ -23,6 +23,4 @@ include $(top_srcdir)/include/mk/testcases.mk CPPFLAGS += -DETH_P_CAN=0x000C -DPF_CAN=29 -DAF_CAN=PF_CAN -INSTALL_TARGETS := *.sh - include $(top_srcdir)/include/mk/generic_leaf_target.mk diff --git a/testcases/network/can/filter-tests/can_run_tests.sh b/testcases/network/can/filter-tests/can_run_tests.sh deleted file mode 100755 index 762d90eca..000000000 --- a/testcases/network/can/filter-tests/can_run_tests.sh +++ /dev/null @@ -1,106 +0,0 @@ -#!/bin/sh -################################################################################ -## Copyright (c) Oliver Hartkopp , 2011 ## -## Copyright (c) International Business Machines Corp., 2009 ## -## ## -## This program is free software; you can redistribute it and#or modify ## -## it under the terms of the GNU General Public License as published by ## -## the Free Software Foundation; either version 2 of the License, or ## -## (at your option) any later version. ## -## ## -## This program is distributed in the hope that it will be useful, but ## -## WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY ## -## or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ## -## for more details. ## -## ## -## You should have received a copy of the GNU General Public License ## -## along with this program; if not, write to the Free Software Foundation, ## -## Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ## -## ## -################################################################################ - -TCID="$1" -TST_TOTAL=1 -export TST_COUNT - -. test.sh - -setup() -{ - tst_require_root - - # load needed CAN networklayer modules - modprobe can - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TCONF "modprobe can failed: ret - $ret" - fi - - modprobe can_raw - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TCONF "modprobe can_raw failed: ret - $ret" - fi - - # ensure the vcan driver to perform the ECHO on driver level - modprobe -r vcan - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TCONF "modprobe -r vcan failed: ret - $ret" - fi - - modprobe vcan echo=1 - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TCONF "modprobe vcan echo=1 failed: ret - $ret" - fi - - VCAN=vcan0 - - # create virtual CAN device - ip link add dev $VCAN type vcan - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TBROK \ - "ip link add dev $VCAN type vcan failed: ret - $ret" - fi - - ip link set dev $VCAN up - ret=$? - if [ $ret -ne 0 ]; then - tst_brkm TBROK "ip link set dev $VCAN up failed: ret - $ret" - fi - - # check precondition for CAN frame flow test - HAS_ECHO=`ip link show $VCAN | grep -c ECHO` - if [ $HAS_ECHO -ne 1 ]; then - tst_brkm TBROK "ECHO is not 1" - fi -} - -cleanup() -{ - ip link set dev $VCAN down - ip link del dev $VCAN - modprobe -r vcan - modprobe -r can_raw - modprobe -r can -} - -if [ $# -ne 1 ]; then - tst_brkm TBROK "Usage: $0 [can_filter | can_rcv_own_msgs]" -fi - -setup -TST_CLEANUP=cleanup - -"$1" "$VCAN" -ret=$? -case "$ret" in -0) tst_resm TPASS "Test $1 PASS";; -1) tst_resm TFAIL "Test $1 FAIL";; -32) tst_resm TCONF "$1 is not appropriate for configuration flag";; -*) tst_resm TBROK "Invalid resm type $ret";; -esac - -tst_exit -- 2.30.0