NACK[Unstable]: [K/Unstable][SRU][PATCH 0/1] Fix powerpc test build issue in ubuntu_kernel_selftests

Andrea Righi andrea.righi at canonical.com
Tue Jan 3 15:31:40 UTC 2023


On Fri, Dec 30, 2022 at 06:05:32PM +0800, Po-Hsu Lin wrote:
> [Impact]
> When trying to build powerpc tests from ubuntu_kernel_selftests, it
> will fail with:
>     inlined from ‘cycles_with_mmcr2’ at cycles_with_mmcr2_test.c:81:3:
> /usr/include/powerpc64le-linux-gnu/bits/stdio2.h:86:10: error: ‘actual’ may be used uninitialized [-Werror=maybe-uninitialized]
>    86 | return __printf_chk (__USE_FORTIFY_LEVEL - 1, __fmt, __va_arg_pack ());
>       | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> cycles_with_mmcr2_test.c: In function ‘cycles_with_mmcr2’:
> cycles_with_mmcr2_test.c:25:36: note: ‘actual’ was declared here
>    25 | uint64_t val, expected[2], actual;
>       | ^~~~~~
> cc1: all warnings being treated as errors
> 
> [Fix]
> * ff446cd768 "selftests/powerpc: Avoid GCC 12 uninitialised variable warning"
> This patch can be cherry-picked into Kinetic kernel.
> 
> [Test]
> Apply this patch to the kernel tree and build it with:
> sudo make -C linux/tools/testing/selftests TARGETS=powerpc
> 
> With this error fixed, test compliation can finish without any issue.
> 
> [Where problems could occur]
> Change for test case, no impact to acutal function.

Already applied to lunar/linux-unstable via regular rebase (same with
lunar/linux).

-Andrea



More information about the kernel-team mailing list