From: Joanne Koong <joannekoong@fb.com>
To: <bpf@vger.kernel.org>
Cc: <kafai@fb.com>, <netdev@vger.kernel.org>, <Kernel-team@fb.com>,
Joanne Koong <joannekoong@fb.com>
Subject: [PATCH bpf-next v1 2/3] bpf/selftests: Rename test_tcp_hdr_options to test_sockops_tcp_hdr_options
Date: Fri, 1 Oct 2021 14:58:57 -0700 [thread overview]
Message-ID: <20211001215858.1132715-3-joannekoong@fb.com> (raw)
In-Reply-To: <20211001215858.1132715-1-joannekoong@fb.com>
Currently, tcp_hdr_options is only supported for sockops type programs.
This patchset adds xdp tcp_hdr_options support. To more easily
differentiate between these two tests, this patch does the following
renames (with no functional changes):
test_tcp_hdr_options -> test_sockops_tcp_hdr_options
test_misc_tcp_hdr_options -> test_sockops_misc_tcp_hdr_options
The next patch will add xdp_test_tcp_hdr_options.
Signed-off-by: Joanne Koong <joannekoong@fb.com>
---
...hdr_options.c => sockops_tcp_hdr_options.c} | 18 +++++++++---------
...s.c => test_sockops_misc_tcp_hdr_options.c} | 0
...ptions.c => test_sockops_tcp_hdr_options.c} | 0
3 files changed, 9 insertions(+), 9 deletions(-)
rename tools/testing/selftests/bpf/prog_tests/{tcp_hdr_options.c => sockops_tcp_hdr_options.c} (96%)
rename tools/testing/selftests/bpf/progs/{test_misc_tcp_hdr_options.c => test_sockops_misc_tcp_hdr_options.c} (100%)
rename tools/testing/selftests/bpf/progs/{test_tcp_hdr_options.c => test_sockops_tcp_hdr_options.c} (100%)
diff --git a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c b/tools/testing/selftests/bpf/prog_tests/sockops_tcp_hdr_options.c
similarity index 96%
rename from tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
rename to tools/testing/selftests/bpf/prog_tests/sockops_tcp_hdr_options.c
index 1fa772079967..f8fb12f4c1ed 100644
--- a/tools/testing/selftests/bpf/prog_tests/tcp_hdr_options.c
+++ b/tools/testing/selftests/bpf/prog_tests/sockops_tcp_hdr_options.c
@@ -12,8 +12,8 @@
#include "cgroup_helpers.h"
#include "network_helpers.h"
#include "test_tcp_hdr_options.h"
-#include "test_tcp_hdr_options.skel.h"
-#include "test_misc_tcp_hdr_options.skel.h"
+#include "test_sockops_tcp_hdr_options.skel.h"
+#include "test_sockops_misc_tcp_hdr_options.skel.h"
#define LO_ADDR6 "::1"
#define CG_NAME "/tcpbpf-hdr-opt-test"
@@ -25,8 +25,8 @@ static struct bpf_test_option exp_active_fin_in;
static struct hdr_stg exp_passive_hdr_stg;
static struct hdr_stg exp_active_hdr_stg = { .active = true, };
-static struct test_misc_tcp_hdr_options *misc_skel;
-static struct test_tcp_hdr_options *skel;
+static struct test_sockops_misc_tcp_hdr_options *misc_skel;
+static struct test_sockops_tcp_hdr_options *skel;
static int lport_linum_map_fd;
static int hdr_stg_map_fd;
static __u32 duration;
@@ -570,15 +570,15 @@ static struct test tests[] = {
DEF_TEST(misc),
};
-void test_tcp_hdr_options(void)
+void test_sockops_tcp_hdr_options(void)
{
int i;
- skel = test_tcp_hdr_options__open_and_load();
+ skel = test_sockops_tcp_hdr_options__open_and_load();
if (CHECK(!skel, "open and load skel", "failed"))
return;
- misc_skel = test_misc_tcp_hdr_options__open_and_load();
+ misc_skel = test_sockops_misc_tcp_hdr_options__open_and_load();
if (CHECK(!misc_skel, "open and load misc test skel", "failed"))
goto skel_destroy;
@@ -600,6 +600,6 @@ void test_tcp_hdr_options(void)
close(cg_fd);
skel_destroy:
- test_misc_tcp_hdr_options__destroy(misc_skel);
- test_tcp_hdr_options__destroy(skel);
+ test_sockops_misc_tcp_hdr_options__destroy(misc_skel);
+ test_sockops_tcp_hdr_options__destroy(skel);
}
diff --git a/tools/testing/selftests/bpf/progs/test_misc_tcp_hdr_options.c b/tools/testing/selftests/bpf/progs/test_sockops_misc_tcp_hdr_options.c
similarity index 100%
rename from tools/testing/selftests/bpf/progs/test_misc_tcp_hdr_options.c
rename to tools/testing/selftests/bpf/progs/test_sockops_misc_tcp_hdr_options.c
diff --git a/tools/testing/selftests/bpf/progs/test_tcp_hdr_options.c b/tools/testing/selftests/bpf/progs/test_sockops_tcp_hdr_options.c
similarity index 100%
rename from tools/testing/selftests/bpf/progs/test_tcp_hdr_options.c
rename to tools/testing/selftests/bpf/progs/test_sockops_tcp_hdr_options.c
--
2.30.2
next prev parent reply other threads:[~2021-10-01 22:03 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 21:58 [PATCH bpf-next v1 0/3] Add XDP support for bpf_load_hdr_opt Joanne Koong
2021-10-01 21:58 ` [PATCH bpf-next v1 1/3] bpf/xdp: Add bpf_load_hdr_opt support for xdp Joanne Koong
2021-10-01 22:47 ` Song Liu
2021-10-01 23:01 ` Jakub Kicinski
2021-10-01 21:58 ` Joanne Koong [this message]
2021-10-01 22:54 ` [PATCH bpf-next v1 2/3] bpf/selftests: Rename test_tcp_hdr_options to test_sockops_tcp_hdr_options Song Liu
2021-10-01 21:58 ` [PATCH bpf-next v1 3/3] bpf/selftests: Add xdp bpf_load_tcp_hdr_options tests Joanne Koong
2021-10-01 23:13 ` Song Liu
2021-10-01 23:40 ` Andrii Nakryiko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211001215858.1132715-3-joannekoong@fb.com \
--to=joannekoong@fb.com \
--cc=Kernel-team@fb.com \
--cc=bpf@vger.kernel.org \
--cc=kafai@fb.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).