| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Due to the way the kernel-selftest sources are set up, the toplevel
Makefile does not work and `make clean` will always result in a "The
source tree is not clean, please run 'make ARCH=... mrproper'" error.
Avoid running it by setting CLEANBROKEN = "1", so rebuilding the recipe
without a clean (which often happens when the kernel has changed) does
not fail.
Signed-off-by: Nora Schiffer <nora.schiffer@ew.tq-group.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add generic kernel self-tests that build cleanly with mainline
kernel (6.18+), work on all architectures, and either PASS or SKIP
gracefully at runtime.
Tests added:
- acct: BSD process accounting
- breakpoints: hardware breakpoint handling
- cachestat: page cache statistics (cachestat syscall)
- cgroup: control group v1 interface
- clone3: clone3 syscall with flags
- core: syscalls like close_range, unshare
- coredump: core dump generation
- dmabuf-heaps: DMA-BUF heap allocator
- efivarfs: EFI variable filesystem
- filelock: POSIX file locking (OFD locks)
- filesystems: basic filesystem operations
- filesystems/binderfs: Android Binder IPC (skips if CONFIG_ANDROID_BINDERFS=n)
- filesystems/epoll: epoll syscall extensions
- fpu: floating-point unit state
- ftrace: function tracer interface
- futex: fast userspace mutex
- gpio: general purpose I/O
- ipc: System V IPC primitives
- kcmp: compare kernel resource identifiers
- kvm: kernel-based virtual machine
- landlock: LSM sandboxing (skips if CONFIG_SECURITY_LANDLOCK=n)
- locking: ww_mutex deadlock avoidance
- lsm: Linux Security Module interface
- membarrier: memory barrier syscalls
- mincore: mincore syscall (page residency)
- mount: mount syscall (unprivileged variants)
- mount_setattr: mount attribute syscall
- move_mount_set_group: move_mount peer group
- mseal_system_mappings: system mapping sealing
- namespaces: PID/UTS/IPC/mount/network namespaces
- net: networking stack
- net/mptcp: multipath TCP
- pidfd: pidfd-based process management
- pid_namespace: PID namespace limits
- proc: /proc filesystem interface
- ptrace: process tracing
- rlimits: resource limits
- rseq: restartable sequences
- sched: scheduler and real-time classes
- seccomp: secure computing mode
- signal: signal handling
- size: ELF size utilities
- splice: zero-copy data transfers
- sync: cache synchronization
- syscall_user_dispatch: user-space syscall dispatch
- sysctl: sysctl interface
- tc-testing: traffic control
- timens: time namespaces
- tmpfs: tmpfs filesystem
- tpm2: Trusted Platform Module 2.0
- tty: TTY layer
- uevent: kernel uevent subsystem
- user_events: tracepoint user interface
- vDSO: virtual dynamic shared object
- watchdog: hardware watchdog timer
- zram: compressed RAM block device
Tested on aarch64 device BeaglePlay(AM6254 SoC):
- Tests either PASS or SKIP gracefully
Depends-on: kernel-selftest: add libcap to build and runtime dependencies
Signed-off-by: Telukula Jeevan Kumar Sahu <j-sahu@ti.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
libcap is needed unconditionally for capability-aware tests such as
breakpoints, cgroup, clone3, futex, ptrace, and seccomp. Add it to
DEPENDS so it is always available at build time and to RDEPENDS so the
installed tests can call cap_get_proc() and friends at runtime.
bash and libgcc are also added to RDEPENDS: bash is required by several
test shell scripts, and libgcc provides libgcc_s.so needed by tests
that use GCC-emitted unwinding stubs.
Signed-off-by: Telukula Jeevan Kumar Sahu <j-sahu@ti.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Some headers come from 'mm' (in the top source directory, i.e. the root of
Linux's sources), as in the exampels below:
Makefile:LOCAL_HDRS += $(selfdir)/mm/local_config.h $(top_srcdir)/mm/gup_test.h
cow.c:#include "../../../../mm/gup_test.h"
gup_longterm.c:#include "../../../../mm/gup_test.h"
gup_test.c:#include <mm/gup_test.h>
hmm-tests.c:#include <mm/gup_test.h>
uffd-unit-tests.c:#include "../../../../mm/gup_test.h"
Add this directory to KERNEL_SELFTEST_SRC if 'mm' PACKAGECONFIG is enabled.
Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add numa (numactl), as required by rmap, migration, and others.
Add liburing, otherwise some tests would be disabled.
Moreover, liburing's availability is checked in a shell script executed
prior to the compilation of the individual test cases. This script,
however, does not read CFLAGS.
Backport a fix [1] from mainline to address this issue.
[1] https://github.com/torvalds/linux/commit/7f532d19c8be76ad2fcd7ab6b0c9eb618f70966b
Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The support of libhugetlbfs was removed from mainline Linux a while ago,
since v6.1 [1].
Since libhugetlbfs was the main reason to remove 'mm' selftests for some
specific architectures, the respective operations should only remove bpf.
Update the recipe to remove libhugetlbfs as a dependency of mm, and thus
unblock this test category for some targets.
[1] https://github.com/torvalds/linux/commit/6f83d6c74ea5a5b267be85206822da280cae110a
Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Since v6.10 [1], this category of selftests was renamed
to 'mm'.
Update the recipe accordingly.
I left a mention to the previous name (i.e., 'vm') just in case.
[1]: https://github.com/torvalds/linux/commit/baa489fabd01596d5426d6e112b34ba5fb59ab82
Signed-off-by: João Marcos Costa <joaomarcos.costa@bootlin.com>
Signed-off-by: Khem Raj <khem.raj@oss.qualcomm.com>
|
| |
|
|
|
|
|
|
| |
Add cpufreq and cpu-hotplug tests to kernel-selftest.
Tested with pixel6.
Signed-off-by: Tudor Ambarus <tudor.ambarus@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
Some toolchains ship only bits/*.h without the -64.h suffix,
causing the recipe to fail. Add a fallback to use *.h if
*-64.h is not found, and warn if neither exists.
Signed-off-by: Nylon Chen <nylon.chen@sifive.com>
Signed-off-by: Joao Marcos Costa <joaomarcos.costa@bootlin.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The PTP selftest fails to compile with kernel versions 6.7+ due to
missing header definitions for PTP_MASK_CLEAR_ALL and PTP_MASK_EN_SINGLE.
These definitions were introduced in kernel v6.7 with commit c5a445b.
This fix adds kernel headers to CFLAGS during compilation to ensure
the required definitions are available.
Error before fix:
testptp.c:613:31: error: 'PTP_MASK_CLEAR_ALL' undeclared
testptp.c:615:38: error: 'PTP_MASK_EN_SINGLE' undeclared
Fixes: #878
Signed-off-by: Jacob Panov <jacobpanov@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
| |
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Please see
https://git.yoctoproject.org/poky/commit/?id=4dd321f8b83afecd962393101b2a6861275b5265
for what changes are needed, and sed commands that can be used to make them en masse.
I've verified that bitbake -c patch world works with these, but did not run a world
build; the majority of recipes shouldn't need further fixups, but if there are
some that still fall out, they can be fixed in followups.
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
| |
Avoid following warning by using a dedicated unpack directory for sources.
WARNING: kernel-selftest-1.0-r0 do_unpack: kernel-selftest: the directory ${WORKDIR}/${BP} (/home/kraj200/yoe/build/tmp/work/qemux86_64-yoe-linux/kernel-self test/1.0/kernel-selftest-1.0) pointed to by the S variable doesn't exist - please set S within the recipe to point to where the source has been unpacked to
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
| |
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In testing adding in more kernel-selftests there were a number of issues
that arose that require changes that are more appropriate for the main
recipe and not a bbappend.
1) Stop looping over TEST_LIST ourselves and use the TARGETS="" provided
by the kernel-sefltest Makefiles. This correctly sets up various
variables that the selftest Makefiles all need. Also, do_install
becomes cleaner because the main Makefile already installs the list of
tests and the top level script.
2) Add DEBUG_PREFIX_MAP to the CC setting to avoid some "buildpaths" QA
errors.
3) Add two INSANE_SKIPS for "already-stripped" and "ldflags". Some of
the selftest Makefiles are adding flags to their compiles that basically
break the above checks. Since these compiles are not really meant as
user level tools and instead testing, it should be ok to just always set
INSANE_SKIP for these two.
Signed-off-by: Ryan Eatmon <reatmon@ti.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
| |
Fix warning where S is expected to exist before do_configure
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
| |
Replace references of WORKDIR with UNPACKDIR where it makes sense to do
so in preparation for changing the default value of UNPACKDIR.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
| |
Because there is no longer the error.
Signed-off-by: Thomas Perrot <thomas.perrot@bootlin.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
This commit will build and install following testcases under /usr/kernel-selftest of filesystem,
* ptp
* timers
Signed-off-by: Chirag Shilwant <c-shilwant@ti.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
scripts/Makefile.extrawarn
6.6+ kernel has the warning options moved to dedicated include file
under scripts called Makefile.extrawarn, therefore search for this
file as well to remove this unrecognized option by clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
| |
Enable bpf only with clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
| |
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
Fix run-ptest script to run all compiled selftests
disable bpf on riscv for now
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
| |
This fixes build failure with kernel 6.5
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
There is new patch-status QA check in oe-core:
https://git.openembedded.org/openembedded-core/commit/?id=76a685bfcf927593eac67157762a53259089ea8a
This is temporary work around just to hide _many_ warnings from
optional patch-status (if you add it to WARN_QA).
This just added
Upstream-Status: Pending
everywhere without actually investigating what's the proper status.
This is just to hide current QA warnings and to catch new .patch files being
added without Upstream-Status, but the number of Pending patches is now terrible:
5 (26%) meta-xfce
6 (50%) meta-perl
15 (42%) meta-webserver
21 (36%) meta-gnome
25 (57%) meta-filesystems
26 (43%) meta-initramfs
45 (45%) meta-python
47 (55%) meta-multimedia
312 (63%) meta-networking
756 (61%) meta-oe
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
| |
Install kselftest runner and the required kselftest-list.txt.
Signed-off-by: Chase Qi <chase.qi@linaro.org>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
| |
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
This is the result of automated script (0.9.1) conversion:
oe-core/scripts/contrib/convert-overrides.py .
converting the metadata to use ":" as the override character instead of "_".
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
It uses __morecore internal function from glibc which has been removed
in 2.34+ and replacing it is not so simple and upstream needs to fix it
see [1]
[1] https://github.com/libhugetlbfs/libhugetlbfs/issues/52
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
| |
with 5.10 it builds bpf-bootstrap tool and then tries to run it as well
which wont work in cross builds. Disable it until it can be make cross
compile friendly.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
| |
it now needs libhugetlbfs which is not ported to riscv yet
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
Include lib and kernel subdirs as vm tests need headers from it in 5.8+
(test_hmm_uapi.h) see [1]
It now uses tests which are not compatible on arm starting with 5.8+
[1] https://lkml.org/lkml/2020/4/22/1654
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
| |
Fixes
| hmm-tests.c:24:10: fatal error: hugetlbfs.h: No such file or directory
| 24 | #include <hugetlbfs.h>
| | ^~~~~~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
| |
This ensures that generated code is properly cross compiled
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
| |
Only emit warning on clang if bpf is actually in PACKAGECONFIG.
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
| |
Add firmware tests to kernel-selftest.
Signed-off-by: Scott Branden <scott.branden@broadcom.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
5.4 kernel exposes a problem, where its using host includes to compile
BPF tests and it fails for mips because ptrace.h is quite different so
it can not find the needed pt_struct definitions during cross compile
% clang -fno-stack-protector -I. -I./include/uapi -I../../../include/uapi -I/mnt/b/yoe/build/tmp/work/qemumips-yoe-linux/kernel-selft
est/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf/../usr/include -D__TARGET_ARCH_mips -g -idirafter /mnt/b/yoe/build/tmp/wor
k/qemumips-yoe-linux/kernel-selftest/1.0-r0/recipe-sysroot-native/usr/lib/clang/10.0.0/include -Wno-compare-distinct-pointer-types -O2 -target bpf -emit-llvm \
-c progs/loop1.c
progs/loop1.c:21:9: error: no member named 'regs' in 'struct pt_regs'
m = PT_REGS_RC(ctx);
^~~~~~~~~~~~~~~
./bpf_helpers.h:466:29: note: expanded from macro 'PT_REGS_RC'
~~ ^ 1 error generated.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
| |
Signed-off-by: Andrei Gherzan <andrei@gherzan.ro>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
| |
Avoid need for installing clang on host, or depending on meta-clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
| |
prog_tests/flow_dissector.c:3:10: fatal error: error.h: No such file or directory
| #include <error.h>
| ^~~~~~~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
| |
selftests do not support it and clang from meta-clang builds with this
turned on by default
Disable security flags completely, drop all workarounds used to get
around the hoop
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
| |
When meta-clang is in mix then it does the right thing already so no
need to warn in that case
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
| |
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Even running on 32bit the bpf objects are 64bit: this triggers the QA about
bitsize mismatch 32 vs. 64. Besides, objdump does not recognize the arch 0xf7.
Trying the workaround to use the llvm-objdump and setting TOOLCHAIN = "clang"
the build for arm fails on libcxx
|include/c++/8.2.0/atomic:250: undefined reference to `__atomic_load_4'
Temporary disable bpf as done for x86/32bit as it seems still unstable.
Signed-off-by: Andrea Adami <andrea.adami@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
| |
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
| |
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
| |
* (Depends upon a linux-libc-headers patch proposed to oe-core)
* Delete unused patch
* Mark Clang 6.0 as minimum required version
* Do not hardcode python3 interpreter path
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Hongzhi.Song <hongzhi.song@windriver.com>
Cc: Martin Jansa <Martin.Jansa@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
COPYING coming from kernel sources but the md5 is static value
saved in recipe does not scale to all kind of machines which may
have different kernel providers filling in, therefore keep a static
copy of COPYING file as well, additionally copy LICENSES directory ( if
it exists) into sources where all the real license texts are living
Document need for clang
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* vm selftest uses it as well:
i586-webos-linux-gcc -m32 -march=i586 -fstack-protector-strong -Wformat -Wformat-security -Werror=format-security --sysroot=kernel-selftest/1.0-r0/recipe-sysroot -Wall -I ../../../../usr/include -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed -fstack-protector-strong -Wl,-z,relro,-z,now mlock-random-test.c -lrt -lcap -o kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/vm/mlock-random-test
mlock-random-test.c:8:10: fatal error: sys/capability.h: No such file or directory
#include <sys/capability.h>
^~~~~~~~~~~~~~~~~~
compilation terminated.
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|
| |
|
|
|
|
|
| |
Group the kernel-selftest testcases in run-ptest.
Signed-off-by: Dengke Du <dengke.du@windriver.com>
Signed-off-by: Khem Raj <raj.khem@gmail.com>
|