linux/tools/testing/selftests
Kunwu Chan a5bd59e048 kselftest: arm64: Add a null pointer check
[ Upstream commit 80164282b3 ]

There is a 'malloc' call, which can be unsuccessful.
This patch will add the malloc failure checking
to avoid possible null dereference and give more information
about test fail reasons.

Signed-off-by: Kunwu Chan <chentao@kylinos.cn>
Reviewed-by: Muhammad Usama Anjum <usama.anjum@collabora.com>
Link: https://lore.kernel.org/r/20240423082102.2018886-1-chentao@kylinos.cn
Signed-off-by: Will Deacon <will@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-07-05 09:14:26 +02:00
..
arm64 kselftest: arm64: Add a null pointer check 2024-07-05 09:14:26 +02:00
bpf selftests/bpf: Fix flaky test btf_map_in_map/lookup_update 2024-07-05 09:14:25 +02:00
breakpoints
capabilities
cgroup kseltest/cgroup: Make test_stress.sh work if run interactively 2022-06-09 10:23:30 +02:00
clone3 selftests: fixup build warnings in pidfd / clone3 tests 2022-02-23 12:03:18 +01:00
core selftests/core: fix conflicting types compile error for close_range() 2021-11-18 19:16:21 +01:00
cpu-hotplug
cpufreq selftests/cpufreq: Rename DEBUG_PI_LIST to DEBUG_PLIST 2021-08-31 11:00:02 -06:00
damon selftests/damon: test debugfs file reads/writes with huge count 2021-12-22 09:32:51 +01:00
dma
dmabuf-heaps
drivers selftests: netdevsim: fix the udp_tunnel_nic test 2024-02-23 08:54:30 +01:00
efivarfs selftests/efivarfs: create-read: fix a resource leak 2023-11-28 16:56:17 +00:00
exec selftests/exec: Add non-regular to TEST_GEN_PROGS 2022-02-23 12:03:13 +01:00
filesystems selftests/binderfs: use the Makefile's rules, not Make's implicit rules 2024-06-16 13:39:24 +02:00
firmware selftests: firmware: Fix ignored return val of asprintf() warn 2021-07-21 16:11:42 +02:00
fpu
ftrace tracing/selftests: Fix kprobe event name test for .isra. functions 2024-07-05 09:14:20 +02:00
futex selftests/futex: Order calls to futex_lock_pi 2023-09-19 12:22:31 +02:00
gpio selftests: gpio: fix gpio compiling error 2021-11-25 09:48:34 +01:00
ia64
intel_pstate selftests/intel_pstate: fix build for ARCH=x86_64 2022-11-26 09:24:30 +01:00
ipc
ir
kcmp selftests/kcmp: remove unused open mode 2024-06-16 13:39:33 +02:00
kexec
kmod
kselftest kselftest/runner.sh: Propagate SIGTERM to runner child 2023-09-19 12:23:03 +02:00
kvm selftests: kvm: Fix a compile error in selftests/kvm/rseq_test.c 2023-01-18 11:48:47 +01:00
landlock selftests/landlock: Test ptrace as much as possible with Yama 2023-03-10 09:39:59 +01:00
lib
livepatch
lkdtm selftest/lkdtm: Skip stack-entropy test if lkdtm is not available 2023-02-22 12:57:07 +01:00
locking
media_tests
membarrier
memfd selftests/memfd: Fix unknown type name build failure 2023-05-30 13:55:30 +01:00
memory-hotplug selftests: memory-hotplug: avoid spamming logs with dump_page(), ratio limit hot-remove error test 2021-07-12 14:20:01 -06:00
mincore selftests: skip mincore.check_file_mmap when fs lacks needed support 2022-02-23 12:03:05 +01:00
mount
mount_setattr selftests/mount_setattr: fix redefine struct mount_attr build error 2023-06-28 10:29:41 +02:00
move_mount_set_group tests: add move_mount(MOVE_MOUNT_SET_GROUP) selftest 2021-07-26 14:45:19 +02:00
mqueue selftests/mqueue: Set timeout to 180 seconds 2024-04-10 16:18:35 +02:00
nci selftests: nci: replace unsigned int with int 2021-09-16 13:55:51 +01:00
net mptcp: pm: update add_addr counters after connect 2024-07-05 09:14:23 +02:00
netfilter selftests: nft_nat: ensuring the listening side is up before starting the client 2023-03-17 08:48:54 +01:00
nsfs
ntb
openat2 selftests: openat2: Skip testcases that fail with EOPNOTSUPP 2022-02-23 12:03:05 +01:00
perf_events
pid_namespace
pidfd selftests/pidfd: Fix ksft print formats 2023-11-20 11:08:22 +01:00
powerpc selftests/powerpc: Fix error handling in FPU/VMX preemption tests 2024-01-25 14:52:32 -08:00
prctl
proc proc: fixup uptime selftest 2022-12-31 13:14:02 +01:00
pstore
ptp selftests/ptp: Fix timestamp printf format for PTP_SYS_OFFSET 2023-06-21 15:59:18 +02:00
ptrace
rcutorture rcutorture: Correct name of use_softirq module parameter 2023-07-23 13:46:46 +02:00
resctrl selftests/resctrl: fix clang build failure: use LOCAL_HDRS 2024-06-16 13:39:24 +02:00
rlimits
rseq selftests/rseq: Fix build with undefined __weak 2023-08-16 18:22:00 +02:00
rtc selftests: rtc: Increase test timeout so that all tests run 2022-02-23 12:03:04 +01:00
safesetid selftests: safesetid: Fix spelling mistake "cant" -> "can't" 2021-08-26 15:15:24 -06:00
sched kselftests/sched: cleanup the child processes 2021-11-18 19:16:14 +01:00
seccomp selftests/seccomp: Fix compile warning when CC=clang 2022-08-17 14:23:14 +02:00
sgx selftests/sgx: Fix linker script asserts 2024-02-23 08:54:51 +01:00
sigaltstack selftests: sigaltstack: fix -Wuninitialized 2023-04-26 13:51:50 +02:00
size
sparc64
splice
static_keys
sync selftests/sync: Remove the deprecated config SYNC 2021-08-31 10:58:00 -06:00
syscall_user_dispatch selftests: sud_test: return correct emulated syscall value on RISC-V 2024-06-16 13:39:14 +02:00
sysctl
tc-testing selftests: tc: add ConnTrack procfs kconfig 2023-07-27 08:46:55 +02:00
timens
timers selftests: timers: Fix valid-adjtimex signed left-shift undefined behavior 2024-05-17 11:50:54 +02:00
tmpfs
tpm2 selftest: tpm2: Add Client.__del__() to close /dev/tpm* handle 2022-10-26 12:35:29 +02:00
uevent
user
vDSO kselftest: vDSO: Fix accumulation of uninitialized ret when CLOCK_REALTIME is undefined 2023-07-23 13:46:47 +02:00
vm selftests/mm: compaction_test: fix bogus test success on Aarch64 2024-07-05 09:14:13 +02:00
watchdog
wireguard wireguard: netlink: send staged packets when setting initial private key 2023-07-23 13:47:37 +02:00
x86 selftests, x86: fix how check_cc.sh is being invoked 2022-04-08 14:23:11 +02:00
zram selftests/zram: Adapt the situation that /dev/zram0 is being used 2022-02-23 12:03:05 +01:00
.gitignore
gen_kselftest_tar.sh
kselftest_deps.sh selftests: fix dependency checker script 2023-10-06 13:18:16 +02:00
kselftest_harness.h selftests/harness: Actually report SKIP for signal tests 2023-09-19 12:22:30 +02:00
kselftest_install.sh
kselftest_module.h
kselftest.h selftests: Provide local define of __cpuid_count() 2023-02-06 07:59:01 +01:00
lib.mk selftests: Use optional USERCFLAGS and USERLDFLAGS 2023-01-12 11:58:51 +01:00
Makefile selftests/resctrl: Make resctrl_tests run using kselftest framework 2023-09-19 12:22:31 +02:00
run_kselftest.sh