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=-6.8 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,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 E5992C32792 for ; Thu, 3 Oct 2019 17:05:58 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id B097020830 for ; Thu, 3 Oct 2019 17:05:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570122358; bh=RZ0r+49xVQffCkzokeOCJEC2HowsVBwZlOcoarKVGkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:List-ID:From; b=VBEsaZiJiF2N7rsWMM+o6x1U25lBfX2neEmlz9YeX3zV83TJgz/Vqv8QJUQtGkR/Q e7R3EBNYT8n3hTjD9zQQdNPkKpg3UlFpqQpvKgXSBdSbJd+ze90VVnCzVeqgs5lat7 ObY8jvslhGKjd6VyQ5Peq7zGPVfez6T9COrfCqoY= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2392388AbfJCQir (ORCPT ); Thu, 3 Oct 2019 12:38:47 -0400 Received: from mail.kernel.org ([198.145.29.99]:48492 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392360AbfJCQio (ORCPT ); Thu, 3 Oct 2019 12:38:44 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 5AD5820830; Thu, 3 Oct 2019 16:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1570120723; bh=RZ0r+49xVQffCkzokeOCJEC2HowsVBwZlOcoarKVGkk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xJhMkA2yGseTAjByqYNMWfWfTllQTGSVjHRJyNy4ibgdWMJApsF02SW/nW86EOBDt H8y5H0KsJtaVdsrFURwNbhFw4tsa1r7uqxHKLE4qe0cI6LcX1DcWXLROD+5iAQxb3t yLnQeEXEoIXp2POBo0VITsPU0nSQW4pYYCgR+bUg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, David Ahern , Jakub Kicinski Subject: [PATCH 5.3 015/344] selftests: Update fib_tests to handle missing ping6 Date: Thu, 3 Oct 2019 17:49:40 +0200 Message-Id: <20191003154541.593957517@linuxfoundation.org> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191003154540.062170222@linuxfoundation.org> References: <20191003154540.062170222@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: David Ahern [ Upstream commit 0360894a05ed52be268e3c4d40b2df9d94975fa6 ] Some distributions (e.g., debian buster) do not install ping6. Re-use the hook in pmtu.sh to detect this and fallback to ping. Fixes: a0e11da78f48 ("fib_tests: Add tests for metrics on routes") Signed-off-by: David Ahern Signed-off-by: Jakub Kicinski Signed-off-by: Greg Kroah-Hartman --- tools/testing/selftests/net/fib_tests.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- a/tools/testing/selftests/net/fib_tests.sh +++ b/tools/testing/selftests/net/fib_tests.sh @@ -17,6 +17,8 @@ PAUSE=no IP="ip -netns ns1" NS_EXEC="ip netns exec ns1" +which ping6 > /dev/null 2>&1 && ping6=$(which ping6) || ping6=$(which ping) + log_test() { local rc=$1 @@ -1100,7 +1102,7 @@ ipv6_route_metrics_test() log_test $rc 0 "Multipath route with mtu metric" $IP -6 ro add 2001:db8:104::/64 via 2001:db8:101::2 mtu 1300 - run_cmd "ip netns exec ns1 ping6 -w1 -c1 -s 1500 2001:db8:104::1" + run_cmd "ip netns exec ns1 ${ping6} -w1 -c1 -s 1500 2001:db8:104::1" log_test $? 0 "Using route with mtu metric" run_cmd "$IP -6 ro add 2001:db8:114::/64 via 2001:db8:101::2 congctl lock foo"