ACK: [autotest-client-tests][PATCH 0/2] ubuntu_boot: fix return value for kernel_taint_test.py and format improvement

Francis Ginther francis.ginther at canonical.com
Fri Apr 8 18:09:11 UTC 2022


Acked-by: Francis Ginther <francis.ginther at canonical.com>

On Wed, Mar 30, 2022 at 06:12:04PM +0800, Po-Hsu Lin wrote:
> exit takes only integer args in the range 0 - 255
> If we return the taint value read from /proc/sys/kernel/tainted,
> it might exceed this range and causing unexpected behaviour.
> 
> On a system with kernel warning, e.g. Intel node spitfire with 4.4
> $ ./kernel_taint_test.py
> Kernel taint value is 512
> Taint bit value: 9 (kernel issued warning)
> $ echo 0
> 0
> 
> Let's just simplify the return logic of report_failures() to return
> either 0 or 1.
> 
> Luckily we do run this test along with log check test, so even with
> this test reporting a false negative result, we can still catch
> warnings with the log check test.
> 
> Tested on node spitfire with X-4.4 and the kernel_tainted test will
> fail as expected.
> 
> Po-Hsu Lin (2):
>   UBUNTU: SAUCE: ubuntu_boot: fix return value for kernel_taint_test.py
>   UBUNTU: SAUCE: ubuntu_boot: move report_failures() to main() and code
>     cleanup
> 
>  ubuntu_boot/kernel_taint_test.py | 45 ++++++++++++++------------------
>  1 file changed, 19 insertions(+), 26 deletions(-)
> 
> -- 
> 2.25.1
> 
> 
> -- 
> kernel-team mailing list
> kernel-team at lists.ubuntu.com
> https://lists.ubuntu.com/mailman/listinfo/kernel-team



More information about the kernel-team mailing list