lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Date:   Thu, 20 May 2021 15:00:32 +0000
From:   Danielle Ratson <danieller@...dia.com>
To:     "po-hsu.lin@...onical.com" <po-hsu.lin@...onical.com>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "linux-kselftest@...r.kernel.org" <linux-kselftest@...r.kernel.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>
CC:     "shuah@...nel.org" <shuah@...nel.org>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "davem@...emloft.net" <davem@...emloft.net>,
        "skhan@...uxfoundation.org" <skhan@...uxfoundation.org>
Subject: RE: [PATCH] selftests: net: devlink_port_split.py: skip the test if
 no devlink device



> -----Original Message-----
> From: Po-Hsu Lin <po-hsu.lin@...onical.com>
> Sent: Thursday, May 20, 2021 1:50 PM
> To: linux-kernel@...r.kernel.org; linux-kselftest@...r.kernel.org; netdev@...r.kernel.org
> Cc: po-hsu.lin@...onical.com; shuah@...nel.org; kuba@...nel.org; davem@...emloft.net; skhan@...uxfoundation.org
> Subject: [PATCH] selftests: net: devlink_port_split.py: skip the test if no devlink device
> 
> When there is no devlink device, the following command will return:
>   $ devlink -j dev show
>   {dev:{}}
> 
> This will cause IndexError when trying to access the first element in dev of this json dataset. Use the kselftest framework skip code to
> skip this test in this case.
> 
> Example output with this change:
>   # selftests: net: devlink_port_split.py
>   # no devlink device was found, test skipped
>   ok 7 selftests: net: devlink_port_split.py # SKIP
> 
> Link: https://bugs.launchpad.net/bugs/1928889
> Signed-off-by: Po-Hsu Lin <po-hsu.lin@...onical.com>

Reviewed-by: Danielle Ratson <danieller@...dia.com>

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ