diff options
author | Willy Tarreau <w@1wt.eu> | 2023-01-21 09:53:20 +0100 |
---|---|---|
committer | Paul E. McKenney <paulmck@kernel.org> | 2023-01-24 15:35:45 -0800 |
commit | c54ba4178159e440bea3826d22d43a9d0d94b071 (patch) | |
tree | 83de82d0a0383116522324bb87b1a619179da3fb /tools/bpf/bpftool/xlated_dumper.h | |
parent | f9b06695ba64bca310ada3df05264273106c5184 (diff) |
selftests/nolibc: Add a "run-user" target to test the program in user land
When developing tests, it is much faster to use the QEMU Linux
emulator instead of the system emulator, which among other things avoids
kernel-build latencies. Although use of the QEMU Linux emulator does have
its limitations (please see below), it is sufficient to test startup code,
stdlib code, and syscall calling conventions.
However, the current mainline Linux-kernel nolibc setup does not
support this. Therefore, add a "run-user" target that immediately
executes the prebuilt executable.
Again, this approach does have its limitations. For example, the
executable runs with the user's privilege level, which can cause some
false-positive failures due to insufficient permissions. In addition,
if the underlying kernel is old enough to lack some features that
nolibc relies on, the result will be false-positive failures in the
corresponding tests. However, for nolibc changes not affected by these
limittions, the result is a much faster code-compile-test-debug cycle.
With this patch, running a userland test is as simple as issuing:
make ARCH=xxx CROSS_COMPILE=xxx run-user
Signed-off-by: Willy Tarreau <w@1wt.eu>
Tested-by: Ammar Faizi <ammarfaizi2@gnuweeb.org>
Signed-off-by: Paul E. McKenney <paulmck@kernel.org>
Diffstat (limited to 'tools/bpf/bpftool/xlated_dumper.h')
0 files changed, 0 insertions, 0 deletions