toolbox
toolbox copied to clipboard
Cannot run kunit tests
Describe the bug
Currentlly, it is not possible to run Kunit tests while doing kernel development inside toolbox.
This seems to be related to /dev/shm. Here is the output when trying to run the compiled um architecture kernel:
❯ ./.kunit/linux
Core dump limits :
soft - NONE
hard - NONE
Checking that ptrace can change system call numbers...OK
Checking syscall emulation for ptrace...OK
Checking environment variables for a tempdir...none found
Checking if /dev/shm is on tmpfs...OK
Checking PROT_EXEC mmap in /dev/shm...Operation not permitted
/dev/shm must be not mounted noexec
Steps how to reproduce the behaviour
- Clone Linux kernel
https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git - Build kunit tests:
./tools/testing/kunit/kunit.py config
./tools/testing/kunit/kunit.py exec
- Execute kernel executable:
./.kunit/linux
I am running the executable directly since that will show the error properly. Using kunit.py run will just show unhelpful error that KTAP output was missing.
Output of toolbox --version (v0.0.90+)
e.g., toolbox version 0.0.90
Toolbx package info (rpm -q toolbox)
toolbox version 0.0.99.6
Output of podman version
e.g.,
Client: Podman Engine
Version: 5.2.3
API Version: 5.2.3
Go Version: go1.22.7
Built: Tue Sep 24 05:30:00 2024
OS/Arch: linux/amd64
Podman package info (rpm -q podman)
podman-5.2.3-1.fc40.x86_64
Info about your OS
Fedora Sway Atomic 40