[J/K][L][SRU][PATCH 0/1] selftests: net: devlink_port_split.py: skip test if no suitable device available

Po-Hsu Lin po-hsu.lin at canonical.com
Mon Mar 20 03:59:46 UTC 2023


[Impact]
On s390x LPAR instances, this test will fail with:
    #   File "linux/tools/testing/selftests/net/devlink_port_split.py", line 64, in get_if_names
    #     if ports[port]['flavour'] == 'physical':
    # KeyError: 'flavour'
  not ok 1 selftests: net: devlink_port_split.py # exit=1

This is because the mlx4 driver in use on this instance does not set
attributes, therefore `devlink -j port show` command output does not
contain this "flavour" key.

[Fix]
* 3de66d08d3 selftests: net: devlink_port_split.py: skip test if no
  suitable device available

This patch can be cherry-picked into our J/K/L kernels.

[Test]
Run the patched devlink_port_split.py on s390x LPAR, and it won't
fail with # KeyError: 'flavour' but marked as SKIP instead.

[Where problems could occur]
If this change is incorrect, it may affect the test result, however it's
limited to testing tools, no actual impact to kernel functions.

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

 tools/testing/selftests/net/devlink_port_split.py | 36 +++++++++++++++++++----
 1 file changed, 31 insertions(+), 5 deletions(-)

-- 
2.7.4




More information about the kernel-team mailing list