diff options
author | Stanislav Fomichev <sdf@google.com> | 2019-03-06 18:25:26 -0500 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2019-03-07 04:46:25 -0500 |
commit | 69b09175d68241cb96ff9433d8e7a17382d720d6 (patch) | |
tree | 4b0f21f8cad390faf4bea9126a29bdbf4d60d4e6 /tools | |
parent | 8e2688876c7f7073d925e1f150e86b8ed3338f52 (diff) |
selftests: bpf: test_progs: initialize duration in singal_pending test
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>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/testing/selftests/bpf/prog_tests/signal_pending.c | 2 |
1 files changed, 1 insertions, 1 deletions
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) | |||
12 | struct itimerval timeo = { | 12 | struct itimerval timeo = { |
13 | .it_value.tv_usec = 100000, /* 100ms */ | 13 | .it_value.tv_usec = 100000, /* 100ms */ |
14 | }; | 14 | }; |
15 | __u32 duration, retval; | 15 | __u32 duration = 0, retval; |
16 | int prog_fd; | 16 | int prog_fd; |
17 | int err; | 17 | int err; |
18 | int i; | 18 | int i; |