Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp3232521imc; Wed, 13 Mar 2019 12:15:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqyguRQmldITUIfLBo7eq4fuZBeV10CEo2qZCq/htPD1kGdpKHjHFbYPzzs6kl4ZteQs3wLI X-Received: by 2002:a62:5e46:: with SMTP id s67mr45390466pfb.126.1552504523053; Wed, 13 Mar 2019 12:15:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552504523; cv=none; d=google.com; s=arc-20160816; b=P+iMv8kKmCmXYSONR+xBdgUds/aFfz9HjXPVDLklCRxNcUOF9JZOHsF5wkW5ghE/Ix EXzEMnEJNd3l3abRSqK6IVMu2vGTFG8RbbD3Yn5MLog4vY+xLR41rH8oXH0H+SHzp487 ZRmdzh3LzkCVzZQiTXamt0jsl+VxE2tk2+M17zd+MV8DEda+Mo4/pY2cBHffGdn4QnUm SpEku8NqEoaaaGXAhX0sIjE/aJO1877oE2f5RuMObPgqSdggg+PPuRgpIZSSJTepW0X0 blYCgmO3f24lJ5DwnMix8InDzVbqE0m13kuqTrLMMQhEDYR9EqX5Q+wBc/bOfxlbdDqn 9L/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=I2T4NTyVdKJ3VI+LWfClaCq9TSIEKyxOj1zaMIQRCIY=; b=FQ3UmZWP3VL62z+TEr/CXZoe+g/XC+ZzJQCpRFPI4hSgVsxLoh6JVQPpk/Dm4uD6UF PCdGcGy2ZH8AlwUOnHscQ4iloErKLW666La1o/WJAOJNbSjx1UhGGeUy/5JEzJlLQDSI S6RNhJmiD4Ja64SZY/u3R04d1ru6x+NAjyjdEjr1AszUP3MEkTAGT79tTssFmSTMHskM eURKKY/4w43Sv3n0TVm6+tSlsqf6VeCbZa5QupawHoIm+rVo4neO+Y3Rv1VnRqDKzxhe FCzQP5KxDaxgm9aSGiPPYi1WLc8AaEkIisto0VM7ZI2BLxKn8l4ovwqnm/m132otb9fp PYlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0pJVwmRZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m22si10370573pgv.562.2019.03.13.12.15.07; Wed, 13 Mar 2019 12:15:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=0pJVwmRZ; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727856AbfCMTMx (ORCPT + 99 others); Wed, 13 Mar 2019 15:12:53 -0400 Received: from mail.kernel.org ([198.145.29.99]:43420 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727806AbfCMTMt (ORCPT ); Wed, 13 Mar 2019 15:12:49 -0400 Received: from sasha-vm.mshome.net (c-73-47-72-35.hsd1.nh.comcast.net [73.47.72.35]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E0E7B2075C; Wed, 13 Mar 2019 19:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1552504368; bh=1c3qADhncljUBQOHqPQD6kj4YkiNWpprGkkuIeWg+6U=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=0pJVwmRZ8ZiofAzlxgzR1MeYL5BqSLlWmIwE66e8CObkOcpnOu4PJLKz0YcYCJDtS q3ZshFDIeUKresS2Ti3YT4jQxG67bgLNOoDl0OSwpCc/PrSocVWqUT3wHWFVDxW+Tz Y4imLy5qvQLwIFa4gKWCLmfsgggFH+/GgHY2DFtI= From: Sasha Levin To: linux-kernel@vger.kernel.org, stable@vger.kernel.org Cc: Thadeu Lima de Souza Cascardo , David Ahern , "David S . Miller" , Sasha Levin , netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Subject: [PATCH AUTOSEL 4.20 60/60] selftests: fib_tests: sleep after changing carrier. again. Date: Wed, 13 Mar 2019 15:10:21 -0400 Message-Id: <20190313191021.158171-60-sashal@kernel.org> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20190313191021.158171-1-sashal@kernel.org> References: <20190313191021.158171-1-sashal@kernel.org> MIME-Version: 1.0 X-Patchwork-Hint: Ignore Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Thadeu Lima de Souza Cascardo [ Upstream commit af548a27b158d548d41e56255e6eaca1658cc3be ] Just like commit e2ba732a1681 ("selftests: fib_tests: sleep after changing carrier"), wait one second to allow linkwatch to propagate the carrier change to the stack. There are two sets of carrier tests. The first slept after the carrier was set to off, and when the second set ran, it was likely that the linkwatch would be able to run again without much delay, reducing the likelihood of a race. However, if you run 'fib_tests.sh -t carrier' on a loop, you will quickly notice the failures. Sleeping on the second set of tests make the failures go away. Cc: David Ahern Signed-off-by: Thadeu Lima de Souza Cascardo Reviewed-by: David Ahern Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- tools/testing/selftests/net/fib_tests.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/testing/selftests/net/fib_tests.sh b/tools/testing/selftests/net/fib_tests.sh index 802b4af18729..1080ff55a788 100755 --- a/tools/testing/selftests/net/fib_tests.sh +++ b/tools/testing/selftests/net/fib_tests.sh @@ -388,6 +388,7 @@ fib_carrier_unicast_test() set -e $IP link set dev dummy0 carrier off + sleep 1 set +e echo " Carrier down" -- 2.19.1