-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[prepare-rootfs] improve rootfs selection #84
Comments
I like this proposal, thanks for looking into it. |
chantra
added a commit
to chantra/kernel-patches-vmtest
that referenced
this issue
Jan 25, 2024
https://github.com/danobi/vmtest make it easy to run a VM with a given kernel and using the host rootfs (RO) and a shared directory (RW). This will help us with a couple of issue: - we don't have to maintain a rootfs anymore - when running the test, we do not need to perform a dance with libguestfs, which allows us to save time during test, and make it trivial to exchange files between the host and the guest. - we won't have anymore discrepency between the libraries used in the host and guest (like explained in libbpf/ci#84 and also libbpf/ci#103) This change migrates the test runs from using `prepare-rootfs` + `run-qemu` actions to using `run-vmtest` instead.
chantra
added a commit
to kernel-patches/vmtest
that referenced
this issue
Jan 26, 2024
https://github.com/danobi/vmtest make it easy to run a VM with a given kernel and using the host rootfs (RO) and a shared directory (RW). This will help us with a couple of issue: - we don't have to maintain a rootfs anymore - when running the test, we do not need to perform a dance with libguestfs, which allows us to save time during test, and make it trivial to exchange files between the host and the guest. - we won't have anymore discrepency between the libraries used in the host and guest (like explained in libbpf/ci#84 and also libbpf/ci#103) This change migrates the test runs from using `prepare-rootfs` + `run-qemu` actions to using `run-vmtest` instead.
Since #117 was landed and used in BPF CI, this should not be a problem anymore. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, we run tests in a Debian Bullseye rootfs. This works with our current CI runners (Ubuntu focal) but this is very brittle.
The way we do rootfs selection at the moment is pretty simple: https://github.com/libbpf/ci/blob/1b794627fd7431428a7e5a077010285733eaedf2/prepare-rootfs/run.sh#L223C26-L231
The rootfs have the distro release in their name, so we could possibly filter on this.
The script to generate rootfs uses debootstrap and should work with pretty much any Debian derivative.
We could generate a rootfs for common rootfs we care about, put them all in INDEX and when selecting the rootfs, try to match the hosts' distro, and fallback on a default one otherwise.
This should help with #83, and avoid issues like we had in the past (see comment in that PR).
Because currently libbpf/ci and vmtest in kernel tree differ, we would also need to update
https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git/tree/tools/testing/selftests/bpf/vmtest.sh?id=c1a3daf7363b48c6c4b86aee2efa2287f695f649#n106 with the change.
Given the current behaviour of that function, we may be able to get away with updating the index file and the test will just pick up whatever is latest alphabetically.
The text was updated successfully, but these errors were encountered: