summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorMinxi Hou <houminxi@gmail.com>2026-06-05 00:30:16 +0800
committerPaolo Abeni <pabeni@redhat.com>2026-06-09 15:17:51 +0200
commit9415471e01c1aaac43daa6af3a261dc0c6c3a47c (patch)
treed831a8a7e151843ec51524c37ed310d8a2a7b293 /include/linux
parentdb7a16556f2561bf314a351785b36d7f171f44e7 (diff)
downloadlwn-9415471e01c1aaac43daa6af3a261dc0c6c3a47c.tar.gz
lwn-9415471e01c1aaac43daa6af3a261dc0c6c3a47c.zip
selftests/net/openvswitch: guard command substitutions against empty output
When ip-link output is unavailable, when the upcall daemon log has not been written yet, or when pahole does not know the OVS drop subsystem ID, the affected command substitutions silently produce empty strings. The caller then passes empty sha= or pid= arguments to ovs_add_flow, or matches against wrong drop reason codes, all without a diagnostic. Add [ -z ] guards immediately after each assignment. For test_arp_ping, also align the MAC extraction to use awk '/link\/ether/' as in test_pop_vlan. The drop_reason guard returns ksft_skip because an absent subsystem ID is an environment issue, not a test failure. Signed-off-by: Minxi Hou <houminxi@gmail.com> Reviewed-by: Aaron Conole <aconole@redhat.com> Link: https://patch.msgid.link/20260604163016.3929371-1-houminxi@gmail.com Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions