Skip to content

Commit 69f4094

Browse files
guidosarduccianakryiko
authored andcommitted
selftests/bpf: Drop unneeded error.h includes
The addition of general support for unprivileged tests in test_loader.c breaks building test_verifier on non-glibc (e.g. musl) systems, due to the inclusion of glibc extension '<error.h>' in 'unpriv_helpers.c'. However, the header is actually not needed, so remove it to restore building. Similarly for sk_lookup.c and flow_dissector.c, error.h is not necessary and causes problems, so drop them. Fixes: 1d56ade ("selftests/bpf: Unprivileged tests for test_loader.c") Fixes: 0ab5539 ("selftests/bpf: Tests for BPF_SK_LOOKUP attach point") Fixes: 0905bee ("selftests/bpf: run flow dissector tests in skb-less mode") Signed-off-by: Tony Ambardar <[email protected]> Signed-off-by: Andrii Nakryiko <[email protected]> Link: https://lore.kernel.org/bpf/5664367edf5fea4f3f4b4aec3b182bcfc6edff9c.1721713597.git.tony.ambardar@gmail.com
1 parent 7b10f0c commit 69f4094

File tree

3 files changed

+0
-3
lines changed

3 files changed

+0
-3
lines changed

tools/testing/selftests/bpf/prog_tests/flow_dissector.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
// SPDX-License-Identifier: GPL-2.0
22
#include <test_progs.h>
33
#include <network_helpers.h>
4-
#include <error.h>
54
#include <linux/if_tun.h>
65
#include <sys/uio.h>
76

tools/testing/selftests/bpf/prog_tests/sk_lookup.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818
#include <arpa/inet.h>
1919
#include <assert.h>
2020
#include <errno.h>
21-
#include <error.h>
2221
#include <fcntl.h>
2322
#include <sched.h>
2423
#include <stdio.h>

tools/testing/selftests/bpf/unpriv_helpers.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
#include <stdbool.h>
44
#include <stdlib.h>
5-
#include <error.h>
65
#include <stdio.h>
76
#include <string.h>
87
#include <unistd.h>

0 commit comments

Comments
 (0)