From: Sasha Levin <sashal@kernel.org>
To: linux-kernel@vger.kernel.org, stable@vger.kernel.org
Cc: Petr Machata <petrm@nvidia.com>,
"David S . Miller" <davem@davemloft.net>,
Sasha Levin <sashal@kernel.org>,
kuba@kernel.org, shuah@kernel.org, netdev@vger.kernel.org,
linux-kselftest@vger.kernel.org
Subject: [PATCH AUTOSEL 5.14 028/138] selftests: net: fib_nexthops: Wait before checking reported idle time
Date: Mon, 8 Nov 2021 12:44:54 -0500 [thread overview]
Message-ID: <20211108174644.1187889-28-sashal@kernel.org> (raw)
In-Reply-To: <20211108174644.1187889-1-sashal@kernel.org>
From: Petr Machata <petrm@nvidia.com>
[ Upstream commit b69c99463d414cc263411462d52f25205657e9af ]
The purpose of this test is to verify that after a short activity passes,
the reported time is reasonable: not zero (which could be reported by
mistake), and not something outrageous (which would be indicative of an
issue in used units).
However, the idle time is reported in units of clock_t, or hundredths of
second. If the initial sequence of commands is very quick, it is possible
that the idle time is reported as just flat-out zero. When this test was
recently enabled in our nightly regression, we started seeing spurious
failures for exactly this reason.
Therefore buffer the delay leading up to the test with a sleep, to make
sure there is no legitimate way of reporting 0.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
tools/testing/selftests/net/fib_nexthops.sh | 1 +
1 file changed, 1 insertion(+)
diff --git a/tools/testing/selftests/net/fib_nexthops.sh b/tools/testing/selftests/net/fib_nexthops.sh
index 0d293391e9a44..b5a69ad191b07 100755
--- a/tools/testing/selftests/net/fib_nexthops.sh
+++ b/tools/testing/selftests/net/fib_nexthops.sh
@@ -2078,6 +2078,7 @@ basic_res()
"id 101 index 0 nhid 2 id 101 index 1 nhid 2 id 101 index 2 nhid 1 id 101 index 3 nhid 1"
log_test $? 0 "Dump all nexthop buckets in a group"
+ sleep 0.1
(( $($IP -j nexthop bucket list id 101 |
jq '[.[] | select(.bucket.idle_time > 0 and
.bucket.idle_time < 2)] | length') == 4 ))
--
2.33.0
next prev parent reply other threads:[~2021-11-09 1:05 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20211108174644.1187889-1-sashal@kernel.org>
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 005/138] Bluetooth: sco: Fix lock_sock() blockage by memcpy_from_msg() Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 006/138] Bluetooth: fix use-after-free error in lock_sock_nested() Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 013/138] net: sched: update default qdisc visibility after Tx queue cnt changes Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 017/138] ath11k: Align bss_chan_info structure with firmware Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 019/138] NET: IPV4: fix error "do not initialise globals to 0" Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 022/138] mwifiex: Run SET_BSS_MODE when changing from P2P to STATION vif-type Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 023/138] mwifiex: Properly initialize private structure on interface type changes Sasha Levin
2021-11-08 17:44 ` Sasha Levin [this message]
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 030/138] ath11k: Avoid reg rules update during firmware recovery Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 031/138] ath11k: add handler for scan event WMI_SCAN_EVENT_DEQUEUED Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 032/138] ath11k: Change DMA_FROM_DEVICE to DMA_TO_DEVICE when map reinjected packets Sasha Levin
2021-11-08 17:44 ` [PATCH AUTOSEL 5.14 033/138] ath10k: high latency fixes for beacon buffer Sasha Levin
2021-11-08 17:45 ` [PATCH AUTOSEL 5.14 034/138] octeontx2-pf: Enable promisc/allmulti match MCAM entries Sasha Levin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211108174644.1187889-28-sashal@kernel.org \
--to=sashal@kernel.org \
--cc=davem@davemloft.net \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=petrm@nvidia.com \
--cc=shuah@kernel.org \
--cc=stable@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).