There is a new Ubuntu-based builder, and setup steps for it are
slightly different from what we had on the old RHEL-based one.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
RHEL's podman sets /dev/kvm permissions to 0666, while Ubuntu's docker
sets them to 0660. Therefore, in order to use KVM from a container,
the user within must belong to the kvm group.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Given that the rootfs for Arch Linux uses the busybox variant of
mount(8), the `-l` doesn't exist on that binary and gives the following
error msg with version v1.34.1 of busybox when invoking
mkrootfs_arch.sh:
```
...
[ 0.781471] random: fast init done
starting pid 72, tty '': '/etc/init.d/rcS'
+ for path in /etc/rcS.d/S*
+ '[' -x /etc/rcS.d/S10-mount ']'
+ /etc/rcS.d/S10-mount
+ /bin/mount proc /proc -t proc
++ /bin/mount -l -t devtmpfs
/bin/mount: unrecognized option: l
...
```
This prevented me from generating a rootfs. This is fixed by removing
the `-l`, as plainly invoking `mount -t devtmpfs` returns the same
output with `mount -l ...` on the non-busybox variant (on Arch Linux, it
comes from the `utils-linux` package). After this change, I was able to
run `./tools/testing/selftests/bpf/vmtest.sh -i` (from the kernel src;
with modification to the script to pick up my locally-generated .zstd of
the new rootfs) and it worked.
Signed-off-by: Chris Tarazi <tarazichris@gmail.com>
The condition for the test is incorrect, we want to add a default exit
status if the file is empty. But [[ -s file ]] returns true if the file
exists and has a size greater than zero. Let's reverse the condition.
Fixes: 385b2d1738 ("ci: change VM's /exitstatus format to prepare it for several results")
Signed-off-by: Quentin Monnet <quentin@isovalent.com>
legacy_printk selftests is specially designed to be runnable on old
kernels and validate libbpf's bpf_trace_printk-related macros. Run them
in CI.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Move commands to existing sections, or add markers for new sections when
no surrounding existing section is relevant. This is to avoid having
logs outside of subsection for the “vmtest” step of the GitHub action.
Two changes come with this patch:
- Test groups report their exit status individually for the final
summary, by appending it to /exitstatus in the VM. “Test groups” are
test_maps, test_verifier, test_progs, and test_progs-no_alu32.
- For these separate reports to make sense, allow the CI action to carry
on even after one of the groups fails, by adding "&& true" to the
commands in order to neutralise the effect of the "set -e".
We recently introduced a summary for the results of the different groups
of tests for the CI, displayed after the machine is shut down. There are
currently two groups, "bpftool" and "vm_tests". We want to split the
latter into different subgroups. For that, we will make each group of
tests that runs in the VM print its exit status to the /exitstatus file.
In preparation for this, let's update the format of this /exitstatus
file. Instead of containing just an integer, it now contains a line with
a group name, a colon, and the integer result. This is easy enough to
parse on the other end.
We also drop the associative array, and iterate on /exitstatus instead
to produce the summary: this way, the order of the checks is preserved.
The bpftool checks work as expected when the CI runs, except that they
do not set any error status code for the script on error, which means
that the failures are lost among the logs and not reported in a clear
way to the reviewers.
This commit aims at fixing the issue. We could simply exit with a
non-zero error status when the bpftool checks, but that would prevent
the other tests from running. Instead, we propose to store the result of
the bpftool checks in a bash array. This array can later be reused to
print a summary of the different groups of tests, at the end of the CI
run, to help the reviewers understand where the failure happened without
having to manually unfold all the sections on the GitHub interface.
Currently, there are only two groups: the bpftool checks and the "VM
tests". The latter may later be split into test_maps, test_progs,
test_progs-no_alu32, etc. by teaching each of them to append their exit
status code to the "exitstatus" file.
Fixes: 88649fe655 ("ci: run script to test bpftool types/options sync")
For displaying a coloured title for the shutdown section in the logs,
instead of having the colour control codes directly written in run.sh,
we can pass the section title as an argument to "travis_fold()" and have
it format and print it for us.
This is cleaner, and slightly more in-line with what we do in the CI
files of the vmtest repository.
Run it on the self-hosted builder with tag "z15".
Also add the infrastructure code for the self-hosted builder.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Running vmtest inside a container removes the ability to use certain
root powers, among other things - mounting arbitrary images. Use
libguestfs in order to avoid having to mount anything.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
A lot of tests in test_progs fail due to the missing trampoline
implementation on s390x (and a handful for other reasons). Yet, a lot
more pass, so disabling test_progs altogether is too heavy-handed.
So add a mechanism for arch-specific blacklists (as discussed in [1])
and introduce a s390x blacklist, that simply reflects the status quo.
[1] https://github.com/libbpf/libbpf/pull/204#discussion_r601768628
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
We need a different binary and console. Also use a fixed number of
cores in order to avoid OOM in case a builder has too many of them.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Select the current config based on $ARCH value and thus rename
the existing config to config-latest.$ARCH.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
The existing mkrootfs.sh is based on Arch Linux, which supports only
x86_64.
Add mkrootfs_debian.sh: a debootstrap-based script. Debian was chosen,
because it supports more architectures than other mainstream distros.
Move init setup to mkrootfs_tweak.sh, rename the existing Arch script
to mkrootfs_arch.sh.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
There is no python-docutils on Debian Bullseye, but python3-docutils
exists everywhere. Since Python 2 is EOL anyway, use the Python 3
version.
Signed-off-by: Ilya Leoshkevich <iii@linux.ibm.com>
Doing substring matches allows accidental new tests to be enabled,
when they are not supposed to be. E.g., whitelisting "xdp" allows new
"xdpwall" test on 5.5.0, which wasn't supposed to happen.
Cc: Yucong Sun <fallentree@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
There is a problem in bpf-next tree which causes get_stack_raw_tp and
few other selftests to produce tons of kernel warnings, timing out and
failing CI test runs. Blacklist until bpf tree, which has a fix, is
merged into bpf-next.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Use this list of enabled tests as a whitelist, so that we don't have to
keep updating BLACKLIST-5.5.0 anymore. I'll keep BLACKLIST-5.5.0 for
now, because it serves as a nice historic log of which tests depend on
which kernels.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
When new eBPF program, map, or attach types are added to the kernel,
bpftool needs to be updated in order to support the related features.
These updates should add the new types to the code itself, but also to
the help messages, documentation, and bash completion. Given that it is
easy to omit one of those, a script has been created to attempt to
validate that all parts have been consistently updated.
This new script for bpftool is hosted in the kernel repository, amongst
the BPF selftests. But it is not called from the Makefile, and not run
along with the other selftests. If it was, all patches updating the BPF
UAPI would require the relevant changes in bpftool at the same time, _in
the same patches_, which is not desirable.
To ensure that bpftool's parts remain in sync, let's run this script
from the CI. This patch adds a new section to the run.sh script, focused
on bpftool, and calling the new test_bpftool_synctypes.py.
Only keep stderr output in case of errors for kernel and selftests builds.
Having a multi-thousand-line output isn't useful and slows down Github
Actions' log view UI.
Also quiet down wget's "progress bar" output. While at the same time see some
totals from tar, just for the fun of it.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
github action grouping is broken because we were outputing "::endgroup" where
it needs "::endgroup::". This patch also added some addtional grouping around
contianer setup phase, making output easier to read.
Backport kernel-patches fix for the same issue ([0] and [1]).
[0] 17c596fe8b
[1] a38de685c7
Cc: Sergei Iudin <siudin@fb.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Add few new selftests to blacklist. They can't succeed on 5.5.
Also temporarily remove btf_dump for 4.9 due to newly added data dumping
subtests.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Temporary disable tc_bpf tests that seem to have regressed.
Temporary and artificially bump pahole version from 1.21 to 1.22 to get
per-CPU BTF data built.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
We used to have it disabled for GCC8, but now GCC10 is false-report same
warnings, so disable stringop-truncation warnigs for GCC10 as well.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
This is necessary to make runqslower compile with task->__state field on old
kernels, for which we don't have an actual vmlinux.h.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>