linux/tools/testing/selftests
Andrii Nakryiko 7a2fa70aaf selftests/bpf: Add remaining ASSERT_xxx() variants
Add ASSERT_TRUE/ASSERT_FALSE for conditions calculated with custom logic to
true/false. Also add remaining arithmetical assertions:
  - ASSERT_LE -- less than or equal;
  - ASSERT_GT -- greater than;
  - ASSERT_GE -- greater than or equal.
This should cover most scenarios where people fall back to error-prone
CHECK()s.

Also extend ASSERT_ERR() to print out errno, in addition to direct error.

Also convert few CHECK() instances to ensure new ASSERT_xxx() variants work as
expected. Subsequent patch will also use ASSERT_TRUE/ASSERT_FALSE more
extensively.

Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Acked-by: Lorenz Bauer <lmb@cloudflare.com>
Link: https://lore.kernel.org/bpf/20210426192949.416837-2-andrii@kernel.org
2021-04-26 18:37:13 -07:00
..
arm64 kselftest/arm64: sve: Do not use non-canonical FFR register value 2021-03-22 12:49:57 +00:00
bpf selftests/bpf: Add remaining ASSERT_xxx() variants 2021-04-26 18:37:13 -07:00
breakpoints selftests: breakpoints: Use correct error messages in breakpoint_test_arm64.c 2021-02-08 17:04:41 -07:00
capabilities
cgroup selftests/cgroup: Fix build on older distros 2020-11-10 15:13:25 -07:00
clone3 selftests/clone3: Fix build error 2020-12-07 14:34:55 -07:00
core selftests/core: add regression test for CLOSE_RANGE_UNSHARE | CLOSE_RANGE_CLOEXEC 2020-12-19 16:23:19 +01:00
cpu-hotplug
cpufreq
dma dma-mapping: benchmark: pretend DMA is transmitting 2021-02-05 12:48:46 +01:00
dmabuf-heaps kselftests: dmabuf-heaps: Add extra checking that allocated buffers are zeroed 2021-02-08 16:25:53 -07:00
drivers selftests: mlxsw: Fix mausezahn invocation in ERSPAN scale test 2021-04-23 14:01:28 -07:00
efivarfs
exec tools/testing/selftests: add self-test for verifying load alignment 2020-10-16 11:11:21 -07:00
filesystems selftests/filesystems: expand epoll with epoll_pwait2 2020-12-19 11:18:38 -08:00
firmware linux-kselftest-next-5.10-rc1 2020-10-15 15:14:32 -07:00
fpu
ftrace selftests/ftrace: Add '!event' synthetic event syntax check 2021-02-11 16:22:32 -05:00
futex
gpio selftests: gpio: update .gitignore 2021-03-08 11:59:16 +01:00
ia64
intel_pstate selftests: intel_pstate: ftime() is deprecated 2020-11-10 14:41:32 -07:00
ipc selftests/ipc: remove unneeded semicolon 2021-02-08 16:32:43 -07:00
ir
kcmp
kexec
kmod
kselftest tweewide: Fix most Shebang lines 2020-12-08 23:30:04 +09:00
kvm selftests: kvm: Check that TSC page value is small after KVM_SET_CLOCK(0) 2021-04-01 05:14:19 -04:00
lib
livepatch selftests/livepatch: Do not check order when using "comm" for dmesg checking 2020-08-27 15:27:24 +02:00
lkdtm powerpc updates for 5.11 2020-12-17 13:34:25 -08:00
locking
media_tests
membarrier
memfd selftests/memfd: Fix implicit declaration warnings 2020-11-10 14:42:04 -07:00
memory-hotplug
mincore
mount selftests: mount: add nosymfollow tests 2020-08-27 16:06:47 -04:00
mount_setattr tests: add mount_setattr() selftests 2021-01-24 14:43:45 +01:00
mqueue
nci selftests: Add nci suite 2021-01-29 18:03:33 -08:00
net selftests/net: bump timeout to 5 minutes 2021-04-23 14:08:58 -07:00
netfilter selftests: netfilter: flowtable bridge and vlan support 2021-03-24 12:48:39 -07:00
nsfs
ntb
openat2 selftests: openat2: add RESOLVE_ conflict test 2020-12-03 10:16:28 +01:00
pid_namespace
pidfd selftests: pidfd: drop needless linux/kcmp.h inclusion in pidfd_setns_test.c 2020-10-27 17:04:01 -06:00
powerpc powerpc updates for 5.12 2021-02-22 14:34:00 -08:00
prctl
proc selftests: proc: fix warning: _GNU_SOURCE redefined 2020-11-05 10:08:14 -07:00
pstore
ptp
ptrace selftests: Add missing gitignore entries 2020-09-23 10:19:25 -06:00
rcutorture Merge branch 'for-mingo-nolibc' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu into core/rcu 2021-02-12 12:59:14 +01:00
resctrl
rseq rseq/selftests: Fix MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ build error under other arch. 2020-12-07 14:09:45 -07:00
rtc
safesetid
seccomp kconfig for kcmp syscall 2021-02-22 17:15:30 -08:00
sgx selftests/sgx: Use a statically generated 3072-bit RSA key 2020-11-18 18:26:00 +01:00
sigaltstack
size
sparc64
splice
static_keys
sync
syscall_user_dispatch entry: Use different define for selector variable in SUD 2021-02-06 00:21:42 +01:00
sysctl
tc-testing tc-testing: add simple action test to verify batch change cleanup 2021-04-08 13:50:14 -07:00
timens selftests/timens: add futex binary to .gitignore 2021-02-08 17:29:58 -07:00
timers
tmpfs
tpm2
uevent
user
vDSO selftests/vDSO: fix ABI selftest on riscv 2021-02-08 16:38:34 -07:00
vm selftests/vm: fix out-of-tree build 2021-03-25 09:22:55 -07:00
watchdog
wireguard wireguard: selftests: test multiple parallel streams 2021-02-23 15:54:07 -08:00
x86 linux-kselftest-next-5.12-rc1 2021-02-22 11:01:53 -08:00
zram
.gitignore
gen_kselftest_tar.sh
kselftest_deps.sh selftests: remove obsolete gpio references from kselftest_deps.sh 2021-02-15 11:43:28 +01:00
kselftest_harness.h selftests: kselftest_harness.h: partially fix kernel-doc markups 2021-01-21 14:06:00 -07:00
kselftest_install.sh
kselftest_module.h kselftest: add support for skipped tests 2021-02-15 11:07:42 +01:00
kselftest.h
lib.mk selftests: Set CC to clang in lib.mk if LLVM is set 2021-04-15 16:50:21 -07:00
Makefile idmapped-mounts-v5.12 2021-02-23 13:39:45 -08:00
run_kselftest.sh selftests/run_kselftest.sh: fix dry-run typo 2020-11-10 14:51:39 -07:00