Some cleanups: - Remove unnecessary kfuncs declaration - Use _ns in the test name to run tests in a separate net namespace Signed-off-by: Amery Hung <ameryhung@xxxxxxxxx> --- tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c | 10 +--------- tools/testing/selftests/bpf/progs/bpf_qdisc_common.h | 6 ------ 2 files changed, 1 insertion(+), 15 deletions(-) diff --git a/tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c b/tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c index 8afaf71cfadd..2c10816c2d9e 100644 --- a/tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c +++ b/tools/testing/selftests/bpf/prog_tests/bpf_qdisc.c @@ -249,14 +249,8 @@ static void test_default_qdisc_attach_to_mq(void) bpf_qdisc_fifo__destroy(fifo_skel); } -void test_bpf_qdisc(void) +void test_ns_bpf_qdisc(void) { - struct netns_obj *netns; - - netns = netns_new("bpf_qdisc_ns", true); - if (!ASSERT_OK_PTR(netns, "netns_new")) - return; - if (test__start_subtest("fifo")) test_fifo(); if (test__start_subtest("fq")) @@ -267,8 +261,6 @@ void test_bpf_qdisc(void) test_qdisc_attach_to_non_root(); if (test__start_subtest("incompl_ops")) test_incompl_ops(); - - netns_free(netns); } void serial_test_bpf_qdisc_default(void) diff --git a/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h b/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h index 65a2c561c0bb..c495da1c43db 100644 --- a/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h +++ b/tools/testing/selftests/bpf/progs/bpf_qdisc_common.h @@ -12,12 +12,6 @@ #define private(name) SEC(".data." #name) __hidden __attribute__((aligned(8))) -u32 bpf_skb_get_hash(struct sk_buff *p) __ksym; -void bpf_kfree_skb(struct sk_buff *p) __ksym; -void bpf_qdisc_skb_drop(struct sk_buff *p, struct bpf_sk_buff_ptr *to_free) __ksym; -void bpf_qdisc_watchdog_schedule(struct Qdisc *sch, u64 expire, u64 delta_ns) __ksym; -void bpf_qdisc_bstats_update(struct Qdisc *sch, const struct sk_buff *skb) __ksym; - static struct qdisc_skb_cb *qdisc_skb_cb(const struct sk_buff *skb) { return (struct qdisc_skb_cb *)skb->cb; -- 2.47.1