BPF List
 help / color / mirror / Atom feed
From: Kui-Feng Lee <sinquersw@gmail.com>
To: Stanislav Fomichev <sdf@fomichev.me>,
	Kui-Feng Lee <thinker.li@gmail.com>
Cc: bpf@vger.kernel.org, ast@kernel.org, martin.lau@linux.dev,
	song@kernel.org, kernel-team@meta.com, andrii@kernel.org,
	geliang@kernel.org, kuifeng@meta.com
Subject: Re: [PATCH bpf-next v4 5/6] selftests/bpf: Monitor traffic for sockmap_listen.
Date: Thu, 1 Aug 2024 21:42:52 -0700	[thread overview]
Message-ID: <2e7a5a22-56bb-4afb-8b71-0232a075e9c6@gmail.com> (raw)
In-Reply-To: <Zqqn7oPuZJ7dobVU@mini-arch>



On 7/31/24 14:09, Stanislav Fomichev wrote:
> On 07/31, Kui-Feng Lee wrote:
>> Enable traffic monitor for each subtest of sockmap_listen.
>>
>> Signed-off-by: Kui-Feng Lee <thinker.li@gmail.com>
>> ---
>>   tools/testing/selftests/bpf/prog_tests/sockmap_listen.c | 9 +++++++++
>>   1 file changed, 9 insertions(+)
>>
>> diff --git a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
>> index 9ce0e0e0b7da..2030472fb8e8 100644
>> --- a/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
>> +++ b/tools/testing/selftests/bpf/prog_tests/sockmap_listen.c
>> @@ -1926,14 +1926,23 @@ static void test_udp_unix_redir(struct test_sockmap_listen *skel, struct bpf_map
>>   {
>>   	const char *family_name, *map_name;
>>   	char s[MAX_TEST_NAME];
>> +	struct netns_obj *netns;
>>   
>>   	family_name = family_str(family);
>>   	map_name = map_type_str(map);
>>   	snprintf(s, sizeof(s), "%s %s %s", map_name, family_name, __func__);
>>   	if (!test__start_subtest(s))
>>   		return;
>> +
>> +	netns = netns_new("test", true);
>> +	if (!ASSERT_OK_PTR(netns, "netns_new"))
>> +		return;
> 
> [..]
> 
>> +	system("ip link set lo up");
> 
> Let's do this in netns_new? We almost always want it in a new ns. The
> tests that don't need a loopback can do "lo down".
Agree!

  reply	other threads:[~2024-08-02  4:42 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-31 19:31 [PATCH bpf-next v4 0/6] monitor network traffic for flaky test cases Kui-Feng Lee
2024-07-31 19:31 ` [PATCH bpf-next v4 1/6] selftests/bpf: Add traffic monitor functions Kui-Feng Lee
2024-07-31 21:07   ` Stanislav Fomichev
2024-08-02  3:54     ` Kui-Feng Lee
2024-08-02  3:29   ` Martin KaFai Lau
2024-08-02  4:31     ` Kui-Feng Lee
2024-08-02 18:58       ` Martin KaFai Lau
2024-08-02 20:37         ` Kui-Feng Lee
2024-08-02 21:12           ` Martin KaFai Lau
2024-08-02  3:43   ` Martin KaFai Lau
2024-08-02  4:35     ` Kui-Feng Lee
2024-08-06 22:07       ` Kui-Feng Lee
2024-08-06 22:22         ` Martin KaFai Lau
2024-08-06 23:18           ` Kui-Feng Lee
2024-08-06 23:41             ` Martin KaFai Lau
2024-08-07  0:17               ` Kui-Feng Lee
2024-07-31 19:31 ` [PATCH bpf-next v4 2/6] selftests/bpf: Add the traffic monitor option to test_progs Kui-Feng Lee
2024-07-31 19:31 ` [PATCH bpf-next v4 3/6] selftests/bpf: netns_new() and netns_free() helpers Kui-Feng Lee
2024-07-31 21:02   ` Stanislav Fomichev
2024-08-02  4:42     ` Kui-Feng Lee
2024-07-31 19:31 ` [PATCH bpf-next v4 4/6] selftests/bpf: Monitor traffic for tc_redirect Kui-Feng Lee
2024-07-31 19:31 ` [PATCH bpf-next v4 5/6] selftests/bpf: Monitor traffic for sockmap_listen Kui-Feng Lee
2024-07-31 21:09   ` Stanislav Fomichev
2024-08-02  4:42     ` Kui-Feng Lee [this message]
2024-07-31 19:31 ` [PATCH bpf-next v4 6/6] selftests/bpf: Monitor traffic for select_reuseport Kui-Feng Lee

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=2e7a5a22-56bb-4afb-8b71-0232a075e9c6@gmail.com \
    --to=sinquersw@gmail.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=geliang@kernel.org \
    --cc=kernel-team@meta.com \
    --cc=kuifeng@meta.com \
    --cc=martin.lau@linux.dev \
    --cc=sdf@fomichev.me \
    --cc=song@kernel.org \
    --cc=thinker.li@gmail.com \
    /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