[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <fa0b7986-27d2-47f7-ba1e-1d8075e5c35d@bootlin.com>
Date: Thu, 1 Aug 2024 12:12:55 +0200
From: Alexis Lothoré <alexis.lothore@...tlin.com>
To: Alan Maguire <alan.maguire@...cle.com>,
Alexei Starovoitov <ast@...nel.org>, Daniel Borkmann <daniel@...earbox.net>,
Andrii Nakryiko <andrii@...nel.org>, Martin KaFai Lau
<martin.lau@...ux.dev>, Eduard Zingerman <eddyz87@...il.com>,
Song Liu <song@...nel.org>, Yonghong Song <yonghong.song@...ux.dev>,
John Fastabend <john.fastabend@...il.com>, KP Singh <kpsingh@...nel.org>,
Stanislav Fomichev <sdf@...ichev.me>, Hao Luo <haoluo@...gle.com>,
Jiri Olsa <jolsa@...nel.org>, Mykola Lysenko <mykolal@...com>,
Shuah Khan <shuah@...nel.org>
Cc: ebpf@...uxfoundation.org, Thomas Petazzoni
<thomas.petazzoni@...tlin.com>, linux-kernel@...r.kernel.org,
bpf@...r.kernel.org, linux-kselftest@...r.kernel.org
Subject: Re: [PATCH bpf-next 4/4] selftests/bpf: convert
test_skb_cgroup_id_user to test_progs
On 8/1/24 10:49, Alan Maguire wrote:
> On 31/07/2024 11:38, Alexis Lothoré (eBPF Foundation) wrote:
[...]
>> +static int wait_local_ip(void)
>> +{
>> + char *ping_cmd = ping_command(AF_INET6);
>> + int i, err;
>> +
>> + for (i = 0; i < WAIT_AUTO_IP_MAX_ATTEMPT; i++) {
>> + err = SYS_NOFAIL("%s -c 1 -W 1 %s%%%s", ping_cmd, DST_ADDR,
>> + VETH_1);
>> + if (!err)
>> + break;
>> + }
>
>
> thinking about the risks of CI flakiness, would a small sleep between
> checks be worth doing here?
I assumed that adding -W 1 (ping timeout duration) to the command would be
enough to make sure that there is a proper wait between each attempt (so
currently, waiting at most 10s for network configuration between the 2 veths).
Don't you think it is enough to prevent issues in CI ?
>> +
[...]
>> +
>> + expected_ids[0] = get_cgroup_id("/.."); /* root cgroup */
>> + expected_ids[1] = get_cgroup_id("");
>> + expected_ids[2] = get_cgroup_id(CGROUP_PATH);
>> + expected_ids[3] = 0; /* non-existent cgroup */
>> +
>> + for (level = 0; level < NUM_CGROUP_LEVELS; level++) {
>> + err = bpf_map__lookup_elem(t->skel->maps.cgroup_ids, &level,
>> + sizeof(level), &actual_ids[level],
>> + sizeof(__u64), 0);
>
> could probably simplify this + the BPF prog using a global array of
> actual_ids[], then compare it to the expected values using
> skel->bss->actual_ids
ACK, I'll update this.
Thanks,
Alexis
--
Alexis Lothoré, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists