Jakub Kicinski kuba@kernel.org writes:
@@ -157,7 +168,7 @@ run_test() check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address" \ "$smac > $UNKNOWN_UC_ADDR1, ethertype IPv4 (0x0800)" \
false
false true
check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address, promisc" \ "$smac > $UNKNOWN_UC_ADDR2, ethertype IPv4 (0x0800)" \
For veth specifically there is xfail_on_veth:
xfail_on_veth $rcv_if_name \ check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address" \ "$smac > $UNKNOWN_UC_ADDR1, ethertype IPv4 (0x0800)" \ false
Which is IMHO clearer than passing an extra boolean.
Not sure what to do about the bridge bit though. In principle the various xfail_on_'s can be chained, so e.g. this should work:
xfail_on_bridge $rcv_if_name \ xfail_on_veth $rcv_if_name \ check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address" \ "$smac > $UNKNOWN_UC_ADDR1, ethertype IPv4 (0x0800)" \ false
I find this preferable to adding these ad-hoc tweaks to each test individually. Maybe it would make sense to have:
xfail_on_kind $rcv_if_name veth bridge \ check_rcv $rcv_if_name "Unicast IPv4 to unknown MAC address" \ "$smac > $UNKNOWN_UC_ADDR1, ethertype IPv4 (0x0800)" \ false
And then either replace the existing xfail_on_veth's (there are just a handful) or convert xfail_on_veth to a wrapper around xfail_on_kind.