From patchwork Wed May 16 13:14:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petr Vorel X-Patchwork-Id: 914626 X-Patchwork-Delegate: petr.vorel@gmail.com 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=2001:1418:10:5::2; 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 [IPv6:2001:1418:10:5::2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40mFK13Ylkz9s3M for ; Wed, 16 May 2018 23:14:45 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 54B0E3E713C for ; Wed, 16 May 2018 15:14:42 +0200 (CEST) X-Original-To: ltp@lists.linux.it Delivered-To: ltp@picard.linux.it Received: from in-7.smtp.seeweb.it (in-7.smtp.seeweb.it [IPv6:2001:4b78:1:20::7]) by picard.linux.it (Postfix) with ESMTP id CCC5C3E7125 for ; Wed, 16 May 2018 15:14:40 +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-7.smtp.seeweb.it (Postfix) with ESMTPS id E281A201443 for ; Wed, 16 May 2018 15:14:39 +0200 (CEST) Received: from relay1.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 34337AEA6; Wed, 16 May 2018 13:14:39 +0000 (UTC) From: Petr Vorel To: ltp@lists.linux.it Date: Wed, 16 May 2018 15:14:30 +0200 Message-Id: <20180516131430.19090-1-pvorel@suse.cz> X-Mailer: git-send-email 2.16.3 X-Virus-Scanned: clamav-milter 0.99.2 at in-7.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-7.smtp.seeweb.it Subject: [LTP] [PATCH 1/1] net/tst_netload: TBROK when TST_NEEDS_TMPDIR not set 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" tst_netload function uses $TST_TMPDIR therefore requires TST_NEEDS_TMPDIR=1. It's better to tell user the reason, as current error message was a bit misleading: dccp_ipsec 1 TINFO: run server 'netstress -T dccp -R 500000 -B ' netstress: option requires an argument -- 'B' -h Prints this help -i n Execute test n times -I x Execute test for n seconds -C ARG Run child process with ARG arguments (used internally) -f Use TFO API, default is old API -F TCP_FASTOPEN_CONNECT socket option and standard API -t x Set tcp_fastopen value -S x Source address to bind -g x x - server port -b x x - low latency busy poll timeout -T x tcp (default), udp, dccp, sctp -z enable SO_ZEROCOPY Client: -H x Server name or IP address -l Become client, default is server -a x Number of clients running in parallel -r x Number of client requests -n x Client message size -N x Server message size -m x Reply timeout in microsec. -d x x is a path to file where result is saved -A x x max payload length (generated randomly) Server: -R x x requests after which conn.closed -q x x - TFO queue -B x run in background, x - process directory tst_test.c:492: BROK: Invalid option dccp_ipsec 1 TFAIL: server failed Signed-off-by: Petr Vorel --- testcases/lib/tst_net.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh index b0a78e14b..644f4242c 100644 --- a/testcases/lib/tst_net.sh +++ b/testcases/lib/tst_net.sh @@ -480,6 +480,10 @@ tst_netload() local s_replies="${TST_NETLOAD_MAX_SRV_REPLIES:-500000}" local s_opts= + if [ ! "$TST_NEEDS_TMPDIR" = 1 ]; then + tst_brk_ TBROK "Using tst_netload requires setting TST_NEEDS_TMPDIR=1" + fi + OPTIND=0 while getopts :a:H:d:n:N:r:R:S:b:t:T:fFe:m:A: opt; do case "$opt" in