selftests: Mark auto-deferring functions clearly
Subsystems (5)
Petr Machata
maintainercover selftests: Mark auto-deferring functions clearly
selftests/net/lib.sh contains a suite of iproute2 wrappers that automatically schedule the corresponding cleanup through defer. The fact they do so is however not immediately obvious, one needs to know which functions are handling the deferral behind the scenes, and which expect the caller to handle cleanups themselves.
A convention for these auto-deferring functions would help both writing and patch review. This patchset does so by marking these functions with an adf_ prefix. We already have a few such functions: forwarding/lib.sh has adf_mcd_start() and a few selftests add private helpers that conform to this convention.
Patches #1 to #8 gradually convert individual functions, one per patch.
Patch #9 renames an auto-deferring private helpers named dfr_* to adf_*. The plan is not to retro-rename all private helpers, but I happened to know about this one.
Patches #10 to #12 introduce several autodefer helpers for commonly used forwarding/lib.sh functions, and opportunistically convert straightforward instances of 'action; defer counteraction' to the new helpers.
Patch #13 adds some README verbiage to pitch defer and the adf_* convention.
Petr Machata (13):
selftests: net: lib: Rename ip_link_add() to adf_*
selftests: net: lib: Rename ip_link_set_master() to adf_*
selftests: net: lib: Rename ip_link_set_addr() to adf_*
selftests: net: lib: Rename ip_link_set_up() to adf_*
selftests: net: lib: Rename ip_link_set_down() to adf_*
selftests: net: lib: Rename ip_addr_add() to adf_*
selftests: net: lib: Rename ip_route_add() to adf_*
selftests: net: lib: Rename bridge_vlan_add() to adf_*
selftests: net: vlan_bridge_binding: Rename dfr_set_binding_*() to
adf_*
selftests: forwarding: lib: Add an autodefer variant of vrf_prepare()
selftests: forwarding: lib: Add an autodefer variant of
simple_if_init()
selftests: forwarding: lib: Add an autodefer variant of
forwarding_enable()
selftests: forwarding: README: Mention defer, adf_
.../drivers/net/mlxsw/devlink_trap_policer.sh | 9 +- .../drivers/net/mlxsw/qos_ets_strict.sh | 12 +- .../drivers/net/mlxsw/qos_max_descriptors.sh | 9 +- .../drivers/net/mlxsw/qos_mc_aware.sh | 12 +- .../drivers/net/mlxsw/sch_red_core.sh | 6 +- tools/testing/selftests/net/fdb_notify.sh | 26 ++-- tools/testing/selftests/net/forwarding/README | 15 ++ .../net/forwarding/bridge_activity_notify.sh | 21 ++- .../net/forwarding/bridge_fdb_local_vlan_0.sh | 65 ++++---- tools/testing/selftests/net/forwarding/lib.sh | 18 +++ .../selftests/net/forwarding/sch_ets_core.sh | 9 +- .../selftests/net/forwarding/sch_red.sh | 12 +- .../selftests/net/forwarding/sch_tbf_core.sh | 6 +- .../net/forwarding/vxlan_bridge_1q_mc_ul.sh | 141 +++++++++--------- .../net/forwarding/vxlan_reserved.sh | 33 ++-- tools/testing/selftests/net/lib.sh | 16 +- .../net/test_vxlan_fdb_changelink.sh | 8 +- .../selftests/net/vlan_bridge_binding.sh | 44 +++--- 18 files changed, 225 insertions(+), 237 deletions(-)
Signature · 1 line
2.49.0
Petr Machata
maintainerPATCH 1/13 selftests: net: lib: Rename ip_link_add() to adf_*
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
--- tools/testing/selftests/net/fdb_notify.sh | 20 ++++++------- .../net/forwarding/bridge_activity_notify.sh | 2 +- .../net/forwarding/bridge_fdb_local_vlan_0.sh | 8 +++--- .../net/forwarding/vxlan_bridge_1q_mc_ul.sh | 28 +++++++++---------- .../net/forwarding/vxlan_reserved.sh | 4 +-- tools/testing/selftests/net/lib.sh | 2 +- .../net/test_vxlan_fdb_changelink.sh | 6 ++-- .../selftests/net/vlan_bridge_binding.sh | 6 ++-- 8 files changed, 38 insertions(+), 38 deletions(-)
tools/testing/selftests/net/fdb_notify.sh +10 -10
@@ -40,15 +40,15 @@ do_test_dup() test_dup_bridge() { - ip_link_add br up type bridge vlan_filtering 1 + adf_ip_link_add br up type bridge vlan_filtering 1 do_test_dup add "bridge" dev br self do_test_dup del "bridge" dev br self } test_dup_vxlan_self() { - ip_link_add br up type bridge vlan_filtering 1 - ip_link_add vx up type vxlan id 2000 dstport 4789 + adf_ip_link_add br up type bridge vlan_filtering 1 + adf_ip_link_add vx up type vxlan id 2000 dstport 4789 ip_link_set_master vx br do_test_dup add "vxlan" dev vx self dst 192.0.2.1
@@ -57,8 +57,8 @@ test_dup_vxlan_self() test_dup_vxlan_master() { - ip_link_add br up type bridge vlan_filtering 1 - ip_link_add vx up type vxlan id 2000 dstport 4789 + adf_ip_link_add br up type bridge vlan_filtering 1 + adf_ip_link_add vx up type vxlan id 2000 dstport 4789 ip_link_set_master vx br do_test_dup add "vxlan master" dev vx master
@@ -67,8 +67,8 @@ test_dup_vxlan_master() test_dup_macvlan_self() { - ip_link_add dd up type dummy - ip_link_add mv up link dd type macvlan mode passthru + adf_ip_link_add dd up type dummy + adf_ip_link_add mv up link dd type macvlan mode passthru do_test_dup add "macvlan self" dev mv self do_test_dup del "macvlan self" dev mv self
@@ -76,9 +76,9 @@ test_dup_macvlan_self() test_dup_macvlan_master() { - ip_link_add br up type bridge vlan_filtering 1 - ip_link_add dd up type dummy - ip_link_add mv up link dd type macvlan mode passthru + adf_ip_link_add br up type bridge vlan_filtering 1 + adf_ip_link_add dd up type dummy + adf_ip_link_add mv up link dd type macvlan mode passthru ip_link_set_master mv br do_test_dup add "macvlan master" dev mv self
tools/testing/selftests/net/forwarding/bridge_activity_notify.sh +1 -1
@@ -38,7 +38,7 @@ h2_create() switch_create() { - ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 \ + adf_ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 \ ageing_time "$LOW_AGEING_TIME" ip_link_set_up br1
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +4 -4
@@ -134,7 +134,7 @@ adf_bridge_create() { local mac - ip_link_add br up type bridge vlan_default_pvid 0 "$@" + adf_ip_link_add br up type bridge vlan_default_pvid 0 "$@" mac=$(mac_get br) adf_bridge_configure ip_link_set_addr br "$mac"
@@ -142,8 +142,8 @@ adf_bridge_create() check_fdb_local_vlan_0_support() { - if ip_link_add XXbr up type bridge vlan_filtering 1 fdb_local_vlan_0 1 \ - &>/dev/null; then + if adf_ip_link_add XXbr up type bridge vlan_filtering 1 \ + fdb_local_vlan_0 1 &>/dev/null; then return 0 fi
@@ -375,7 +375,7 @@ test_q_sharing() adf_addr_set_bridge_create() { - ip_link_add br up type bridge vlan_filtering 0 + adf_ip_link_add br up type bridge vlan_filtering 0 ip_link_set_addr br "$(mac_get br)" adf_bridge_configure }
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +14 -14
@@ -122,11 +122,11 @@ h1_create() simple_if_init "$h1" defer simple_if_fini "$h1" - ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10 + adf_ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10 ip_link_set_up "$h1.10" ip_addr_add "$h1.10" 192.0.2.1/28 - ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20 + adf_ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20 ip_link_set_up "$h1.20" ip_addr_add "$h1.20" 2001:db8:1::1/64 }
@@ -161,7 +161,7 @@ h2_create() ip_link_set_up "v$h2" # br2 - ip_link_add br2 type bridge vlan_filtering 0 mcast_snooping 0 + adf_ip_link_add br2 type bridge vlan_filtering 0 mcast_snooping 0 ip_link_set_master br2 "v$h2" ip_link_set_up br2
@@ -186,7 +186,7 @@ h3_create() ip_link_set_up "v$h3" # br3 - ip_link_add br3 type bridge vlan_filtering 0 mcast_snooping 0 + adf_ip_link_add br3 type bridge vlan_filtering 0 mcast_snooping 0 ip_link_set_master br3 "v$h3" ip_link_set_up br3
@@ -205,17 +205,17 @@ switch_create() # br1 swp1_mac=$(mac_get "$swp1") - ip_link_add br1 type bridge vlan_filtering 1 \ + adf_ip_link_add br1 type bridge vlan_filtering 1 \ vlan_default_pvid 0 mcast_snooping 0 ip_link_set_addr br1 "$swp1_mac" ip_link_set_up br1 # A dummy to force the IPv6 OIF=0 test to install a suitable MC route on # $IPMR to be deterministic. Also used for the IPv6 RX!=TX ping test. - ip_link_add "X$IPMR" up type dummy + adf_ip_link_add "X$IPMR" up type dummy # IPMR - ip_link_add "$IPMR" up type dummy + adf_ip_link_add "$IPMR" up type dummy ip_addr_add "$IPMR" 192.0.2.100/28 ip_addr_add "$IPMR" 2001:db8:4::1/64
@@ -241,7 +241,7 @@ vx_create() local name=$1; shift local vid=$1; shift - ip_link_add "$name" up type vxlan dstport "$VXPORT" \ + adf_ip_link_add "$name" up type vxlan dstport "$VXPORT" \ nolearning noudpcsum tos inherit ttl 16 \ "$@" ip_link_set_master "$name" br1
@@ -295,7 +295,7 @@ ns_init_common() ip_addr_add "$if_in" "$ipv6_in" # br1 - ip_link_add br1 type bridge vlan_filtering 1 \ + adf_ip_link_add br1 type bridge vlan_filtering 1 \ vlan_default_pvid 0 mcast_snooping 0 ip_link_set_up br1
@@ -304,7 +304,7 @@ ns_init_common() vx20_create local "${ipv6_in%/*}" group "$GROUP6" dev "$if_in" # w1 - ip_link_add w1 type veth peer name w2 + adf_ip_link_add w1 type veth peer name w2 ip_link_set_master w1 br1 ip_link_set_up w1 bridge_vlan_add vid 10 dev w1
@@ -315,12 +315,12 @@ ns_init_common() defer simple_if_fini w2 # w2.10 - ip_link_add w2.10 master vw2 link w2 type vlan id 10 + adf_ip_link_add w2.10 master vw2 link w2 type vlan id 10 ip_link_set_up w2.10 ip_addr_add w2.10 "$ipv4_host" # w2.20 - ip_link_add w2.20 master vw2 link w2 type vlan id 20 + adf_ip_link_add w2.20 master vw2 link w2 type vlan id 20 ip_link_set_up w2.20 ip_addr_add w2.20 "$ipv6_host" }
@@ -377,8 +377,8 @@ setup_prepare() forwarding_enable defer forwarding_restore - ip_link_add "v1$h2" type veth peer name "v2$h2" - ip_link_add "v1$h3" type veth peer name "v2$h3" + adf_ip_link_add "v1$h2" type veth peer name "v2$h2" + adf_ip_link_add "v1$h3" type veth peer name "v2$h3" h1_create h2_create
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +2 -2
@@ -60,7 +60,7 @@ h1_create() switch_create() { - ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 + adf_ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 # Make sure the bridge uses the MAC address of the local port and not # that of the VxLAN's device. ip_link_set_addr br1 $(mac_get $swp1)
@@ -200,7 +200,7 @@ vxlan_ping_do() vxlan_device_add() { - ip_link_add vx1 up type vxlan id 1000 \ + adf_ip_link_add vx1 up type vxlan id 1000 \ local 192.0.2.17 dstport "$VXPORT" \ nolearning noudpcsum tos inherit ttl 100 "$@" ip_link_set_master vx1 br1
tools/testing/selftests/net/lib.sh +1 -1
@@ -543,7 +543,7 @@ require_command() fi } -ip_link_add() +adf_ip_link_add() { local name=$1; shift
tools/testing/selftests/net/test_vxlan_fdb_changelink.sh +3 -3
@@ -21,7 +21,7 @@ test_set_remote() { RET=0 - ip_link_add vx up type vxlan id 2000 dstport 4789 + adf_ip_link_add vx up type vxlan id 2000 dstport 4789 bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.20 self permanent bridge fdb ap dev vx 00:00:00:00:00:00 dst 192.0.2.30 self permanent check_remotes "fdb append"
@@ -74,12 +74,12 @@ test_change_mc_remote() { check_command netstat || return - ip_link_add v1 up type veth peer name v2 + adf_ip_link_add v1 up type veth peer name v2 ip_link_set_up v2 RET=0 - ip_link_add vx up type vxlan dstport 4789 \ + adf_ip_link_add vx up type vxlan dstport 4789 \ local 192.0.2.1 $(fmt_remote 224.1.1.1) dev v1 vni 1000 check_membership "group=224.1.1.1 fail=0" \
tools/testing/selftests/net/vlan_bridge_binding.sh +3 -3
@@ -18,10 +18,10 @@ setup_prepare() { local port - ip_link_add br up type bridge vlan_filtering 1 + adf_ip_link_add br up type bridge vlan_filtering 1 for port in d1 d2 d3; do - ip_link_add $port type veth peer name r$port + adf_ip_link_add $port type veth peer name r$port ip_link_set_up $port ip_link_set_up r$port ip_link_set_master $port br
@@ -74,7 +74,7 @@ add_one_vlan() local link=$1; shift local id=$1; shift - ip_link_add $link.$id link $link type vlan id $id "$@" + adf_ip_link_add $link.$id link $link type vlan id $id "$@" } add_vlans()
Signature · 1 line
2.49.0
Re: [PATCH net-next 01/13] selftests: net: lib: Rename ip_link_add() to adf_*
Quoted 4 lines · Petr Machata
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
Signed-off-by Petr Machata <[email protected]>
...
Petr Machata
maintainerPATCH 2/13 selftests: net: lib: Rename ip_link_set_master() to adf_*
In reply to Petr MachataRename this function to mark it as autodefer. For details, see the discussion in the cover letter.
--- tools/testing/selftests/net/fdb_notify.sh | 6 +++--- .../net/forwarding/bridge_activity_notify.sh | 4 ++-- .../net/forwarding/bridge_fdb_local_vlan_0.sh | 2 +- .../net/forwarding/vxlan_bridge_1q_mc_ul.sh | 18 +++++++++--------- .../selftests/net/forwarding/vxlan_reserved.sh | 4 ++-- tools/testing/selftests/net/lib.sh | 2 +- .../selftests/net/vlan_bridge_binding.sh | 2 +- 7 files changed, 19 insertions(+), 19 deletions(-)
tools/testing/selftests/net/fdb_notify.sh +3 -3
@@ -49,7 +49,7 @@ test_dup_vxlan_self() { adf_ip_link_add br up type bridge vlan_filtering 1 adf_ip_link_add vx up type vxlan id 2000 dstport 4789 - ip_link_set_master vx br + adf_ip_link_set_master vx br do_test_dup add "vxlan" dev vx self dst 192.0.2.1 do_test_dup del "vxlan" dev vx self dst 192.0.2.1
@@ -59,7 +59,7 @@ test_dup_vxlan_master() { adf_ip_link_add br up type bridge vlan_filtering 1 adf_ip_link_add vx up type vxlan id 2000 dstport 4789 - ip_link_set_master vx br + adf_ip_link_set_master vx br do_test_dup add "vxlan master" dev vx master do_test_dup del "vxlan master" dev vx master
@@ -79,7 +79,7 @@ test_dup_macvlan_master() adf_ip_link_add br up type bridge vlan_filtering 1 adf_ip_link_add dd up type dummy adf_ip_link_add mv up link dd type macvlan mode passthru - ip_link_set_master mv br + adf_ip_link_set_master mv br do_test_dup add "macvlan master" dev mv self do_test_dup del "macvlan master" dev mv self
tools/testing/selftests/net/forwarding/bridge_activity_notify.sh +2 -2
@@ -42,10 +42,10 @@ switch_create() ageing_time "$LOW_AGEING_TIME" ip_link_set_up br1 - ip_link_set_master "$swp1" br1 + adf_ip_link_set_master "$swp1" br1 ip_link_set_up "$swp1" - ip_link_set_master "$swp2" br1 + adf_ip_link_set_master "$swp2" br1 ip_link_set_up "$swp2" }
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +1 -1
@@ -123,7 +123,7 @@ adf_bridge_configure() bridge_vlan_add dev br vid 3 self for dev in "$swp1" "$swp2"; do - ip_link_set_master "$dev" br + adf_ip_link_set_master "$dev" br bridge_vlan_add dev "$dev" vid 1 pvid untagged bridge_vlan_add dev "$dev" vid 2 bridge_vlan_add dev "$dev" vid 3
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +9 -9
@@ -162,16 +162,16 @@ h2_create() # br2 adf_ip_link_add br2 type bridge vlan_filtering 0 mcast_snooping 0 - ip_link_set_master br2 "v$h2" + adf_ip_link_set_master br2 "v$h2" ip_link_set_up br2 # $h2 - ip_link_set_master "$h2" br2 + adf_ip_link_set_master "$h2" br2 install_capture "$h2" # v1$h2 ip_link_set_up "v1$h2" - ip_link_set_master "v1$h2" br2 + adf_ip_link_set_master "v1$h2" br2 } h3_create()
@@ -187,16 +187,16 @@ h3_create() # br3 adf_ip_link_add br3 type bridge vlan_filtering 0 mcast_snooping 0 - ip_link_set_master br3 "v$h3" + adf_ip_link_set_master br3 "v$h3" ip_link_set_up br3 # $h3 - ip_link_set_master "$h3" br3 + adf_ip_link_set_master "$h3" br3 install_capture "$h3" # v1$h3 ip_link_set_up "v1$h3" - ip_link_set_master "v1$h3" br3 + adf_ip_link_set_master "v1$h3" br3 } switch_create()
@@ -221,7 +221,7 @@ switch_create() # $swp1 ip_link_set_up "$swp1" - ip_link_set_master "$swp1" br1 + adf_ip_link_set_master "$swp1" br1 bridge_vlan_add vid 10 dev "$swp1" bridge_vlan_add vid 20 dev "$swp1"
@@ -244,7 +244,7 @@ vx_create() adf_ip_link_add "$name" up type vxlan dstport "$VXPORT" \ nolearning noudpcsum tos inherit ttl 16 \ "$@" - ip_link_set_master "$name" br1 + adf_ip_link_set_master "$name" br1 bridge_vlan_add vid "$vid" dev "$name" pvid untagged } export -f vx_create
@@ -305,7 +305,7 @@ ns_init_common() # w1 adf_ip_link_add w1 type veth peer name w2 - ip_link_set_master w1 br1 + adf_ip_link_set_master w1 br1 ip_link_set_up w1 bridge_vlan_add vid 10 dev w1 bridge_vlan_add vid 20 dev w1
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +2 -2
@@ -70,7 +70,7 @@ switch_create() ip_addr_add $rp1 192.0.2.17/28 ip_route_add 192.0.2.32/28 nexthop via 192.0.2.18 - ip_link_set_master $swp1 br1 + adf_ip_link_set_master $swp1 br1 ip_link_set_up $swp1 }
@@ -203,7 +203,7 @@ vxlan_device_add() adf_ip_link_add vx1 up type vxlan id 1000 \ local 192.0.2.17 dstport "$VXPORT" \ nolearning noudpcsum tos inherit ttl 100 "$@" - ip_link_set_master vx1 br1 + adf_ip_link_set_master vx1 br1 } vxlan_all_reserved_bits()
tools/testing/selftests/net/lib.sh +1 -1
@@ -551,7 +551,7 @@ adf_ip_link_add() defer ip link del dev "$name" } -ip_link_set_master() +adf_ip_link_set_master() { local member=$1; shift local master=$1; shift
tools/testing/selftests/net/vlan_bridge_binding.sh +1 -1
@@ -24,7 +24,7 @@ setup_prepare() adf_ip_link_add $port type veth peer name r$port ip_link_set_up $port ip_link_set_up r$port - ip_link_set_master $port br + adf_ip_link_set_master $port br done bridge_vlan_add vid 11 dev br self
Signature · 1 line
2.49.0
Re: [PATCH net-next 02/13] selftests: net: lib: Rename ip_link_set_master() to adf_*
Quoted 4 lines · Petr Machata
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 3/13 selftests: net: lib: Rename ip_link_set_addr() to adf_*
In reply to Petr MachataRename this function to mark it as autodefer. For details, see the discussion in the cover letter.
--- .../selftests/net/forwarding/bridge_fdb_local_vlan_0.sh | 6 +++--- .../selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh | 2 +- tools/testing/selftests/net/forwarding/vxlan_reserved.sh | 2 +- tools/testing/selftests/net/lib.sh | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-)
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +3 -3
@@ -137,7 +137,7 @@ adf_bridge_create() adf_ip_link_add br up type bridge vlan_default_pvid 0 "$@" mac=$(mac_get br) adf_bridge_configure - ip_link_set_addr br "$mac" + adf_ip_link_set_addr br "$mac" } check_fdb_local_vlan_0_support()
@@ -296,7 +296,7 @@ change_mac() cur_mac=$(mac_get "$dev") log_info "Change $dev MAC $cur_mac -> $mac" - ip_link_set_addr "$dev" "$mac" + adf_ip_link_set_addr "$dev" "$mac" defer log_info "Change $dev MAC back" }
@@ -376,7 +376,7 @@ test_q_sharing() adf_addr_set_bridge_create() { adf_ip_link_add br up type bridge vlan_filtering 0 - ip_link_set_addr br "$(mac_get br)" + adf_ip_link_set_addr br "$(mac_get br)" adf_bridge_configure }
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +1 -1
@@ -207,7 +207,7 @@ switch_create() swp1_mac=$(mac_get "$swp1") adf_ip_link_add br1 type bridge vlan_filtering 1 \ vlan_default_pvid 0 mcast_snooping 0 - ip_link_set_addr br1 "$swp1_mac" + adf_ip_link_set_addr br1 "$swp1_mac" ip_link_set_up br1 # A dummy to force the IPv6 OIF=0 test to install a suitable MC route on
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +1 -1
@@ -63,7 +63,7 @@ switch_create() adf_ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 # Make sure the bridge uses the MAC address of the local port and not # that of the VxLAN's device. - ip_link_set_addr br1 $(mac_get $swp1) + adf_ip_link_set_addr br1 $(mac_get $swp1) ip_link_set_up br1 ip_link_set_up $rp1
tools/testing/selftests/net/lib.sh +1 -1
@@ -560,7 +560,7 @@ adf_ip_link_set_master() defer ip link set dev "$member" nomaster } -ip_link_set_addr() +adf_ip_link_set_addr() { local name=$1; shift local addr=$1; shift
Signature · 1 line
2.49.0
Re: [PATCH net-next 03/13] selftests: net: lib: Rename ip_link_set_addr() to adf_*
Quoted 4 lines · Petr Machata
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 4/13 selftests: net: lib: Rename ip_link_set_up() to adf_*
In reply to Petr MachataRename this function to mark it as autodefer. For details, see the discussion in the cover letter.
--- .../net/forwarding/bridge_activity_notify.sh | 6 +-- .../net/forwarding/bridge_fdb_local_vlan_0.sh | 6 +-- .../net/forwarding/vxlan_bridge_1q_mc_ul.sh | 38 +++++++++---------- .../net/forwarding/vxlan_reserved.sh | 6 +-- tools/testing/selftests/net/lib.sh | 2 +- .../net/test_vxlan_fdb_changelink.sh | 2 +- .../selftests/net/vlan_bridge_binding.sh | 4 +- 7 files changed, 32 insertions(+), 32 deletions(-)
tools/testing/selftests/net/forwarding/bridge_activity_notify.sh +3 -3
@@ -40,13 +40,13 @@ switch_create() { adf_ip_link_add br1 type bridge vlan_filtering 0 mcast_snooping 0 \ ageing_time "$LOW_AGEING_TIME" - ip_link_set_up br1 + adf_ip_link_set_up br1 adf_ip_link_set_master "$swp1" br1 - ip_link_set_up "$swp1" + adf_ip_link_set_up "$swp1" adf_ip_link_set_master "$swp2" br1 - ip_link_set_up "$swp2" + adf_ip_link_set_up "$swp2" } setup_prepare()
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +3 -3
@@ -78,13 +78,13 @@ h3_create() switch_create() { - ip_link_set_up "$swp1" + adf_ip_link_set_up "$swp1" - ip_link_set_up "$swp2" + adf_ip_link_set_up "$swp2" ip_addr_add "$swp3" 192.0.2.17/28 ip_addr_add "$swp3" 2001:db8:2::1/64 - ip_link_set_up "$swp3" + adf_ip_link_set_up "$swp3" } setup_prepare()
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +19 -19
@@ -123,11 +123,11 @@ h1_create() defer simple_if_fini "$h1" adf_ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10 - ip_link_set_up "$h1.10" + adf_ip_link_set_up "$h1.10" ip_addr_add "$h1.10" 192.0.2.1/28 adf_ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20 - ip_link_set_up "$h1.20" + adf_ip_link_set_up "$h1.20" ip_addr_add "$h1.20" 2001:db8:1::1/64 }
@@ -152,50 +152,50 @@ install_capture() h2_create() { # $h2 - ip_link_set_up "$h2" + adf_ip_link_set_up "$h2" # H2 vrf_create "v$h2" defer vrf_destroy "v$h2" - ip_link_set_up "v$h2" + adf_ip_link_set_up "v$h2" # br2 adf_ip_link_add br2 type bridge vlan_filtering 0 mcast_snooping 0 adf_ip_link_set_master br2 "v$h2" - ip_link_set_up br2 + adf_ip_link_set_up br2 # $h2 adf_ip_link_set_master "$h2" br2 install_capture "$h2" # v1$h2 - ip_link_set_up "v1$h2" + adf_ip_link_set_up "v1$h2" adf_ip_link_set_master "v1$h2" br2 } h3_create() { # $h3 - ip_link_set_up "$h3" + adf_ip_link_set_up "$h3" # H3 vrf_create "v$h3" defer vrf_destroy "v$h3" - ip_link_set_up "v$h3" + adf_ip_link_set_up "v$h3" # br3 adf_ip_link_add br3 type bridge vlan_filtering 0 mcast_snooping 0 adf_ip_link_set_master br3 "v$h3" - ip_link_set_up br3 + adf_ip_link_set_up br3 # $h3 adf_ip_link_set_master "$h3" br3 install_capture "$h3" # v1$h3 - ip_link_set_up "v1$h3" + adf_ip_link_set_up "v1$h3" adf_ip_link_set_master "v1$h3" br3 }
@@ -208,7 +208,7 @@ switch_create() adf_ip_link_add br1 type bridge vlan_filtering 1 \ vlan_default_pvid 0 mcast_snooping 0 adf_ip_link_set_addr br1 "$swp1_mac" - ip_link_set_up br1 + adf_ip_link_set_up br1 # A dummy to force the IPv6 OIF=0 test to install a suitable MC route on # $IPMR to be deterministic. Also used for the IPv6 RX!=TX ping test.
@@ -220,18 +220,18 @@ switch_create() ip_addr_add "$IPMR" 2001:db8:4::1/64 # $swp1 - ip_link_set_up "$swp1" + adf_ip_link_set_up "$swp1" adf_ip_link_set_master "$swp1" br1 bridge_vlan_add vid 10 dev "$swp1" bridge_vlan_add vid 20 dev "$swp1" # $swp2 - ip_link_set_up "$swp2" + adf_ip_link_set_up "$swp2" ip_addr_add "$swp2" 192.0.2.33/28 ip_addr_add "$swp2" 2001:db8:2::1/64 # $swp3 - ip_link_set_up "$swp3" + adf_ip_link_set_up "$swp3" ip_addr_add "$swp3" 192.0.2.65/28 ip_addr_add "$swp3" 2001:db8:3::1/64 }
@@ -290,14 +290,14 @@ ns_init_common() local ipv6_host=$1; shift # v2$h2 / v2$h3 - ip_link_set_up "$if_in" + adf_ip_link_set_up "$if_in" ip_addr_add "$if_in" "$ipv4_in" ip_addr_add "$if_in" "$ipv6_in" # br1 adf_ip_link_add br1 type bridge vlan_filtering 1 \ vlan_default_pvid 0 mcast_snooping 0 - ip_link_set_up br1 + adf_ip_link_set_up br1 # vx10, vx20 vx10_create local "${ipv4_in%/*}" group "$GROUP4" dev "$if_in"
@@ -306,7 +306,7 @@ ns_init_common() # w1 adf_ip_link_add w1 type veth peer name w2 adf_ip_link_set_master w1 br1 - ip_link_set_up w1 + adf_ip_link_set_up w1 bridge_vlan_add vid 10 dev w1 bridge_vlan_add vid 20 dev w1
@@ -316,12 +316,12 @@ ns_init_common() # w2.10 adf_ip_link_add w2.10 master vw2 link w2 type vlan id 10 - ip_link_set_up w2.10 + adf_ip_link_set_up w2.10 ip_addr_add w2.10 "$ipv4_host" # w2.20 adf_ip_link_add w2.20 master vw2 link w2 type vlan id 20 - ip_link_set_up w2.20 + adf_ip_link_set_up w2.20 ip_addr_add w2.20 "$ipv6_host" } export -f ns_init_common
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +3 -3
@@ -64,14 +64,14 @@ switch_create() # Make sure the bridge uses the MAC address of the local port and not # that of the VxLAN's device. adf_ip_link_set_addr br1 $(mac_get $swp1) - ip_link_set_up br1 + adf_ip_link_set_up br1 - ip_link_set_up $rp1 + adf_ip_link_set_up $rp1 ip_addr_add $rp1 192.0.2.17/28 ip_route_add 192.0.2.32/28 nexthop via 192.0.2.18 adf_ip_link_set_master $swp1 br1 - ip_link_set_up $swp1 + adf_ip_link_set_up $swp1 } vrp2_create()
tools/testing/selftests/net/lib.sh +1 -1
@@ -585,7 +585,7 @@ ip_link_is_up() ip_link_has_flag "$1" UP } -ip_link_set_up() +adf_ip_link_set_up() { local name=$1; shift
tools/testing/selftests/net/test_vxlan_fdb_changelink.sh +1 -1
@@ -75,7 +75,7 @@ test_change_mc_remote() check_command netstat || return adf_ip_link_add v1 up type veth peer name v2 - ip_link_set_up v2 + adf_ip_link_set_up v2 RET=0
tools/testing/selftests/net/vlan_bridge_binding.sh +2 -2
@@ -22,8 +22,8 @@ setup_prepare() for port in d1 d2 d3; do adf_ip_link_add $port type veth peer name r$port - ip_link_set_up $port - ip_link_set_up r$port + adf_ip_link_set_up $port + adf_ip_link_set_up r$port adf_ip_link_set_master $port br done
Signature · 1 line
2.49.0
Re: [PATCH net-next 04/13] selftests: net: lib: Rename ip_link_set_up() to adf_*
Quoted 4 lines · Petr Machata
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 5/13 selftests: net: lib: Rename ip_link_set_down() to adf_*
In reply to Petr MachataRename this function to mark it as autodefer. For details, see the discussion in the cover letter.
--- tools/testing/selftests/net/lib.sh | 2 +- tools/testing/selftests/net/vlan_bridge_binding.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
tools/testing/selftests/net/lib.sh +1 -1
@@ -595,7 +595,7 @@ adf_ip_link_set_up() fi } -ip_link_set_down() +adf_ip_link_set_down() { local name=$1; shift
tools/testing/selftests/net/vlan_bridge_binding.sh +1 -1
@@ -98,7 +98,7 @@ down_netdevs() local dev for dev in "$@"; do - ip_link_set_down $dev + adf_ip_link_set_down $dev done }
Signature · 1 line
2.49.0
Re: [PATCH net-next 05/13] selftests: net: lib: Rename ip_link_set_down() to adf_*
Quoted 4 lines · Petr Machata
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 6/13 selftests: net: lib: Rename ip_addr_add() to adf_*
In reply to Petr MachataRename this function to mark it as autodefer. For details, see the discussion in the cover letter.
--- .../net/forwarding/bridge_fdb_local_vlan_0.sh | 8 ++--- .../net/forwarding/vxlan_bridge_1q_mc_ul.sh | 32 +++++++++---------- .../net/forwarding/vxlan_reserved.sh | 2 +- tools/testing/selftests/net/lib.sh | 2 +- 4 files changed, 22 insertions(+), 22 deletions(-)
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +4 -4
@@ -82,8 +82,8 @@ switch_create() adf_ip_link_set_up "$swp2" - ip_addr_add "$swp3" 192.0.2.17/28 - ip_addr_add "$swp3" 2001:db8:2::1/64 + adf_ip_addr_add "$swp3" 192.0.2.17/28 + adf_ip_addr_add "$swp3" 2001:db8:2::1/64 adf_ip_link_set_up "$swp3" }
@@ -115,8 +115,8 @@ adf_bridge_configure() { local dev - ip_addr_add br 192.0.2.3/28 - ip_addr_add br 2001:db8:1::3/64 + adf_ip_addr_add br 192.0.2.3/28 + adf_ip_addr_add br 2001:db8:1::3/64 bridge_vlan_add dev br vid 1 pvid untagged self bridge_vlan_add dev br vid 2 self
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +16 -16
@@ -124,11 +124,11 @@ h1_create() adf_ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10 adf_ip_link_set_up "$h1.10" - ip_addr_add "$h1.10" 192.0.2.1/28 + adf_ip_addr_add "$h1.10" 192.0.2.1/28 adf_ip_link_add "$h1.20" master "v$h1" link "$h1" type vlan id 20 adf_ip_link_set_up "$h1.20" - ip_addr_add "$h1.20" 2001:db8:1::1/64 + adf_ip_addr_add "$h1.20" 2001:db8:1::1/64 } install_capture()
@@ -216,8 +216,8 @@ switch_create() # IPMR adf_ip_link_add "$IPMR" up type dummy - ip_addr_add "$IPMR" 192.0.2.100/28 - ip_addr_add "$IPMR" 2001:db8:4::1/64 + adf_ip_addr_add "$IPMR" 192.0.2.100/28 + adf_ip_addr_add "$IPMR" 2001:db8:4::1/64 # $swp1 adf_ip_link_set_up "$swp1"
@@ -227,13 +227,13 @@ switch_create() # $swp2 adf_ip_link_set_up "$swp2" - ip_addr_add "$swp2" 192.0.2.33/28 - ip_addr_add "$swp2" 2001:db8:2::1/64 + adf_ip_addr_add "$swp2" 192.0.2.33/28 + adf_ip_addr_add "$swp2" 2001:db8:2::1/64 # $swp3 adf_ip_link_set_up "$swp3" - ip_addr_add "$swp3" 192.0.2.65/28 - ip_addr_add "$swp3" 2001:db8:3::1/64 + adf_ip_addr_add "$swp3" 192.0.2.65/28 + adf_ip_addr_add "$swp3" 2001:db8:3::1/64 } vx_create()
@@ -291,8 +291,8 @@ ns_init_common() # v2$h2 / v2$h3 adf_ip_link_set_up "$if_in" - ip_addr_add "$if_in" "$ipv4_in" - ip_addr_add "$if_in" "$ipv6_in" + adf_ip_addr_add "$if_in" "$ipv4_in" + adf_ip_addr_add "$if_in" "$ipv6_in" # br1 adf_ip_link_add br1 type bridge vlan_filtering 1 \
@@ -317,12 +317,12 @@ ns_init_common() # w2.10 adf_ip_link_add w2.10 master vw2 link w2 type vlan id 10 adf_ip_link_set_up w2.10 - ip_addr_add w2.10 "$ipv4_host" + adf_ip_addr_add w2.10 "$ipv4_host" # w2.20 adf_ip_link_add w2.20 master vw2 link w2 type vlan id 20 adf_ip_link_set_up w2.20 - ip_addr_add w2.20 "$ipv6_host" + adf_ip_addr_add w2.20 "$ipv6_host" } export -f ns_init_common
@@ -720,7 +720,7 @@ ipv4_mcroute_fdb_oif0_sep() { adf_install_sg_sep - ip_addr_add lo 192.0.2.120/28 + adf_ip_addr_add lo 192.0.2.120/28 vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute bridge fdb del dev vx10 00:00:00:00:00:00 bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
@@ -731,7 +731,7 @@ ipv4_mcroute_fdb_oif0_sep_rx() { adf_install_sg_sep_rx lo - ip_addr_add lo 192.0.2.120/28 + adf_ip_addr_add lo 192.0.2.120/28 vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute bridge fdb del dev vx10 00:00:00:00:00:00 bridge fdb add dev vx10 00:00:00:00:00:00 self static dst "$GROUP4"
@@ -742,7 +742,7 @@ ipv4_mcroute_fdb_sep_rx() { adf_install_sg_sep_rx lo - ip_addr_add lo 192.0.2.120/28 + adf_ip_addr_add lo 192.0.2.120/28 vx10_create_wait local 192.0.2.120 group "$GROUP4" dev "$IPMR" mcroute bridge fdb del dev vx10 00:00:00:00:00:00 bridge fdb add \
@@ -754,7 +754,7 @@ ipv6_mcroute_fdb_sep_rx() { adf_install_sg_sep_rx "X$IPMR" - ip_addr_add "X$IPMR" 2001:db8:5::1/64 + adf_ip_addr_add "X$IPMR" 2001:db8:5::1/64 vx20_create_wait local 2001:db8:5::1 group "$GROUP6" dev "$IPMR" mcroute bridge -6 fdb del dev vx20 00:00:00:00:00:00 bridge -6 fdb add dev vx20 00:00:00:00:00:00 \
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +1 -1
@@ -67,7 +67,7 @@ switch_create() adf_ip_link_set_up br1 adf_ip_link_set_up $rp1 - ip_addr_add $rp1 192.0.2.17/28 + adf_ip_addr_add $rp1 192.0.2.17/28 ip_route_add 192.0.2.32/28 nexthop via 192.0.2.18 adf_ip_link_set_master $swp1 br1
tools/testing/selftests/net/lib.sh +1 -1
@@ -605,7 +605,7 @@ adf_ip_link_set_down() fi } -ip_addr_add() +adf_ip_addr_add() { local name=$1; shift
Signature · 1 line
2.49.0
Re: [PATCH net-next 06/13] selftests: net: lib: Rename ip_addr_add() to adf_*
Quoted 4 lines · Petr Machata
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 7/13 selftests: net: lib: Rename ip_route_add() to adf_*
In reply to Petr MachataRename this function to mark it as autodefer. For details, see the discussion in the cover letter.
--- .../selftests/net/forwarding/bridge_fdb_local_vlan_0.sh | 8 ++++---- tools/testing/selftests/net/forwarding/vxlan_reserved.sh | 2 +- tools/testing/selftests/net/lib.sh | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-)
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +4 -4
@@ -47,8 +47,8 @@ host_create() simple_if_init "$h" "$ipv4" "$ipv6" defer simple_if_fini "$h" "$ipv4" "$ipv6" - ip_route_add vrf "v$h" 192.0.2.16/28 nexthop via 192.0.2.3 - ip_route_add vrf "v$h" 2001:db8:2::/64 nexthop via 2001:db8:1::3 + adf_ip_route_add vrf "v$h" 192.0.2.16/28 nexthop via 192.0.2.3 + adf_ip_route_add vrf "v$h" 2001:db8:2::/64 nexthop via 2001:db8:1::3 } h3_create()
@@ -56,8 +56,8 @@ h3_create() simple_if_init "$h3" 192.0.2.18/28 2001:db8:2::2/64 defer simple_if_fini "$h3" 192.0.2.18/28 2001:db8:2::2/64 - ip_route_add vrf "v$h3" 192.0.2.0/28 nexthop via 192.0.2.17 - ip_route_add vrf "v$h3" 2001:db8:1::/64 nexthop via 2001:db8:2::1 + adf_ip_route_add vrf "v$h3" 192.0.2.0/28 nexthop via 192.0.2.17 + adf_ip_route_add vrf "v$h3" 2001:db8:1::/64 nexthop via 2001:db8:2::1 tc qdisc add dev "$h3" clsact defer tc qdisc del dev "$h3" clsact
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +1 -1
@@ -68,7 +68,7 @@ switch_create() adf_ip_link_set_up $rp1 adf_ip_addr_add $rp1 192.0.2.17/28 - ip_route_add 192.0.2.32/28 nexthop via 192.0.2.18 + adf_ip_route_add 192.0.2.32/28 nexthop via 192.0.2.18 adf_ip_link_set_master $swp1 br1 adf_ip_link_set_up $swp1
tools/testing/selftests/net/lib.sh +1 -1
@@ -613,7 +613,7 @@ adf_ip_addr_add() defer ip addr del dev "$name" "$@" } -ip_route_add() +adf_ip_route_add() { ip route add "$@" && \ defer ip route del "$@"
Signature · 1 line
2.49.0
Re: [PATCH net-next 07/13] selftests: net: lib: Rename ip_route_add() to adf_*
Quoted 4 lines · Petr Machata
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 8/13 selftests: net: lib: Rename bridge_vlan_add() to adf_*
In reply to Petr MachataRename this function to mark it as autodefer. For details, see the discussion in the cover letter.
--- .../net/forwarding/bridge_fdb_local_vlan_0.sh | 12 +++++----- .../net/forwarding/vxlan_bridge_1q_mc_ul.sh | 10 ++++----- tools/testing/selftests/net/lib.sh | 2 +- .../selftests/net/vlan_bridge_binding.sh | 22 +++++++++---------- 4 files changed, 23 insertions(+), 23 deletions(-)
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +6 -6
@@ -118,15 +118,15 @@ adf_bridge_configure() adf_ip_addr_add br 192.0.2.3/28 adf_ip_addr_add br 2001:db8:1::3/64 - bridge_vlan_add dev br vid 1 pvid untagged self - bridge_vlan_add dev br vid 2 self - bridge_vlan_add dev br vid 3 self + adf_bridge_vlan_add dev br vid 1 pvid untagged self + adf_bridge_vlan_add dev br vid 2 self + adf_bridge_vlan_add dev br vid 3 self for dev in "$swp1" "$swp2"; do adf_ip_link_set_master "$dev" br - bridge_vlan_add dev "$dev" vid 1 pvid untagged - bridge_vlan_add dev "$dev" vid 2 - bridge_vlan_add dev "$dev" vid 3 + adf_bridge_vlan_add dev "$dev" vid 1 pvid untagged + adf_bridge_vlan_add dev "$dev" vid 2 + adf_bridge_vlan_add dev "$dev" vid 3 done }
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +5 -5
@@ -222,8 +222,8 @@ switch_create() # $swp1 adf_ip_link_set_up "$swp1" adf_ip_link_set_master "$swp1" br1 - bridge_vlan_add vid 10 dev "$swp1" - bridge_vlan_add vid 20 dev "$swp1" + adf_bridge_vlan_add vid 10 dev "$swp1" + adf_bridge_vlan_add vid 20 dev "$swp1" # $swp2 adf_ip_link_set_up "$swp2"
@@ -245,7 +245,7 @@ vx_create() nolearning noudpcsum tos inherit ttl 16 \ "$@" adf_ip_link_set_master "$name" br1 - bridge_vlan_add vid "$vid" dev "$name" pvid untagged + adf_bridge_vlan_add vid "$vid" dev "$name" pvid untagged } export -f vx_create
@@ -307,8 +307,8 @@ ns_init_common() adf_ip_link_add w1 type veth peer name w2 adf_ip_link_set_master w1 br1 adf_ip_link_set_up w1 - bridge_vlan_add vid 10 dev w1 - bridge_vlan_add vid 20 dev w1 + adf_bridge_vlan_add vid 10 dev w1 + adf_bridge_vlan_add vid 20 dev w1 # w2 simple_if_init w2
tools/testing/selftests/net/lib.sh +1 -1
@@ -619,7 +619,7 @@ adf_ip_route_add() defer ip route del "$@" } -bridge_vlan_add() +adf_bridge_vlan_add() { bridge vlan add "$@" && \ defer bridge vlan del "$@"
tools/testing/selftests/net/vlan_bridge_binding.sh +11 -11
@@ -27,20 +27,20 @@ setup_prepare() adf_ip_link_set_master $port br done - bridge_vlan_add vid 11 dev br self - bridge_vlan_add vid 11 dev d1 master + adf_bridge_vlan_add vid 11 dev br self + adf_bridge_vlan_add vid 11 dev d1 master - bridge_vlan_add vid 12 dev br self - bridge_vlan_add vid 12 dev d2 master + adf_bridge_vlan_add vid 12 dev br self + adf_bridge_vlan_add vid 12 dev d2 master - bridge_vlan_add vid 13 dev br self - bridge_vlan_add vid 13 dev d1 master - bridge_vlan_add vid 13 dev d2 master + adf_bridge_vlan_add vid 13 dev br self + adf_bridge_vlan_add vid 13 dev d1 master + adf_bridge_vlan_add vid 13 dev d2 master - bridge_vlan_add vid 14 dev br self - bridge_vlan_add vid 14 dev d1 master - bridge_vlan_add vid 14 dev d2 master - bridge_vlan_add vid 14 dev d3 master + adf_bridge_vlan_add vid 14 dev br self + adf_bridge_vlan_add vid 14 dev d1 master + adf_bridge_vlan_add vid 14 dev d2 master + adf_bridge_vlan_add vid 14 dev d3 master } operstate_is()
Signature · 1 line
2.49.0
Re: [PATCH net-next 08/13] selftests: net: lib: Rename bridge_vlan_add() to adf_*
Quoted 4 lines · Petr Machata
Rename this function to mark it as autodefer. For details, see the discussion in the cover letter.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 9/13 selftests: net: vlan_bridge_binding: Rename dfr_set_binding_*() to adf_*
In reply to Petr MachataThis test contains two autodefer-like helpers, but namespaces them as dfr_* instead of adf_* like this patchset. Rename them.
--- tools/testing/selftests/net/vlan_bridge_binding.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
tools/testing/selftests/net/vlan_bridge_binding.sh +4 -4
@@ -207,13 +207,13 @@ test_binding_toggle_off() do_test_binding_off : "on->off" } -dfr_set_binding_on() +adf_set_binding_on() { set_vlans type vlan bridge_binding on defer set_vlans type vlan bridge_binding off } -dfr_set_binding_off() +adf_set_binding_off() { set_vlans type vlan bridge_binding off defer set_vlans type vlan bridge_binding on
@@ -223,14 +223,14 @@ test_binding_toggle_on_when_lower_down() { add_vlans bridge_binding off set_vlans up - do_test_binding_on dfr_set_binding_on "off->on when lower down" + do_test_binding_on adf_set_binding_on "off->on when lower down" } test_binding_toggle_off_when_lower_down() { add_vlans bridge_binding on set_vlans up - do_test_binding_off dfr_set_binding_off "on->off when lower down" + do_test_binding_off adf_set_binding_off "on->off when lower down" } test_binding_toggle_on_when_upper_down()
Signature · 1 line
2.49.0
Re: [PATCH net-next 09/13] selftests: net: vlan_bridge_binding: Rename dfr_set_binding_*() to adf_*
Quoted 4 lines · Petr Machata
This test contains two autodefer-like helpers, but namespaces them as dfr_* instead of adf_* like this patchset. Rename them.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 10/13 selftests: forwarding: lib: Add an autodefer variant of vrf_prepare()
In reply to Petr MachataMost forwarding tests invoke vrf_prepare() to set up VRF forwarding and vrf_cleanup() to restore the original configuration. Add a helper, adf_vrf_prepare(), which is like vrf_prepare(), but takes care of scheduling the cleanup automatically.
Convert a number of tests that currently use defer to schedule the cleanup.
---
Notes:
CC: Andrew Lunn <[email protected]>
CC: Alessandro Zanni <[email protected]>
CC: Hangbin Liu <[email protected]>
CC: David Yang <[email protected]>
CC: Li Shuang <[email protected]>
.../selftests/drivers/net/mlxsw/devlink_trap_policer.sh | 3 +-- tools/testing/selftests/drivers/net/mlxsw/qos_ets_strict.sh | 3 +-- .../selftests/drivers/net/mlxsw/qos_max_descriptors.sh | 3 +-- tools/testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh | 3 +-- tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 3 +-- .../selftests/net/forwarding/bridge_activity_notify.sh | 3 +-- .../selftests/net/forwarding/bridge_fdb_local_vlan_0.sh | 3 +-- tools/testing/selftests/net/forwarding/lib.sh | 6 ++++++ tools/testing/selftests/net/forwarding/sch_ets_core.sh | 3 +-- tools/testing/selftests/net/forwarding/sch_red.sh | 3 +-- tools/testing/selftests/net/forwarding/sch_tbf_core.sh | 3 +-- .../selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh | 3 +-- tools/testing/selftests/net/forwarding/vxlan_reserved.sh | 3 +-- 13 files changed, 18 insertions(+), 24 deletions(-)
tools/testing/selftests/drivers/net/mlxsw/devlink_trap_policer.sh +1 -2
@@ -106,8 +106,7 @@ setup_prepare() # Reload to ensure devlink-trap settings are back to default. defer devlink_reload - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/drivers/net/mlxsw/qos_ets_strict.sh +1 -2
@@ -225,8 +225,7 @@ setup_prepare() h3mac=$(mac_get $h3) - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/drivers/net/mlxsw/qos_max_descriptors.sh +1 -2
@@ -178,8 +178,7 @@ setup_prepare() h2mac=$(mac_get $h2) - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh +1 -2
@@ -196,8 +196,7 @@ setup_prepare() h3mac=$(mac_get $h3) - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh +1 -2
@@ -250,8 +250,7 @@ setup_prepare() h3_mac=$(mac_get $h3) - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/net/forwarding/bridge_activity_notify.sh +1 -2
@@ -57,8 +57,7 @@ setup_prepare() swp2=${NETIFS[p3]} h2=${NETIFS[p4]} - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +1 -2
@@ -98,8 +98,7 @@ setup_prepare() swp3=${NETIFS[p5]} h3=${NETIFS[p6]} - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare forwarding_enable defer forwarding_restore
tools/testing/selftests/net/forwarding/lib.sh +6 -0
@@ -599,6 +599,12 @@ vrf_cleanup() ip -4 rule del pref 32765 } +adf_vrf_prepare() +{ + vrf_prepare + defer vrf_cleanup +} + __last_tb_id=0 declare -A __TB_IDS
tools/testing/selftests/net/forwarding/sch_ets_core.sh +1 -2
@@ -251,8 +251,7 @@ setup_prepare() put=$swp2 hut=$h2 - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/net/forwarding/sch_red.sh +1 -2
@@ -125,8 +125,7 @@ setup_prepare() h3_mac=$(mac_get $h3) - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/net/forwarding/sch_tbf_core.sh +1 -2
@@ -149,8 +149,7 @@ setup_prepare() h2_mac=$(mac_get $h2) - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare h1_create h2_create
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +1 -2
@@ -371,8 +371,7 @@ setup_prepare() swp3=${NETIFS[p5]} h3=${NETIFS[p6]} - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare forwarding_enable defer forwarding_restore
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +1 -2
@@ -88,8 +88,7 @@ setup_prepare() rp1=${NETIFS[p3]} rp2=${NETIFS[p4]} - vrf_prepare - defer vrf_cleanup + adf_vrf_prepare forwarding_enable defer forwarding_restore
Signature · 1 line
2.49.0
Re: [PATCH net-next 10/13] selftests: forwarding: lib: Add an autodefer variant of vrf_prepare()
Quoted 8 lines · Petr Machata
Most forwarding tests invoke
vrf_prepare()to set up VRF forwarding andvrf_cleanup()to restore the original configuration. Add a helper,adf_vrf_prepare(), which is likevrf_prepare(), but takes care of scheduling the cleanup automatically.Convert a number of tests that currently use defer to schedule the cleanup.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 11/13 selftests: forwarding: lib: Add an autodefer variant of simple_if_init()
In reply to Petr MachataMost forwarding tests invoke simple_if_init() to set up a VRF-based "host" and simple_if_fini() to tear it down again. Add a helper, adf_simple_if_init(), which is like simple_if_fini(), but takes care of scheduling the cleanup automatically.
Convert the tests that currently use defer to schedule the cleanup.
---
Notes:
CC: Andrew Lunn <[email protected]>
CC: Alessandro Zanni <[email protected]>
CC: Hangbin Liu <[email protected]>
CC: David Yang <[email protected]>
CC: Li Shuang <[email protected]>
.../selftests/drivers/net/mlxsw/devlink_trap_policer.sh | 6 ++---- .../selftests/drivers/net/mlxsw/qos_ets_strict.sh | 9 +++------ .../selftests/drivers/net/mlxsw/qos_max_descriptors.sh | 6 ++---- .../testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh | 9 +++------ .../testing/selftests/drivers/net/mlxsw/sch_red_core.sh | 3 +-- .../selftests/net/forwarding/bridge_activity_notify.sh | 6 ++---- .../selftests/net/forwarding/bridge_fdb_local_vlan_0.sh | 8 ++------ tools/testing/selftests/net/forwarding/lib.sh | 6 ++++++ tools/testing/selftests/net/forwarding/sch_ets_core.sh | 6 ++---- tools/testing/selftests/net/forwarding/sch_red.sh | 9 +++------ tools/testing/selftests/net/forwarding/sch_tbf_core.sh | 3 +-- .../selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh | 6 ++---- tools/testing/selftests/net/forwarding/vxlan_reserved.sh | 6 ++---- 13 files changed, 31 insertions(+), 52 deletions(-)
tools/testing/selftests/drivers/net/mlxsw/devlink_trap_policer.sh +2 -4
@@ -44,8 +44,7 @@ source $lib_dir/devlink_lib.sh h1_create() { - simple_if_init $h1 192.0.2.1/24 - defer simple_if_fini $h1 192.0.2.1/24 + adf_simple_if_init $h1 192.0.2.1/24 mtu_set $h1 10000 defer mtu_restore $h1
@@ -56,8 +55,7 @@ h1_create() h2_create() { - simple_if_init $h2 198.51.100.1/24 - defer simple_if_fini $h2 198.51.100.1/24 + adf_simple_if_init $h2 198.51.100.1/24 mtu_set $h2 10000 defer mtu_restore $h2
tools/testing/selftests/drivers/net/mlxsw/qos_ets_strict.sh +3 -6
@@ -57,8 +57,7 @@ source qos_lib.sh h1_create() { - simple_if_init $h1 - defer simple_if_fini $h1 + adf_simple_if_init $h1 mtu_set $h1 10000 defer mtu_restore $h1
@@ -70,8 +69,7 @@ h1_create() h2_create() { - simple_if_init $h2 - defer simple_if_fini $h2 + adf_simple_if_init $h2 mtu_set $h2 10000 defer mtu_restore $h2
@@ -83,8 +81,7 @@ h2_create() h3_create() { - simple_if_init $h3 - defer simple_if_fini $h3 + adf_simple_if_init $h3 mtu_set $h3 10000 defer mtu_restore $h3
tools/testing/selftests/drivers/net/mlxsw/qos_max_descriptors.sh +2 -4
@@ -68,8 +68,7 @@ mlxsw_only_on_spectrum 2+ || exit h1_create() { - simple_if_init $h1 - defer simple_if_fini $h1 + adf_simple_if_init $h1 vlan_create $h1 111 v$h1 192.0.2.33/28 defer vlan_destroy $h1 111
@@ -78,8 +77,7 @@ h1_create() h2_create() { - simple_if_init $h2 - defer simple_if_fini $h2 + adf_simple_if_init $h2 vlan_create $h2 111 v$h2 192.0.2.34/28 defer vlan_destroy $h2 111
tools/testing/selftests/drivers/net/mlxsw/qos_mc_aware.sh +3 -6
@@ -72,8 +72,7 @@ source qos_lib.sh h1_create() { - simple_if_init $h1 192.0.2.65/28 - defer simple_if_fini $h1 192.0.2.65/28 + adf_simple_if_init $h1 192.0.2.65/28 mtu_set $h1 10000 defer mtu_restore $h1
@@ -81,8 +80,7 @@ h1_create() h2_create() { - simple_if_init $h2 - defer simple_if_fini $h2 + adf_simple_if_init $h2 mtu_set $h2 10000 defer mtu_restore $h2
@@ -94,8 +92,7 @@ h2_create() h3_create() { - simple_if_init $h3 192.0.2.66/28 - defer simple_if_fini $h3 192.0.2.66/28 + adf_simple_if_init $h3 192.0.2.66/28 mtu_set $h3 10000 defer mtu_restore $h3
tools/testing/selftests/drivers/net/mlxsw/sch_red_core.sh +1 -2
@@ -100,8 +100,7 @@ host_create() local dev=$1; shift local host=$1; shift - simple_if_init $dev - defer simple_if_fini $dev + adf_simple_if_init $dev mtu_set $dev 10000 defer mtu_restore $dev
tools/testing/selftests/net/forwarding/bridge_activity_notify.sh +2 -4
@@ -26,14 +26,12 @@ source lib.sh h1_create() { - simple_if_init "$h1" 192.0.2.1/28 - defer simple_if_fini "$h1" 192.0.2.1/28 + adf_simple_if_init "$h1" 192.0.2.1/28 } h2_create() { - simple_if_init "$h2" 192.0.2.2/28 - defer simple_if_fini "$h2" 192.0.2.2/28 + adf_simple_if_init "$h2" 192.0.2.2/28 } switch_create()
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +2 -6
@@ -44,18 +44,14 @@ host_create() local ipv4=$1; shift local ipv6=$1; shift - simple_if_init "$h" "$ipv4" "$ipv6" - defer simple_if_fini "$h" "$ipv4" "$ipv6" - + adf_simple_if_init "$h" "$ipv4" "$ipv6" adf_ip_route_add vrf "v$h" 192.0.2.16/28 nexthop via 192.0.2.3 adf_ip_route_add vrf "v$h" 2001:db8:2::/64 nexthop via 2001:db8:1::3 } h3_create() { - simple_if_init "$h3" 192.0.2.18/28 2001:db8:2::2/64 - defer simple_if_fini "$h3" 192.0.2.18/28 2001:db8:2::2/64 - + adf_simple_if_init "$h3" 192.0.2.18/28 2001:db8:2::2/64 adf_ip_route_add vrf "v$h3" 192.0.2.0/28 nexthop via 192.0.2.17 adf_ip_route_add vrf "v$h3" 2001:db8:1::/64 nexthop via 2001:db8:2::1
tools/testing/selftests/net/forwarding/lib.sh +6 -0
@@ -717,6 +717,12 @@ simple_if_fini() vrf_destroy $vrf_name } +adf_simple_if_init() +{ + simple_if_init "$@" + defer simple_if_fini "$@" +} + tunnel_create() { local name=$1; shift
tools/testing/selftests/net/forwarding/sch_ets_core.sh +2 -4
@@ -165,8 +165,7 @@ h1_create() { local i; - simple_if_init $h1 - defer simple_if_fini $h1 + adf_simple_if_init $h1 mtu_set $h1 9900 defer mtu_restore $h1
@@ -182,8 +181,7 @@ h2_create() { local i - simple_if_init $h2 - defer simple_if_fini $h2 + adf_simple_if_init $h2 mtu_set $h2 9900 defer mtu_restore $h2
tools/testing/selftests/net/forwarding/sch_red.sh +3 -6
@@ -52,8 +52,7 @@ PKTSZ=1400 h1_create() { - simple_if_init $h1 192.0.2.1/28 - defer simple_if_fini $h1 192.0.2.1/28 + adf_simple_if_init $h1 192.0.2.1/28 mtu_set $h1 10000 defer mtu_restore $h1
@@ -65,8 +64,7 @@ h1_create() h2_create() { - simple_if_init $h2 192.0.2.2/28 - defer simple_if_fini $h2 192.0.2.2/28 + adf_simple_if_init $h2 192.0.2.2/28 mtu_set $h2 10000 defer mtu_restore $h2
@@ -74,8 +72,7 @@ h2_create() h3_create() { - simple_if_init $h3 192.0.2.3/28 - defer simple_if_fini $h3 192.0.2.3/28 + adf_simple_if_init $h3 192.0.2.3/28 mtu_set $h3 10000 defer mtu_restore $h3
tools/testing/selftests/net/forwarding/sch_tbf_core.sh +1 -2
@@ -59,8 +59,7 @@ host_create() local dev=$1; shift local host=$1; shift - simple_if_init $dev - defer simple_if_fini $dev + adf_simple_if_init $dev mtu_set $dev 10000 defer mtu_restore $dev
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +2 -4
@@ -119,8 +119,7 @@ source lib.sh h1_create() { - simple_if_init "$h1" - defer simple_if_fini "$h1" + adf_simple_if_init "$h1" adf_ip_link_add "$h1.10" master "v$h1" link "$h1" type vlan id 10 adf_ip_link_set_up "$h1.10"
@@ -311,8 +310,7 @@ ns_init_common() adf_bridge_vlan_add vid 20 dev w1 # w2 - simple_if_init w2 - defer simple_if_fini w2 + adf_simple_if_init w2 # w2.10 adf_ip_link_add w2.10 master vw2 link w2 type vlan id 10
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +2 -4
@@ -47,8 +47,7 @@ source lib.sh h1_create() { - simple_if_init $h1 192.0.2.1/28 - defer simple_if_fini $h1 192.0.2.1/28 + adf_simple_if_init $h1 192.0.2.1/28 tc qdisc add dev $h1 clsact defer tc qdisc del dev $h1 clsact
@@ -76,8 +75,7 @@ switch_create() vrp2_create() { - simple_if_init $rp2 192.0.2.18/28 - defer simple_if_fini $rp2 192.0.2.18/28 + adf_simple_if_init $rp2 192.0.2.18/28 } setup_prepare()
Signature · 1 line
2.49.0
Re: [PATCH net-next 11/13] selftests: forwarding: lib: Add an autodefer variant of simple_if_init()
Quoted 8 lines · Petr Machata
Most forwarding tests invoke
simple_if_init()to set up a VRF-based "host" andsimple_if_fini()to tear it down again. Add a helper,adf_simple_if_init(), which is likesimple_if_fini(), but takes care of scheduling the cleanup automatically.Convert the tests that currently use defer to schedule the cleanup.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 12/13 selftests: forwarding: lib: Add an autodefer variant of forwarding_enable()
In reply to Petr MachataMost forwarding tests invoke forwarding_enable() to enable the router and forwarding_restore() to restore the original configuration. Add a helper, adf_forwarding_enable(), which is like forwarding_enable(), but takes care of scheduling the cleanup automatically.
Convert the tests that currently use defer to schedule the cleanup.
---
Notes:
CC: Alessandro Zanni <[email protected]>
CC: Hangbin Liu <[email protected]>
CC: David Yang <[email protected]>
CC: Li Shuang <[email protected]>
.../selftests/net/forwarding/bridge_fdb_local_vlan_0.sh | 4 +--- tools/testing/selftests/net/forwarding/lib.sh | 6 ++++++ .../selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh | 4 +--- tools/testing/selftests/net/forwarding/vxlan_reserved.sh | 4 +--- 4 files changed, 9 insertions(+), 9 deletions(-)
tools/testing/selftests/net/forwarding/bridge_fdb_local_vlan_0.sh +1 -3
@@ -95,9 +95,7 @@ setup_prepare() h3=${NETIFS[p6]} adf_vrf_prepare - - forwarding_enable - defer forwarding_restore + adf_forwarding_enable host_create "$h1" 192.0.2.1/28 2001:db8:1::1/64 host_create "$h2" 192.0.2.2/28 2001:db8:1::2/64
tools/testing/selftests/net/forwarding/lib.sh +6 -0
@@ -1023,6 +1023,12 @@ forwarding_restore() sysctl_restore net.ipv4.conf.all.forwarding } +adf_forwarding_enable() +{ + forwarding_enable + defer forwarding_restore +} + declare -A MTU_ORIG mtu_set() {
tools/testing/selftests/net/forwarding/vxlan_bridge_1q_mc_ul.sh +1 -3
@@ -370,9 +370,7 @@ setup_prepare() h3=${NETIFS[p6]} adf_vrf_prepare - - forwarding_enable - defer forwarding_restore + adf_forwarding_enable adf_ip_link_add "v1$h2" type veth peer name "v2$h2" adf_ip_link_add "v1$h3" type veth peer name "v2$h3"
tools/testing/selftests/net/forwarding/vxlan_reserved.sh +1 -3
@@ -87,9 +87,7 @@ setup_prepare() rp2=${NETIFS[p4]} adf_vrf_prepare - - forwarding_enable - defer forwarding_restore + adf_forwarding_enable h1_create switch_create
Signature · 1 line
2.49.0
Re: [PATCH net-next 12/13] selftests: forwarding: lib: Add an autodefer variant of forwarding_enable()
Quoted 8 lines · Petr Machata
Most forwarding tests invoke
forwarding_enable()to enable the router andforwarding_restore()to restore the original configuration. Add a helper,adf_forwarding_enable(), which is likeforwarding_enable(), but takes care of scheduling the cleanup automatically.Convert the tests that currently use defer to schedule the cleanup.
Signed-off-by Petr Machata <[email protected]>
Petr Machata
maintainerPATCH 13/13 selftests: forwarding: README: Mention defer, adf_
In reply to Petr MachataMention how it would be nice if new code used defer. Also if it does that in dirtying helpers, how it would be nice if these were named adf_*.
---
Notes:
CC: Kuniyuki Iwashima <[email protected]>
CC: KuniyNicolas Dichtel <[email protected]>
tools/testing/selftests/net/forwarding/README | 15 +++++++++++++++ 1 file changed, 15 insertions(+)
tools/testing/selftests/net/forwarding/README +15 -0
@@ -57,6 +57,21 @@ o Code shall be checked using ShellCheck [1] prior to submission. 1. https://www.shellcheck.net/ +Cleanups +-------- + +o lib.sh brings in defer.sh (by way of ../lib.sh) by default. Consider + making use of the defer primitive to schedule automatic cleanups. This + makes it harder to forget to remove a temporary netdevice, kill a running + process or perform other cleanup when the test script is interrupted. + +o When adding a helper that dirties the environment, but schedules all + necessary cleanups through defer, consider prefixing it adf_ for + consistency with lib.sh and ../lib.sh helpers. This serves as an + immediately visible bit of documentation about the helper API. + +o Definitely do the above for any new code in lib.sh, if practical. + Customization =============
Signature · 1 line
2.49.0
Re: [PATCH net-next 13/13] selftests: forwarding: README: Mention defer, adf_
Quoted 4 lines · Petr Machata
Mention how it would be nice if new code used defer. Also if it does that in dirtying helpers, how it would be nice if these were named adf_*.
Signed-off-by Petr Machata <[email protected]>
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Jakub Kicinski <[email protected]>:
Quoted 6 lines · On Thu, 25 Sep 2025 19:31:43 +0200 you wrote:
selftests/net/lib.shcontains a suite of iproute2 wrappers that automatically schedule the corresponding cleanup through defer. The fact they do so is however not immediately obvious, one needs to know which functions are handling the deferral behind the scenes, and which expect the caller to handle cleanups themselves.
Quoted 7 lines
A convention for these auto-deferring functions would help both writing and patch review. This patchset does so by marking these functions with an
adf_prefix. We already have a few such functions:forwarding/lib.shhasadf_mcd_start()and a few selftests add private helpers that conform to this convention.[...]
Here is the summary with links:
- [net-next,01/13] selftests: net: lib: Rename ip_link_add() to adf_*
https://git.kernel.org/netdev/net-next/c/191c4912f9c3 - [net-next,02/13] selftests: net: lib: Rename ip_link_set_master() to adf_* https://git.kernel.org/netdev/net-next/c/c3cbd21fe18e - [net-next,03/13] selftests: net: lib: Rename ip_link_set_addr() to adf_* https://git.kernel.org/netdev/net-next/c/beb98a347762 - [net-next,04/13] selftests: net: lib: Rename ip_link_set_up() to adf_* https://git.kernel.org/netdev/net-next/c/34d3f8b75e2b - [net-next,05/13] selftests: net: lib: Rename ip_link_set_down() to adf_* https://git.kernel.org/netdev/net-next/c/a55f9fb3432e - [net-next,06/13] selftests: net: lib: Rename ip_addr_add() to adf_* https://git.kernel.org/netdev/net-next/c/773603d6db30 - [net-next,07/13] selftests: net: lib: Rename ip_route_add() to adf_* https://git.kernel.org/netdev/net-next/c/d85bcf6505d2 - [net-next,08/13] selftests: net: lib: Rename bridge_vlan_add() to adf_* https://git.kernel.org/netdev/net-next/c/b628dfcd54cb - [net-next,09/13] selftests: net: vlan_bridge_binding: Rename dfr_set_binding_*() to adf_* https://git.kernel.org/netdev/net-next/c/14b72996ae80 - [net-next,10/13] selftests: forwarding: lib: Add an autodefer variant of vrf_prepare() https://git.kernel.org/netdev/net-next/c/02aabe00b2e1 - [net-next,11/13] selftests: forwarding: lib: Add an autodefer variant of simple_if_init() https://git.kernel.org/netdev/net-next/c/f53748d56d10 - [net-next,12/13] selftests: forwarding: lib: Add an autodefer variant of forwarding_enable() https://git.kernel.org/netdev/net-next/c/040a6cbead5d - [net-next,13/13] selftests: forwarding: README: Mention defer, adf_ https://git.kernel.org/netdev/net-next/c/fca6ff9191bd
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html