umber-kernel/tools/testing
Dmitry Vyukov b89732c8c8 selftests: Fix errno checking in syscall_user_dispatch test
Successful syscalls don't change errno, so checking errno is wrong
to ensure that a syscall has failed. For example for the following
sequence:

	prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0x0, 0xff, 0);
	EXPECT_EQ(EINVAL, errno);
	prctl(PR_SET_SYSCALL_USER_DISPATCH, op, 0x0, 0x0, &sel);
	EXPECT_EQ(EINVAL, errno);

only the first syscall may fail and set errno, but the second may succeed
and keep errno intact, and the check will falsely pass.
Or if errno happened to be EINVAL before, even the first check may falsely
pass.

Also use EXPECT/ASSERT consistently. Currently there is an inconsistent mix
without obvious reasons for usage of one or another.

Fixes: 179ef03599 ("selftests: Add kselftest for syscall user dispatch")
Signed-off-by: Dmitry Vyukov <dvyukov@google.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lore.kernel.org/all/af6a04dbfef9af8570f5bab43e3ef1416b62699a.1747839857.git.dvyukov@google.com
2025-06-13 18:36:39 +02:00
..
crypto/chacha20-s390 crypto: lib/chacha - strongly type the ChaCha state 2025-05-12 13:32:53 +08:00
cxl Merge branch 'for-6.16/cxl-features-ras' into cxl-for-next 2025-05-23 13:26:24 -07:00
fault-injection
ktest
kunit Revert "kunit: configs: Enable CONFIG_INIT_STACK_ALL_PATTERN in all_tests" 2025-06-03 11:20:21 +02:00
memblock memblock: add MEMBLOCK_RSRV_KERN flag 2025-05-12 23:50:38 -07:00
nvdimm
radix-tree maple_tree: add sufficient height 2025-05-11 17:48:29 -07:00
rbtree
scatterlist
selftests selftests: Fix errno checking in syscall_user_dispatch test 2025-06-13 18:36:39 +02:00
shared
vma mm/hugetlb: unshare page tables during VMA split, not before 2025-06-05 22:02:24 -07:00
vsock vsock/test: Add test for an unexpectedly lingering close() 2025-05-27 11:05:22 +02:00