Subject: Re: next-20160208 perf build error "tests/bp_signal.c:106:47: error: declaration of ‘signal’ shadows a global declaration [-Werror=shadow]"

From: Arnaldo Carvalho de Melo <[email-masked]>
Date: Thu, 11 Feb 2016 19:21:21 -0300

Em Mon, Feb 08, 2016 at 10:28:53AM -0800, Vinson Lee escreveu:
> Hi.
> 
> I hit this perf build error with next-20160208 with GCC 4.6.

I try to test on a rhel6 vm from time to time, need to do it using
docker or something, thanks for the report, but can you please send a
proper patch, with a:

Fixes: 6a7d550e8b2e ("perf test: Check environment before start real BPF test")

Line, signed-off, etc?

Thanks,

- Arnaldo

>   CC       tests/bp_signal.o
> tests/bp_signal.c: In function ‘__event’:
> tests/bp_signal.c:106:47: error: declaration of ‘signal’ shadows a
> global declaration [-Werror=shadow]
> tests/bp_signal.c: In function ‘bp_event’:
> tests/bp_signal.c:144:37: error: declaration of ‘signal’ shadows a
> global declaration [-Werror=shadow]
> tests/bp_signal.c: In function ‘wp_event’:
> tests/bp_signal.c:149:37: error: declaration of ‘signal’ shadows a
> global declaration [-Werror=shadow]
> 
> The build error is introduced with "perf test: Check environment
> before start real BPF test".
> 
> commit 6a7d550e8b2eeb380ab85d9bc53571123b98345b
> Author: Wang Nan <[email-masked]>
> Date:   Mon Jan 25 09:55:53 2016 +0000
> 
>     perf test: Check environment before start real BPF test
> 
>     Copying perf to old kernel system results:
> 
>       # perf test bpf
>       37: Test BPF filter                                          :
>       37.1: Test basic BPF filtering                               : FAILED!
>       37.2: Test BPF prologue generation                           : Skip
> 
>     However, in case when kernel doesn't support a test case it should
>     return 'Skip', 'FAILED!' should be reserved for kernel tests for when
>     the kernel supports a feature that then fails to work as advertised.
> 
>     This patch checks environment before real testcase.
> 
>     Signed-off-by: Wang Nan <[email-masked]>
>     Suggested-by: Arnaldo Carvalho de Melo <[email-masked]>
>     Cc: Alexei Starovoitov <[email-masked]>
>     Cc: Brendan Gregg <[email-masked]>
>     Cc: Daniel Borkmann <[email-masked]>
>     Cc: He Kuang <[email-masked]>
>     Cc: Jiri Olsa <[email-masked]>
>     Cc: Li Zefan <[email-masked]>
>     Cc: Masami Hiramatsu <[email-masked]>
>     Cc: Namhyung Kim <[email-masked]>
>     Cc: Peter Zijlstra <[email-masked]>
>     Cc: Will Deacon <[email-masked]>
>     Cc: [email-masked]
>     Link: http://lkml.kernel.org/r/[email-masked]
>     Signed-off-by: Arnaldo Carvalho de Melo <[email-masked]>
> 
> Cheers,
> Vinson