linux-stable/tools/testing/selftests
Quentin Monnet fc1986bcfe selftests/bpf: Fix parsing of prog types in UAPI hdr for bpftool sync
[ Upstream commit 4eeebce6ac ]

The script for checking that various lists of types in bpftool remain in
sync with the UAPI BPF header uses a regex to parse enum bpf_prog_type.
If this enum contains a set of values different from the list of program
types in bpftool, it complains.

This script should have reported the addition, some time ago, of the new
BPF_PROG_TYPE_SYSCALL, which was not reported to bpftool's program types
list. It failed to do so, because it failed to parse that new type from
the enum. This is because the new value, in the BPF header, has an
explicative comment on the same line, and the regex does not support
that.

Let's update the script to support parsing enum values when they have
comments on the same line.

Signed-off-by: Quentin Monnet <quentin@isovalent.com>
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Link: https://lore.kernel.org/bpf/20220404140944.64744-1-quentin@isovalent.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-06-09 10:25:18 +02:00
..
alsa kselftest: alsa: Validate values read from enumerations 2021-12-25 09:13:28 +01:00
arm64 kselftest/arm64: Correct logging of FPSIMD register read via ptrace 2022-01-28 11:30:51 +00:00
bpf selftests/bpf: Fix parsing of prog types in UAPI hdr for bpftool sync 2022-06-09 10:25:18 +02:00
breakpoints
capabilities
cgroup linux-kselftest-next-5.17-rc1 2022-01-10 12:08:12 -08:00
clone3 selftests: fixup build warnings in pidfd / clone3 tests 2022-02-04 13:07:07 -07:00
core selftests/core: remove ARRAY_SIZE define from close_range_test.c 2021-12-10 17:50:38 -07:00
cpu-hotplug
cpufreq selftests: cpufreq: Write test output to stdout as well 2022-01-25 13:20:03 -07:00
damon selftests/damon: split test cases 2021-12-10 17:10:56 -08:00
dma
dmabuf-heaps
drivers selftests: ocelot: tc_flower_chains: specify conform-exceed action for policer 2022-05-12 12:32:39 +02:00
efivarfs
exec selftests/exec: Add non-regular to TEST_GEN_PROGS 2022-02-11 10:18:13 -07:00
filesystems
firmware
fpu
ftrace selftests/ftrace: Do not trace do_softirq because of PREEMPT_RT 2022-02-14 13:28:17 -07:00
futex selftests: futex: Use variable MAKE instead of make 2022-01-27 16:29:23 -07:00
gpio gpio updates for v5.17 2022-01-11 12:31:35 -08:00
ia64
intel_pstate
ipc
ir selftests/ir: fix build with ancient kernel headers 2022-02-04 13:14:41 -07:00
kcmp
kexec selftests/kexec: Enable secureboot tests for PowerPC 2022-01-05 11:44:57 -05:00
kmod
kselftest
kvm KVM: selftests: Silence compiler warning in the kvm_page_table_test 2022-05-12 12:32:41 +02:00
landlock selftests/landlock: remove ARRAY_SIZE define from common.h 2021-12-10 17:50:51 -07:00
lib
livepatch
lkdtm selftests/lkdtm: Add UBSAN config 2022-04-08 13:57:49 +02:00
locking
media_tests
membarrier
memfd selftests/memfd: clean up mapping in mfd_fail_write 2022-02-26 09:51:17 -08:00
memory-hotplug
mincore selftests: skip mincore.check_file_mmap when fs lacks needed support 2022-01-27 16:40:45 -07:00
mount selftests/mount: remove unneeded conversion to bool 2021-12-10 16:46:01 -07:00
mount_setattr tests: fix idmapped mount_setattr test 2022-02-11 09:08:20 +01:00
move_mount_set_group selftests/move_mount_set_group remove unneeded conversion to bool 2021-12-10 16:46:01 -07:00
mqueue testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set 2022-04-20 09:36:17 +02:00
nci
net selftests: add ping test with ping_group_range tuned 2022-05-25 09:59:13 +02:00
netfilter Revert "netfilter: nat: force port remap to prevent shadowing well-known ports" 2022-03-08 13:52:11 +01:00
nsfs
ntb
openat2 selftests: openat2: Skip testcases that fail with EOPNOTSUPP 2022-01-27 16:31:07 -07:00
perf_events selftests/perf_events: Test modification of perf_event_attr::sig_data 2022-02-02 13:11:40 +01:00
pid_namespace
pidfd selftests: fixup build warnings in pidfd / clone3 tests 2022-02-04 13:07:07 -07:00
powerpc selftests/powerpc: Add a test of sigreturning to an unaligned address 2021-12-25 10:56:05 +11:00
prctl
proc
pstore
ptp testptp: set pin function before other requests 2022-01-05 17:08:58 -08:00
ptrace
rcutorture torture: Make torture.sh help message match reality 2022-04-08 13:59:04 +02:00
resctrl
rlimits
rseq selftests/rseq: remove ARRAY_SIZE define from individual tests 2021-12-10 17:51:03 -07:00
rtc selftests: rtc: Increase test timeout so that all tests run 2022-01-25 13:16:01 -07:00
safesetid
sched
seccomp selftests/seccomp: Don't call read() on TTY from background pgrp 2022-05-12 12:32:32 +02:00
sgx selftests/sgx: Treat CC as one argument 2022-04-08 13:57:34 +02:00
sigaltstack
size
sparc64 selftests/sparc64: remove ARRAY_SIZE define from adi-test 2021-12-10 17:51:15 -07:00
splice
static_keys
sync
syscall_user_dispatch
sysctl
tc-testing selftests: tc-testing: add action offload selftest for action and filter 2021-12-19 14:08:48 +00:00
timens selftests/timens: remove ARRAY_SIZE define from individual tests 2021-12-10 17:51:20 -07:00
timers selftests: timers: Remove unneeded semicolon 2021-12-10 16:46:00 -07:00
tmpfs
tpm2
uevent
user
vDSO kselftest: Fix vdso_test_abi return status 2022-01-31 10:35:14 -07:00
vm selftests: vm: Makefile: rename TARGETS to VMTARGETS 2022-05-18 10:28:14 +02:00
watchdog
wireguard wireguard: device: reset peer src endpoint when netns exits 2021-11-29 19:50:45 -08:00
x86 selftests, x86: fix how check_cc.sh is being invoked 2022-04-08 13:57:41 +02:00
zram selftests/zram: Adapt the situation that /dev/zram0 is being used 2022-01-27 10:59:02 -07:00
.gitignore
gen_kselftest_tar.sh
kselftest.h tools: fix ARRAY_SIZE defines in tools and selftests hdrs 2021-12-10 17:50:17 -07:00
kselftest_deps.sh
kselftest_harness.h kselftest: signal all child processes 2022-01-25 13:48:21 -07:00
kselftest_install.sh
kselftest_module.h
lib.mk selftests: cgroup: build error multiple outpt files 2021-12-10 16:46:01 -07:00
Makefile kselftest: alsa: Add simplistic test for ALSA mixer controls kselftest 2021-12-12 10:04:27 +01:00
run_kselftest.sh