* [PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test
@ 2019-03-06 23:25 Stanislav Fomichev
2019-03-07 0:50 ` Y Song
2019-03-07 10:30 ` Daniel Borkmann
0 siblings, 2 replies; 3+ messages in thread
From: Stanislav Fomichev @ 2019-03-06 23:25 UTC (permalink / raw)
To: netdev, bpf; +Cc: davem, ast, daniel, Stanislav Fomichev
CHECK macro implicitly uses duration. We call CHECK() a couple of times
before duration is initialized from bpf_prog_test_run().
Explicitly set duration to 0 to avoid compiler warnings.
Fixes: 740f8a657221 ("selftests/bpf: make sure signal interrupts BPF_PROG_TEST_RUN")
Signed-off-by: Stanislav Fomichev <sdf@google.com>
---
tools/testing/selftests/bpf/prog_tests/signal_pending.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tools/testing/selftests/bpf/prog_tests/signal_pending.c b/tools/testing/selftests/bpf/prog_tests/signal_pending.c
index f2a37bbf91ab..996e808f43a2 100644
--- a/tools/testing/selftests/bpf/prog_tests/signal_pending.c
+++ b/tools/testing/selftests/bpf/prog_tests/signal_pending.c
@@ -12,7 +12,7 @@ static void test_signal_pending_by_type(enum bpf_prog_type prog_type)
struct itimerval timeo = {
.it_value.tv_usec = 100000, /* 100ms */
};
- __u32 duration, retval;
+ __u32 duration = 0, retval;
int prog_fd;
int err;
int i;
--
2.21.0.352.gf09ad66450-goog
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test
2019-03-06 23:25 [PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test Stanislav Fomichev
@ 2019-03-07 0:50 ` Y Song
2019-03-07 10:30 ` Daniel Borkmann
1 sibling, 0 replies; 3+ messages in thread
From: Y Song @ 2019-03-07 0:50 UTC (permalink / raw)
To: Stanislav Fomichev
Cc: netdev, bpf, David Miller, Alexei Starovoitov, Daniel Borkmann
On Wed, Mar 6, 2019 at 3:25 PM Stanislav Fomichev <sdf@google.com> wrote:
>
> CHECK macro implicitly uses duration. We call CHECK() a couple of times
> before duration is initialized from bpf_prog_test_run().
> Explicitly set duration to 0 to avoid compiler warnings.
>
> Fixes: 740f8a657221 ("selftests/bpf: make sure signal interrupts BPF_PROG_TEST_RUN")
>
> Signed-off-by: Stanislav Fomichev <sdf@google.com>
Acked-by: Yonghong Song <yhs@fb.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test
2019-03-06 23:25 [PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test Stanislav Fomichev
2019-03-07 0:50 ` Y Song
@ 2019-03-07 10:30 ` Daniel Borkmann
1 sibling, 0 replies; 3+ messages in thread
From: Daniel Borkmann @ 2019-03-07 10:30 UTC (permalink / raw)
To: Stanislav Fomichev, netdev, bpf; +Cc: davem, ast
On 03/07/2019 12:25 AM, Stanislav Fomichev wrote:
> CHECK macro implicitly uses duration. We call CHECK() a couple of times
> before duration is initialized from bpf_prog_test_run().
> Explicitly set duration to 0 to avoid compiler warnings.
>
> Fixes: 740f8a657221 ("selftests/bpf: make sure signal interrupts BPF_PROG_TEST_RUN")
>
> Signed-off-by: Stanislav Fomichev <sdf@google.com>
Applied, thanks!
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2019-03-07 10:30 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-03-06 23:25 [PATCH bpf] selftests: bpf: test_progs: initialize duration in singal_pending test Stanislav Fomichev
2019-03-07 0:50 ` Y Song
2019-03-07 10:30 ` Daniel Borkmann
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.