From: Matthieu Baerts <matttbe@kernel.org>
To: Geliang Tang <geliang@kernel.org>, mptcp@lists.linux.dev
Subject: Re: [PATCH virtme-docker v5] tests: add bpftests support
Date: Tue, 13 Feb 2024 19:20:27 +0100 [thread overview]
Message-ID: <bf06eee5-ebb4-4e56-b00e-5397642cdf15@kernel.org> (raw)
In-Reply-To: <c8d9aacfe97acd74c369496a573ea64070485382.1707729702.git.geliang@kernel.org>
Hi Geliang,
On 12/02/2024 10:24, Geliang Tang wrote:
> This patch builds bpf tests after building other mptcp selftests in btf
> mode:
>
> cd tools/testing/selftests/bpf && make
>
> And add run_bpftest_all to run bpftests:
>
> ./test_progs -t mptcp
> ./test_progs-no_alu32 -t mptcp
>
> Now mptcp bpf selftests can be tested in this way:
>
> docker run ... auto-btf
> run_loop run_bpftest_all in .virtme-exec-run
>
> Disable IA32_EMULATION config to fix this error:
>
> ./include/linux/if.h:28:10: fatal
> error: sys/socket.h: no such file or directory
Thank you for this patch! It's good we finally have an easy way to
validate these tests! v5 looks better without the mptcp_progs.sh script!
I just managed to find some time to test it and include it in the repo.
I had to modify a bit where the test_progs are located:
https://github.com/multipath-tcp/mptcp-upstream-virtme-docker/commit/2051f42
I guess on your side, you had an "old" test_progs in the source file,
instead of using the one from .virtme/build.
What's a bit annoying, is that all built files from BPF selftests are in
the root dir of the build dir, in the middle of all kernel built files.
I tried to change that by changing "O=" this in build_bpftests():
mkdir -p "${VIRTME_BPFTESTS_DIR}"
_make O="${VIRTME_BPFTESTS_DIR}" prepare
_make O="${VIRTME_BPFTESTS_DIR}" -C "${BPFTESTS_DIR}"
where:
VIRTME_BPFTESTS_DIR="${VIRTME_BUILD_DIR}/${BPFTESTS_DIR}"
(I don't think KHDR_INCLUDES is needed, I didn't check)
But I had issues with bpf_testmod we don't need :-/
I tried by setting KDIR="${VIRTME_BUILD_DIR}" but it didn't help.
If you see a way to use another build dir that is specific to the bpf
tests, that would be cleaner, I think.
> Closes: https://github.com/multipath-tcp/mptcp_net-next/issues/406
Before really closing it, I will look at modifying the .yml files used
by the CI to have a new job validating only the BPF tests.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
prev parent reply other threads:[~2024-02-13 18:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-12 9:24 [PATCH virtme-docker v5] tests: add bpftests support Geliang Tang
2024-02-13 18:20 ` Matthieu Baerts [this message]
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=bf06eee5-ebb4-4e56-b00e-5397642cdf15@kernel.org \
--to=matttbe@kernel.org \
--cc=geliang@kernel.org \
--cc=mptcp@lists.linux.dev \
/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