[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <30b2a441-9772-1662-ca03-13bfa0b37d46@iogearbox.net>
Date: Tue, 29 Sep 2020 10:50:57 +0200
From: Daniel Borkmann <daniel@...earbox.net>
To: Alan Maguire <alan.maguire@...cle.com>, ast@...nel.org,
andriin@...com, yhs@...com
Cc: linux@...musvillemoes.dk, andriy.shevchenko@...ux.intel.com,
pmladek@...e.com, kafai@...com, songliubraving@...com,
john.fastabend@...il.com, kpsingh@...omium.org, shuah@...nel.org,
rdna@...com, scott.branden@...adcom.com, quentin@...valent.com,
cneirabustos@...il.com, jakub@...udflare.com, mingo@...hat.com,
rostedt@...dmis.org, acme@...nel.org, bpf@...r.kernel.org,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH v7 bpf-next 4/8] selftests/bpf: add bpf_snprintf_btf
helper tests
On 9/28/20 1:31 PM, Alan Maguire wrote:
> Tests verifying snprintf()ing of various data structures,
> flags combinations using a tp_btf program. Tests are skipped
> if __builtin_btf_type_id is not available to retrieve BTF
> type ids.
>
> Signed-off-by: Alan Maguire <alan.maguire@...cle.com>
[...]
> +void test_snprintf_btf(void)
> +{
> + struct netif_receive_skb *skel;
> + struct netif_receive_skb__bss *bss;
> + int err, duration = 0;
> +
> + skel = netif_receive_skb__open();
> + if (CHECK(!skel, "skel_open", "failed to open skeleton\n"))
> + return;
> +
> + err = netif_receive_skb__load(skel);
> + if (CHECK(err, "skel_load", "failed to load skeleton: %d\n", err))
> + goto cleanup;
> +
> + bss = skel->bss;
> +
> + err = netif_receive_skb__attach(skel);
> + if (CHECK(err, "skel_attach", "skeleton attach failed: %d\n", err))
> + goto cleanup;
> +
> + /* generate receive event */
> + system("ping -c 1 127.0.0.1 > /dev/null");
This generates the following new warning when compiling BPF selftests:
[...]
EXT-OBJ [test_progs] cgroup_helpers.o
EXT-OBJ [test_progs] trace_helpers.o
EXT-OBJ [test_progs] network_helpers.o
EXT-OBJ [test_progs] testing_helpers.o
TEST-OBJ [test_progs] snprintf_btf.test.o
/root/bpf-next/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c: In function ‘test_snprintf_btf’:
/root/bpf-next/tools/testing/selftests/bpf/prog_tests/snprintf_btf.c:30:2: warning: ignoring return value of ‘system’, declared with attribute warn_unused_result [-Wunused-result]
system("ping -c 1 127.0.0.1 > /dev/null");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[...]
Please fix, thx!
Powered by blists - more mailing lists