From patchwork Thu Apr 5 13:30:18 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 895378 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.linux.it (client-ip=213.254.12.146; helo=picard.linux.it; envelope-from=ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=suse.cz Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40H3cS6Xvwz9s0n for ; Thu, 5 Apr 2018 23:30:48 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id E7B453E781C for ; Thu, 5 Apr 2018 15:30:45 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-3.smtp.seeweb.it (in-3.smtp.seeweb.it [217.194.8.3]) by picard.linux.it (Postfix) with ESMTP id 77FC03E7309 for ; Thu, 5 Apr 2018 15:30:39 +0200 (CEST) Received: from mx2.suse.de (mx2.suse.de [195.135.220.15]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id 9CD3D1A017A7 for ; Thu, 5 Apr 2018 15:30:34 +0200 (CEST) Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id BAEA9ACE6; Thu, 5 Apr 2018 13:30:33 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Thu, 5 Apr 2018 15:30:18 +0200 Message-Id: <20180405133024.2279-1-pvorel@suse.cz> X-Mailer: git-send-email 2.16.2 X-Virus-Scanned: clamav-milter 0.99.2 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=-0.0 required=7.0 tests=SPF_PASS autolearn=disabled version=3.4.0 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on in-3.smtp.seeweb.it Subject: [LTP] [RFC PATCH v5 0/6] Rewriting network tests into new shell API X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.18 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Hi, found some more issues with parameters. Kind regards, Petr Changelog v4->v5: * Fix handling getopts parameters in scripts which are using legacy API with getopts (ipsec_lib.sh, tcp_fastopen_run.sh, rpc_test.sh) by shifting args after getopts and moving sourcing tst_net.sh after that. Also -6 param for IPv6 must be passed to tst_net.sh (ipsec_lib.sh, tcp_fastopen_run.sh). * Fixed iver for legacy scripts (caused some bugs at least in interfaces tests). Changes v3->v4: * Fixed bugs with setting TST_IPV6 and ipver variables. Now added into setup function (for new API they must not be used in test scripts outside setup/run/cleanup functions as they're not set). * New commit: 6/6 "network/interface: Split tests to test only one command per test" A bit complicated than I thought (adding tst_test_cmds and using it would be simpler), but I guess separation is better (as Cyril noted). I needed to pass -c as getopts parameter. * Renamed functions in tst_net.sh (Alexey). * Fixed script name in Makefile, changed output of usage (Alexey). * Export TST_ID, LTPROOT and TST_DATAROOT also for TST_NO_DEFAULT_RUN (Cyril). Petr Vorel (6): tst_net.sh: Support both new and legacy APIs + rename tst_test.sh: Introduce TST_NO_DEFAULT_RUN network.sh: Migrate to new shell API network/interface: Cleanup if4-addr-change tst_net_stress.sh: Migrate with dependencies to new API + rename network/interface: Split tests to test only one command per test runtest/net_stress.interface | 38 ++++-- testcases/lib/{test_net.sh => tst_net.sh} | 150 ++++++++++++++------- testcases/lib/tst_test.sh | 91 +++++++------ testcases/network/README.md | 4 +- testcases/network/busy_poll/busy_poll01.sh | 3 +- testcases/network/busy_poll/busy_poll02.sh | 3 +- testcases/network/busy_poll/busy_poll03.sh | 3 +- testcases/network/dccp/dccp01.sh | 3 +- testcases/network/dctcp/dctcp01.sh | 3 +- testcases/network/dhcp/dhcpd_tests.sh | 3 +- testcases/network/dhcp/dnsmasq_tests.sh | 3 +- testcases/network/iproute/ip_tests.sh | 3 +- testcases/network/multicast/mc_cmds/mc_cmds | 3 +- testcases/network/multicast/mc_commo/mc_commo | 3 +- testcases/network/multicast/mc_member/mc_member | 3 +- testcases/network/multicast/mc_opts/mc_opts | 3 +- testcases/network/nfs/fsx-linux/fsx.sh | 3 +- testcases/network/nfs/nfs_stress/nfs01 | 3 +- testcases/network/nfs/nfs_stress/nfs02 | 3 +- testcases/network/nfs/nfs_stress/nfs03 | 3 +- testcases/network/nfs/nfs_stress/nfs04 | 3 +- testcases/network/nfs/nfs_stress/nfs05 | 3 +- testcases/network/nfs/nfs_stress/nfs06 | 3 +- testcases/network/nfs/nfslock01/nfslock01 | 3 +- testcases/network/nfs/nfsstat01/nfsstat01 | 3 +- testcases/network/rpc/basic_tests/rpc01/rpc01 | 3 +- .../network/rpc/basic_tests/rpcinfo/rpcinfo01 | 3 +- testcases/network/rpc/basic_tests/rup/rup01 | 3 +- testcases/network/rpc/basic_tests/rusers/rusers01 | 3 +- testcases/network/rpc/rpc-tirpc/rpc_test.sh | 4 +- testcases/network/sctp/sctp01.sh | 3 +- testcases/network/sockets/bind_noport01.sh | 3 +- .../network/stress/broken_ip/broken_ip4-checksum | 3 +- .../network/stress/broken_ip/broken_ip4-dstaddr | 3 +- .../network/stress/broken_ip/broken_ip4-fragment | 3 +- testcases/network/stress/broken_ip/broken_ip4-ihl | 3 +- .../network/stress/broken_ip/broken_ip4-protcol | 3 +- .../network/stress/broken_ip/broken_ip4-totlen | 3 +- .../network/stress/broken_ip/broken_ip4-version | 3 +- .../network/stress/broken_ip/broken_ip6-dstaddr | 3 +- .../network/stress/broken_ip/broken_ip6-nexthdr | 3 +- testcases/network/stress/broken_ip/broken_ip6-plen | 3 +- .../network/stress/broken_ip/broken_ip6-version | 3 +- testcases/network/stress/dns/dns-stress | 3 +- testcases/network/stress/ftp/ftp-download-stress | 3 +- testcases/network/stress/ftp/ftp-upload-stress | 3 +- testcases/network/stress/http/http-stress | 3 +- testcases/network/stress/interface/if-addr-adddel | 53 +++----- .../network/stress/interface/if-addr-addlarge | 58 +++----- testcases/network/stress/interface/if-lib.sh | 50 +++++++ testcases/network/stress/interface/if-mtu-change | 49 +++---- testcases/network/stress/interface/if-route-adddel | 56 +++----- .../network/stress/interface/if-route-addlarge | 52 +++---- testcases/network/stress/interface/if-updown | 49 +++---- testcases/network/stress/interface/if4-addr-change | 71 +++++----- testcases/network/stress/ipsec/ipsec_lib.sh | 10 +- .../grp-operation/mcast-group-multiple-socket | 16 ++- .../multicast/grp-operation/mcast-group-same-group | 17 ++- .../grp-operation/mcast-group-single-socket | 17 ++- .../grp-operation/mcast-group-source-filter | 17 ++- .../stress/multicast/grp-operation/mcast-lib.sh | 17 +-- testcases/network/stress/ns-tools/Makefile | 2 +- .../{test_net_stress.sh => tst_net_stress.sh} | 32 +++-- testcases/network/stress/ssh/ssh-stress | 3 +- testcases/network/tcp_cmds/arping/arping01.sh | 3 +- .../network/tcp_cmds/clockdiff/clockdiff01.sh | 3 +- testcases/network/tcp_cmds/ipneigh/ipneigh01.sh | 3 +- testcases/network/tcp_cmds/ping/ping01.sh | 3 +- testcases/network/tcp_cmds/ping/ping02.sh | 3 +- testcases/network/tcp_cmds/rlogin/rlogin01 | 3 +- testcases/network/tcp_cmds/sendfile/sendfile01 | 3 +- testcases/network/tcp_cmds/tcpdump/tcpdump01 | 3 +- testcases/network/tcp_cmds/telnet/telnet01 | 3 +- .../network/tcp_cmds/tracepath/tracepath01.sh | 3 +- testcases/network/tcp_fastopen/tcp_fastopen_run.sh | 17 ++- testcases/network/traceroute/traceroute01.sh | 3 +- testcases/network/virt/geneve01.sh | 3 +- testcases/network/virt/gre01.sh | 3 +- testcases/network/virt/ipvlan01.sh | 3 +- testcases/network/virt/macvlan01.sh | 3 +- testcases/network/virt/macvtap01.sh | 3 +- testcases/network/virt/vlan01.sh | 3 +- testcases/network/virt/vlan02.sh | 3 +- testcases/network/virt/vlan03.sh | 3 +- testcases/network/virt/vxlan01.sh | 3 +- testcases/network/virt/vxlan02.sh | 3 +- testcases/network/virt/vxlan03.sh | 3 +- testcases/network/xinetd/xinetd_tests.sh | 3 +- testscripts/network.sh | 7 +- 89 files changed, 609 insertions(+), 466 deletions(-) rename testcases/lib/{test_net.sh => tst_net.sh} (86%) create mode 100644 testcases/network/stress/interface/if-lib.sh rename testcases/network/stress/ns-tools/{test_net_stress.sh => tst_net_stress.sh} (88%)