selftests: drivers: dsa: add a subset of forwarding selftests
authorVladimir Oltean <vladimir.oltean@nxp.com>
Fri, 22 Apr 2022 10:15:04 +0000 (13:15 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 23 Apr 2022 11:18:16 +0000 (12:18 +0100)
This adds an initial subset of forwarding selftests which I considered
to be relevant for DSA drivers, along with a forwarding.config that
makes it easier to run them (disables veth pair creation, makes sure MAC
addresses are unique and stable).

The intention is to request driver writers to run these selftests during
review and make sure that the tests pass, or at least that the problems
are known.

Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
tools/testing/selftests/drivers/net/dsa/bridge_locked_port.sh [new symlink]
tools/testing/selftests/drivers/net/dsa/bridge_mdb.sh [new symlink]
tools/testing/selftests/drivers/net/dsa/bridge_mld.sh [new symlink]
tools/testing/selftests/drivers/net/dsa/bridge_vlan_aware.sh [new symlink]
tools/testing/selftests/drivers/net/dsa/bridge_vlan_mcast.sh [new symlink]
tools/testing/selftests/drivers/net/dsa/bridge_vlan_unaware.sh [new symlink]
tools/testing/selftests/drivers/net/dsa/forwarding.config [new file with mode: 0644]
tools/testing/selftests/drivers/net/dsa/lib.sh [new symlink]
tools/testing/selftests/drivers/net/dsa/local_termination.sh [new symlink]
tools/testing/selftests/drivers/net/dsa/no_forwarding.sh [new symlink]

diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_locked_port.sh b/tools/testing/selftests/drivers/net/dsa/bridge_locked_port.sh
new file mode 120000 (symlink)
index 0000000..f5eb940
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/bridge_locked_port.sh
\ No newline at end of file
diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_mdb.sh b/tools/testing/selftests/drivers/net/dsa/bridge_mdb.sh
new file mode 120000 (symlink)
index 0000000..76492da
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/bridge_mdb.sh
\ No newline at end of file
diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_mld.sh b/tools/testing/selftests/drivers/net/dsa/bridge_mld.sh
new file mode 120000 (symlink)
index 0000000..81a7e0d
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/bridge_mld.sh
\ No newline at end of file
diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_aware.sh b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_aware.sh
new file mode 120000 (symlink)
index 0000000..9831ed7
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/bridge_vlan_aware.sh
\ No newline at end of file
diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_mcast.sh b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_mcast.sh
new file mode 120000 (symlink)
index 0000000..7f3c3f0
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/bridge_vlan_mcast.sh
\ No newline at end of file
diff --git a/tools/testing/selftests/drivers/net/dsa/bridge_vlan_unaware.sh b/tools/testing/selftests/drivers/net/dsa/bridge_vlan_unaware.sh
new file mode 120000 (symlink)
index 0000000..bf1a57e
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/bridge_vlan_unaware.sh
\ No newline at end of file
diff --git a/tools/testing/selftests/drivers/net/dsa/forwarding.config b/tools/testing/selftests/drivers/net/dsa/forwarding.config
new file mode 100644 (file)
index 0000000..7adc139
--- /dev/null
@@ -0,0 +1,2 @@
+NETIF_CREATE=no
+STABLE_MAC_ADDRS=yes
diff --git a/tools/testing/selftests/drivers/net/dsa/lib.sh b/tools/testing/selftests/drivers/net/dsa/lib.sh
new file mode 120000 (symlink)
index 0000000..39c9682
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/lib.sh
\ No newline at end of file
diff --git a/tools/testing/selftests/drivers/net/dsa/local_termination.sh b/tools/testing/selftests/drivers/net/dsa/local_termination.sh
new file mode 120000 (symlink)
index 0000000..c08166f
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/local_termination.sh
\ No newline at end of file
diff --git a/tools/testing/selftests/drivers/net/dsa/no_forwarding.sh b/tools/testing/selftests/drivers/net/dsa/no_forwarding.sh
new file mode 120000 (symlink)
index 0000000..b975746
--- /dev/null
@@ -0,0 +1 @@
+../../../net/forwarding/no_forwarding.sh
\ No newline at end of file