From patchwork Mon Sep 13 12:39:34 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 1527342 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bell-sw-com.20150623.gappssmtp.com header.i=@bell-sw-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=bPycLtau; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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=) Received: from picard.linux.it (picard.linux.it [IPv6:2001:1418:10:5::2]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H7R0d73XQz9sW4 for ; Mon, 13 Sep 2021 22:40:49 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 5883A3C927C for ; Mon, 13 Sep 2021 14:40:40 +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 [IPv6:2001:4b78:1:20::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 53CCB3C86BB for ; Mon, 13 Sep 2021 14:40:38 +0200 (CEST) Received: from mail-lj1-x22a.google.com (mail-lj1-x22a.google.com [IPv6:2a00:1450:4864:20::22a]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-3.smtp.seeweb.it (Postfix) with ESMTPS id D3AA51A00FDF for ; Mon, 13 Sep 2021 14:40:37 +0200 (CEST) Received: by mail-lj1-x22a.google.com with SMTP id r3so17059978ljc.4 for ; Mon, 13 Sep 2021 05:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bell-sw-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ROqYq+MNuXYoF6btipNaurwRf9PPaunphTBJ0clPE9s=; b=bPycLtauTf5YUUu+L6/ld/NFkpGZbo2JXQM2Uv6kRMxoWRbOBmCy30OwCf7udeDw1h u4oH/7/N2G1MkH5jUetIAJhGM2ybAorAPaas0bn33Jbzv5BslkMXVqZ+SymzquayoYgE gaZdH0Jjv3canWjs5Jh2pJ2NYOQWhIrm/kDZChueeFsAAc4FUJnudVmZytLznF5xm9CE 6SWNJxjvx6F/ZR2IYEyl0WZNM1ccqwFWJptPG1EVslKy/Ygg6ml5/ff94z2MjImWcyAN 3TqPkfp6wnMw0riCg95Zx8EJgxLGp9GyKSnvWM4wUOq1tuv8YB4sF40p/wOHyy8vt3T7 +RaA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=ROqYq+MNuXYoF6btipNaurwRf9PPaunphTBJ0clPE9s=; b=VJdrZJn75cBeVDmCMokYqu92qj+yoJgEjXBEgod1KB4uTMTU6290jf6Wi+Xqpbxucf ZyErQuHrTTftdQHkiDYSbVP/b8hnRKmPVD6QEi2h+Rtkk0s3OY4SVLNYQo5Ct4bZWbHr aMauBEy4CGrucKdXz/ns26RL38IaOQhYbH5CnzYmTxeQILEZ2K1TWQOv1BfYuiyOZMNt haVqJtpSjGb23jrxJjN+x039OYkV/IDUQwEWy70blBPyWhz5nR7RdFbQTuVCaHN+CrSf ZNwfEVaYjBYGwfzStt9xVgbLwiVBg3adMlxF26/LuboFOE3whK9UIwbUu8y5Pa3DniIw vD2g== X-Gm-Message-State: AOAM531zzmsT5UjkBfnLoiuNaF3y502zdNxd0bIp8GfntaKeBZrvw+Ox 9iGux8LUVV/ZIn0KibTmFAZaKAgAc2wD X-Google-Smtp-Source: ABdhPJz7DuoasOw0qzD5NqxBWRMEbBirPSsjTY33t/+63TP6Z07ARxTBef8W/YerqkV1IcBmEXhwCw== X-Received: by 2002:a2e:9e05:: with SMTP id e5mr10266011ljk.166.1631536836824; Mon, 13 Sep 2021 05:40:36 -0700 (PDT) Received: from localhost.localdomain ([95.161.221.177]) by smtp.gmail.com with ESMTPSA id z4sm814560lfd.298.2021.09.13.05.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 05:40:36 -0700 (PDT) From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 13 Sep 2021 15:39:34 +0300 Message-Id: <20210913123935.10761-1-aleksei.kodanev@bell-sw.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-3.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-3.smtp.seeweb.it Subject: [LTP] [PATCH 1/2] lib/tst_net.sh: ignore errors on rhost with -i option in tst_net_run() X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" Unfortanetly busysbox/sysctl with -e option only suppresses the warning about unknown keys and still returns exit code 1: sysctl -h ... -e don't warn about unknown keys As a result busy_poll01 fails on this error: busy_poll01.sh busy_poll01 1 TINFO: initialize 'lhost' 'ltp_ns_veth2' interface ... busy_poll01 1 TINFO: set low latency busy poll to 50 busy_poll01 1 TBROK: 'sysctl -q -w '-e' net.core.busy_read=50' failed on '': '' So let's add a new option (-i) in tst_net_run() to ignore the error when running the command on "rhost". Signed-off-by: Alexey Kodanev Reviewed-by: Petr Vorel --- testcases/lib/tst_net.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh index 958d71e3d..7f2a1bab3 100644 --- a/testcases/lib/tst_net.sh +++ b/testcases/lib/tst_net.sh @@ -212,6 +212,7 @@ tst_rhost_run() # -l LPARAM: parameter passed to CMD in lhost # -r RPARAM: parameter passed to CMD in rhost # -q: quiet mode (suppress failure warnings) +# -i: ignore errors on rhost # CMD: command to run (this must be binary, not shell builtin/function due # tst_rhost_run() limitation) # RETURN: 0 on success, 1 on missing CMD or exit code on lhost or rhost @@ -227,12 +228,13 @@ tst_net_run() local quiet local OPTIND - while getopts l:qr:s opt; do + while getopts l:qr:si opt; do case "$opt" in l) lparams="$OPTARG" ;; q) quiet=1 ;; r) rparams="$OPTARG" ;; s) lsafe="ROD"; rsafe="-s" ;; + i) rsafe="" ;; *) tst_brk_ TBROK "tst_net_run: unknown option: $OPTARG" ;; esac done @@ -916,9 +918,9 @@ tst_set_sysctl() [ "$3" = "safe" ] && safe="-s" local rparam= - [ "$TST_USE_NETNS" = "yes" ] && rparam="-r '-e'" + [ "$TST_USE_NETNS" = "yes" ] && rparam="-i -r '-e'" - tst_net_run $safe $rparam "sysctl" "-q -w $name=$value" + tst_net_run $safe -q $rparam "sysctl" "-q -w $name=$value" } tst_cleanup_rhost() From patchwork Mon Sep 13 12:39:35 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexey Kodanev X-Patchwork-Id: 1527343 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=bell-sw-com.20150623.gappssmtp.com header.i=@bell-sw-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=FAoK2W3m; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) 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=) Received: from picard.linux.it (picard.linux.it [213.254.12.146]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4H7R0h6Hjbz9sX3 for ; Mon, 13 Sep 2021 22:40:52 +1000 (AEST) Received: from picard.linux.it (localhost [IPv6:::1]) by picard.linux.it (Postfix) with ESMTP id 957493C8A87 for ; Mon, 13 Sep 2021 14:40:49 +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 [217.194.8.7]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by picard.linux.it (Postfix) with ESMTPS id 516733C57F9 for ; Mon, 13 Sep 2021 14:40:38 +0200 (CEST) Received: from mail-lj1-x234.google.com (mail-lj1-x234.google.com [IPv6:2a00:1450:4864:20::234]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by in-7.smtp.seeweb.it (Postfix) with ESMTPS id EE577200C70 for ; Mon, 13 Sep 2021 14:40:37 +0200 (CEST) Received: by mail-lj1-x234.google.com with SMTP id o11so9538984ljp.8 for ; Mon, 13 Sep 2021 05:40:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bell-sw-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=LHob2xLgOtHSJf5nHiEAESL2t6edjqfwsBFjHlaHrmk=; b=FAoK2W3mT+3jegHpryAOsAnCru7P6HmFleyp3nQpjRnEK/ybDJkZ5hoVVVDVgvy+PP gRHQokqZ2N8n9mjwnmbFhqhsqMhlskhI43S3ofsi/ekE0PibZUbW2iHV08gIAyBA4JjB D80nwWCIAm8jBlCRJqOILcDxSi1DY2UWNyxflERvykPNVcfIuhEKKAXCGCwsrdip5T6z rZyTRFzWkutXXc01+krT+SMWM8ga6tMUhKbJdJ0qzmtOy2IIkpoXK2h+V118KYVa8iEW 81KS0BShH2zOAy0J3zubh6teJwtxaKbAOR1X9F9Db5YJdRxWMGIQrYgnIoKRU5DvD69d Ekkg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=LHob2xLgOtHSJf5nHiEAESL2t6edjqfwsBFjHlaHrmk=; b=tg3nc+bodqk58q0mvDrfSeo5xTZg50WP94ImXI5K7P/1x3coa/w7JG6RJylotbd692 wiL0P4d9Dq91ExOHNK05EFOUlmPVJBpCs4uL75Q+jYjcSnsUSFXTUQwHfYtBaVD0GChJ psSi7Vu+UtVypTL3qFLQKgI1ee7M7g9VWyHhyke4NJeJnW3TW3D5XxaWyXPwvQ5nrFTv 1A9Or6mkzotaqDaLBZfMBxtt/O0G2CUBTlhUDZbqBVc8zwjrFA0j14+pTR48pmuXNWr6 fyLtztJ/HjFh/AiOkRGartpyZpW9z0D0purhz1HfTqzXWgmO4N9C5ue/gxSILyr4pePa 9Xig== X-Gm-Message-State: AOAM533UaVSuU04YCXuP+aaVDktc220woeYhh4rcVegeAtfvZpLKV4f5 50EVN+/qvTAgHnp98gdlUPOysqXBe0je X-Google-Smtp-Source: ABdhPJwaQFdI5gCkMuS5Q2olaqwkzgPtciw3pKz5CwxHzvT94xEcv7kE86SHn5d593p6ASNDfHOkyA== X-Received: by 2002:a2e:88d0:: with SMTP id a16mr10340464ljk.81.1631536837192; Mon, 13 Sep 2021 05:40:37 -0700 (PDT) Received: from localhost.localdomain ([95.161.221.177]) by smtp.gmail.com with ESMTPSA id z4sm814560lfd.298.2021.09.13.05.40.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Sep 2021 05:40:36 -0700 (PDT) From: Alexey Kodanev To: ltp@lists.linux.it Date: Mon, 13 Sep 2021 15:39:35 +0300 Message-Id: <20210913123935.10761-2-aleksei.kodanev@bell-sw.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210913123935.10761-1-aleksei.kodanev@bell-sw.com> References: <20210913123935.10761-1-aleksei.kodanev@bell-sw.com> MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.102.4 at in-7.smtp.seeweb.it X-Virus-Status: Clean X-Spam-Status: No, score=0.1 required=7.0 tests=DKIM_SIGNED,DKIM_VALID, SPF_HELO_NONE,SPF_PASS autolearn=disabled version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on in-7.smtp.seeweb.it Subject: [LTP] [PATCH 2/2] lib/tst_net.sh: disable ipv6_dad work on test interfaces X-BeenThere: ltp@lists.linux.it X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux Test Project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Su Yue Errors-To: ltp-bounces+incoming=patchwork.ozlabs.org@lists.linux.it Sender: "ltp" To fix intermittent issues with ping (in flood mode) [1] tests after initial test interfaces setup. We're already adding IPv6 addresses with nodad option, but it should disable ipv6_dad for link-local addresses too, so that they are fully functional when tests start to use them. It could also be tst_wait_ipv6_dad(), but it slows down a test setup. [1]: https://github.com/iputils/iputils/issues/300 Tested-by: Su Yue Signed-off-by: Alexey Kodanev Reviewed-by: Petr Vorel --- testcases/lib/tst_net.sh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/testcases/lib/tst_net.sh b/testcases/lib/tst_net.sh index 7f2a1bab3..89d4c79ec 100644 --- a/testcases/lib/tst_net.sh +++ b/testcases/lib/tst_net.sh @@ -517,6 +517,7 @@ tst_init_iface() ip link set $iface down || return $? ip route flush dev $iface || return $? ip addr flush dev $iface || return $? + sysctl -qw net.ipv6.conf.$iface.accept_dad=0 || return $? ip link set $iface up return $? fi @@ -528,6 +529,7 @@ tst_init_iface() tst_rhost_run -c "ip link set $iface down" || return $? tst_rhost_run -c "ip route flush dev $iface" || return $? tst_rhost_run -c "ip addr flush dev $iface" || return $? + tst_rhost_run -c "sysctl -qw net.ipv6.conf.$iface.accept_dad=0" || return $? tst_rhost_run -c "ip link set $iface up" }