Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

selftests/bpf: add wrapper scripts for test_xdp_vlan.sh

In-order to test both native-XDP (xdpdrv) and generic-XDP (xdpgeneric)
create two wrapper test scripts, that start the test_xdp_vlan.sh script
with these modes.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Jesper Dangaard Brouer and committed by
David S. Miller
d35661fc 4de9c89a

+24 -2
+2 -1
tools/testing/selftests/bpf/Makefile
··· 57 57 test_lirc_mode2.sh \ 58 58 test_skb_cgroup_id.sh \ 59 59 test_flow_dissector.sh \ 60 - test_xdp_vlan.sh \ 60 + test_xdp_vlan_mode_generic.sh \ 61 + test_xdp_vlan_mode_native.sh \ 61 62 test_lwt_ip_encap.sh \ 62 63 test_tcp_check_syncookie.sh \ 63 64 test_tc_tunnel.sh \
+4 -1
tools/testing/selftests/bpf/test_xdp_vlan.sh
··· 2 2 # SPDX-License-Identifier: GPL-2.0 3 3 # Author: Jesper Dangaard Brouer <hawk@kernel.org> 4 4 5 - TESTNAME=xdp_vlan 5 + # Allow wrapper scripts to name test 6 + if [ -z "$TESTNAME" ]; then 7 + TESTNAME=xdp_vlan 8 + fi 6 9 7 10 # Default XDP mode 8 11 XDP_MODE=xdpgeneric
+9
tools/testing/selftests/bpf/test_xdp_vlan_mode_generic.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: GPL-2.0 3 + 4 + # Exit on failure 5 + set -e 6 + 7 + # Wrapper script to test generic-XDP 8 + export TESTNAME=xdp_vlan_mode_generic 9 + ./test_xdp_vlan.sh --mode=xdpgeneric
+9
tools/testing/selftests/bpf/test_xdp_vlan_mode_native.sh
··· 1 + #!/bin/bash 2 + # SPDX-License-Identifier: GPL-2.0 3 + 4 + # Exit on failure 5 + set -e 6 + 7 + # Wrapper script to test native-XDP 8 + export TESTNAME=xdp_vlan_mode_native 9 + ./test_xdp_vlan.sh --mode=xdpdrv