Message ID | 20210701080442.52267-1-po-hsu.lin@canonical.com |
---|---|
Headers | show |
Series | selftests: net: devlink_port_split.py: skip the test if no devlink device | expand |
On 01/07/2021 10:04, Po-Hsu Lin wrote: > [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(-) > Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@canonical.com> Best regards, Krzysztof
On Thu, Jul 01, 2021 at 04:04:41PM +0800, Po-Hsu Lin wrote: > [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 I upstreamed a similar fix the other day: https://lore.kernel.org/lkml/162492240312.3183.18165138324418989489.git-patchwork-notify@kernel.org/T/ but yours look nicer, so: Acked-by: Paolo Pisati <paolo.pisati@canonical.com>
applied to oem-5.10, thanks
Acked-By: AceLan Kao <acelan.kao@canonical.com>
applied to oem-5.13, thanks
Acked-By: AceLan Kao <acelan.kao@canonical.com>
On 01.07.21 10:04, Po-Hsu Lin wrote: > [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(-) > Applied to hirsute:linux. Thanks, Kleber