[F-oem-5.10/F-oem-5.13][H/I/Unstable][SRU][PATCH 0/1] selftests: net: devlink_port_split.py: skip the test if no devlink device

Po-Hsu Lin po-hsu.lin at canonical.com
Thu Jul 1 08:04:41 UTC 2021


[Impact]
If there is no devlink device available, the devlink_port_split.py in
kselftest/net will fail with:
 # selftests: net: devlink_port_split.py
 # Traceback (most recent call last):
 # File "/tmp/autopkgtest.ojlWKQ/build.XZw/src/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests/net/./devlink_port_split.py", line 277, in <module>
 # main()
 # File "/tmp/autopkgtest.ojlWKQ/build.XZw/src/autotest/client/tmp/ubuntu_kernel_selftests/src/linux/tools/testing/selftests/net/./devlink_port_split.py", line 242, in main
 # dev = list(devs.keys())[0]
 # IndexError: list index out of range
 not ok 43 selftests: net: devlink_port_split.py # exit=1

[Fix]
* 25173dd4093a24 selftests: net: devlink_port_split.py: skip the test
if no devlink device

This test only exist in our source tree since Hirsute, this patch can
be cherry-picked into all affected kernels.

[Test Plan]
Run this test manually from the patched source tree, the test will be
skipped when there is no devlink device:
  # selftests: net: devlink_port_split.py
  # no devlink device was found, test skipped
  ok 7 selftests: net: devlink_port_split.py # SKIP

[Where problems could occur]
Change limited to testing tool, if this change is incorrect it might
cause false-negative result in our test report.


Po-Hsu Lin (1):
  selftests: net: devlink_port_split.py: skip the test if no devlink
    device

 tools/testing/selftests/net/devlink_port_split.py | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

-- 
2.7.4




More information about the kernel-team mailing list