summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2021-10-25 12:59:25 +0100
committerDavid S. Miller <davem@davemloft.net>2021-10-25 12:59:25 +0100
commit2d7e73f09fc2f5d968ca375f047718cf25ae2b92 (patch)
tree6091f03456ecea6d6eda5bbf064af911df649768 /tools
parent12f241f26436cf1134f8a05551d23961ee46037e (diff)
Revert "Merge branch 'dsa-rtnl'"
This reverts commit 965e6b262f48257dbdb51b565ecfd84877a0ab5f, reversing changes made to 4d98bb0d7ec2d0b417df6207b0bafe1868bad9f8.
Diffstat (limited to 'tools')
-rwxr-xr-xtools/testing/selftests/drivers/net/dsa/test_bridge_fdb_stress.sh47
-rw-r--r--tools/testing/selftests/net/forwarding/lib.sh10
2 files changed, 2 insertions, 55 deletions
diff --git a/tools/testing/selftests/drivers/net/dsa/test_bridge_fdb_stress.sh b/tools/testing/selftests/drivers/net/dsa/test_bridge_fdb_stress.sh
deleted file mode 100755
index dca8be6092b9..000000000000
--- a/tools/testing/selftests/drivers/net/dsa/test_bridge_fdb_stress.sh
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/bin/bash
-# SPDX-License-Identifier: GPL-2.0
-
-# Bridge FDB entries can be offloaded to DSA switches without holding the
-# rtnl_mutex. Traditionally this mutex has conferred drivers implicit
-# serialization, which means their code paths are not well tested in the
-# presence of concurrency.
-# This test creates a background task that stresses the FDB by adding and
-# deleting an entry many times in a row without the rtnl_mutex held.
-# It then tests the driver resistance to concurrency by calling .ndo_fdb_dump
-# (with rtnl_mutex held) from a foreground task.
-# Since either the FDB dump or the additions/removals can fail, but the
-# additions and removals are performed in deferred as opposed to process
-# context, we cannot simply check for user space error codes.
-
-WAIT_TIME=1
-NUM_NETIFS=1
-REQUIRE_JQ="no"
-REQUIRE_MZ="no"
-NETIF_CREATE="no"
-lib_dir=$(dirname $0)/../../../net/forwarding
-source $lib_dir/lib.sh
-
-cleanup() {
- echo "Cleaning up"
- kill $pid && wait $pid &> /dev/null
- ip link del br0
- echo "Please check kernel log for errors"
-}
-trap 'cleanup' EXIT
-
-eth=${NETIFS[p1]}
-
-ip link del br0 2&>1 >/dev/null || :
-ip link add br0 type bridge && ip link set $eth master br0
-
-(while :; do
- bridge fdb add 00:01:02:03:04:05 dev $eth master static
- bridge fdb del 00:01:02:03:04:05 dev $eth master static
-done) &
-pid=$!
-
-for i in $(seq 1 50); do
- bridge fdb show > /dev/null
- sleep 3
- echo "$((${i} * 2))% complete..."
-done
diff --git a/tools/testing/selftests/net/forwarding/lib.sh b/tools/testing/selftests/net/forwarding/lib.sh
index 520d8b53464b..92087d423bcf 100644
--- a/tools/testing/selftests/net/forwarding/lib.sh
+++ b/tools/testing/selftests/net/forwarding/lib.sh
@@ -23,8 +23,6 @@ MC_CLI=${MC_CLI:=smcroutectl}
PING_TIMEOUT=${PING_TIMEOUT:=5}
WAIT_TIMEOUT=${WAIT_TIMEOUT:=20}
INTERFACE_TIMEOUT=${INTERFACE_TIMEOUT:=600}
-REQUIRE_JQ=${REQUIRE_JQ:=yes}
-REQUIRE_MZ=${REQUIRE_MZ:=yes}
relative_path="${BASH_SOURCE%/*}"
if [[ "$relative_path" == "${BASH_SOURCE}" ]]; then
@@ -143,12 +141,8 @@ require_command()
fi
}
-if [[ "$REQUIRE_JQ" = "yes" ]]; then
- require_command jq
-fi
-if [[ "$REQUIRE_MZ" = "yes" ]]; then
- require_command $MZ
-fi
+require_command jq
+require_command $MZ
if [[ ! -v NUM_NETIFS ]]; then
echo "SKIP: importer does not define \"NUM_NETIFS\""