From: David Ahern <dsahern@gmail.com>
To: netdev@vger.kernel.org
Cc: idosch@mellanox.com, David Ahern <dsahern@gmail.com>
Subject: [PATCH net-next 4/4] selftests: fib_tests: sleep after changing carrier
Date: Tue, 13 Feb 2018 08:37:36 -0800 [thread overview]
Message-ID: <20180213163736.1538-5-dsahern@gmail.com> (raw)
In-Reply-To: <20180213163736.1538-1-dsahern@gmail.com>
sleep for a second after setting carrier down to allow linkwatch
to propagate the change to the routing stack via netdev_state_change.
As it stands there is a race setting carrier down on the dummy
device and then checking the linkdown flag in the routes.
Signed-off-by: David Ahern <dsahern@gmail.com>
---
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 e113cfd659fc..b617985ecdc1 100755
--- a/tools/testing/selftests/net/fib_tests.sh
+++ b/tools/testing/selftests/net/fib_tests.sh
@@ -282,6 +282,7 @@ fib_carrier_local_test()
set -e
ip -netns testns link set dev dummy0 carrier off
+ sleep 1
set +e
echo " Carrier off on nexthop"
--
2.11.0
next prev parent reply other threads:[~2018-02-13 16:37 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-13 16:37 [PATCH net-next 0/4] selftests: fib_tests: simplifications, verbosity and a race David Ahern
2018-02-13 16:37 ` [PATCH net-next 1/4] selftests: fib_tests: simplify ip commands in a namespace David Ahern
2018-02-13 16:37 ` [PATCH net-next 2/4] selftests: fib_tests: Make test results more verbose David Ahern
2018-02-13 16:37 ` [PATCH net-next 3/4] selftests: fib_tests: Move admin of dummy0 to helpers David Ahern
2018-02-13 16:37 ` David Ahern [this message]
2018-02-13 19:34 ` [PATCH net-next 0/4] selftests: fib_tests: simplifications, verbosity and a race David Miller
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=20180213163736.1538-5-dsahern@gmail.com \
--to=dsahern@gmail.com \
--cc=idosch@mellanox.com \
--cc=netdev@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).