summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorToke Høiland-Jørgensen <toke@redhat.com>2020-12-09 14:57:42 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2020-12-30 11:25:45 +0100
commit1303a9f0f91bab80498a6794c11416413f7cffd1 (patch)
tree5d415549866f446a7d5d95d418df711faa8d340a /tools
parent5239367f6639c99a300404a40bd4c45509e268dd (diff)
downloadlinux-stable-1303a9f0f91bab80498a6794c11416413f7cffd1.tar.gz
linux-stable-1303a9f0f91bab80498a6794c11416413f7cffd1.tar.bz2
linux-stable-1303a9f0f91bab80498a6794c11416413f7cffd1.zip
selftests/bpf/test_offload.py: Reset ethtool features after failed setting
[ Upstream commit 766e62b7fcd2cf1d43e6594ba37c659dc48f7ddb ] When setting the ethtool feature flag fails (as expected for the test), the kernel now tracks that the feature was requested to be 'off' and refuses to subsequently disable it again. So reset it back to 'on' so a subsequent disable (that's not supposed to fail) can succeed. Fixes: 417ec26477a5 ("selftests/bpf: add offload test based on netdevsim") Signed-off-by: Toke Høiland-Jørgensen <toke@redhat.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net> Acked-by: Jakub Kicinski <kuba@kernel.org> Link: https://lore.kernel.org/bpf/160752226280.110217.10696241563705667871.stgit@toke.dk Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/bpf/test_offload.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/testing/selftests/bpf/test_offload.py b/tools/testing/selftests/bpf/test_offload.py
index d59642e70f56..2229e55216a9 100755
--- a/tools/testing/selftests/bpf/test_offload.py
+++ b/tools/testing/selftests/bpf/test_offload.py
@@ -787,6 +787,7 @@ try:
start_test("Test disabling TC offloads is rejected while filters installed...")
ret, _ = sim.set_ethtool_tc_offloads(False, fail=False)
fail(ret == 0, "Driver should refuse to disable TC offloads with filters installed...")
+ sim.set_ethtool_tc_offloads(True)
start_test("Test qdisc removal frees things...")
sim.tc_flush_filters()