linux/tools/testing/selftests/powerpc
Miaoqian Lin 8f4ab7da90 selftests/powerpc: Fix resource leaks
In check_all_cpu_dscr_defaults, opendir() opens the directory stream.
Add missing closedir() in the error path to release it.

In check_cpu_dscr_default, open() creates an open file descriptor.
Add missing close() in the error path to release it.

Fixes: ebd5858c90 ("selftests/powerpc: Add test for all DSCR sysfs interfaces")
Signed-off-by: Miaoqian Lin <linmq006@gmail.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
Link: https://lore.kernel.org/r/20221205084429.570654-1-linmq006@gmail.com
2022-12-05 21:39:15 +11:00
..
alignment selftests/powerpc: Suggest memtrace instead of /dev/mem for ci memory 2021-04-08 21:17:44 +10:00
benchmarks powerpc/selftests: Use timersub() for gettimeofday() 2022-08-22 13:36:59 +10:00
cache_shape .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
copyloops selftests/powerpc/copyloops: Add memmove_64 test 2022-02-12 22:47:44 +11:00
dscr selftests/powerpc: Fix resource leaks 2022-12-05 21:39:15 +11:00
eeh selftests/powerpc: Add VF recovery tests 2021-01-31 22:35:47 +11:00
include selftests/powerpc: Remove repeated word in comments 2022-11-24 23:31:49 +11:00
lib selftests/powerpc/ptrace: Convert to load/store doubles 2022-07-25 12:05:16 +10:00
math selftests/powerpc: Fix matrix multiply assist test 2022-07-28 16:22:15 +10:00
mce selftests/powerpc: Add missing files to .gitignores 2022-06-29 19:37:04 +10:00
mm selftests/powerpc: Skip 4PB test on 4K PAGE_SIZE systems 2022-09-04 22:39:59 +10:00
nx-gzip selftests/powerpc: Use req_max_processed_len from sysfs NX capabilities 2021-06-25 14:47:19 +10:00
papr_attributes selftests/powerpc: Skip energy_scale_info test on older firmware 2022-06-26 10:29:43 +10:00
pmu selftests/powerpc: Update bhrb filter sampling test for multiple branch filters 2022-09-28 19:22:13 +10:00
primitives powerpc/bug: Provide better flexibility to WARN_ON/__WARN_FLAGS() with asm goto 2021-08-15 13:49:24 +10:00
ptrace selftests/powerpc: Add ptrace setup_core_pattern() null-terminator 2022-12-02 18:04:27 +11:00
scripts selftests: powerpc: Use "grep -E" instead of "egrep" 2022-12-02 18:04:27 +11:00
security selftests/powerpc: Use mfspr/mtspr macros 2022-12-02 18:04:27 +11:00
signal selftests/powerpc: Add a test of sigreturning to an unaligned address 2021-12-25 10:56:05 +11:00
stringloops selftests/powerpc: Include asm/cputable.h from utils.h 2020-09-08 22:23:59 +10:00
switch_endian selftests/powerpc: Properly handle failure in switch_endian_test 2020-09-08 22:24:13 +10:00
syscalls selftests/powerpc: update .gitignore 2020-12-04 01:01:21 +11:00
tm selftests/powerpc: Add scv versions of the basic TM syscall tests 2021-09-13 22:34:11 +10:00
vphn .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
harness.c
Makefile selftest/powerpc: Add PAPR sysfs attributes sniff test 2022-03-08 00:05:00 +11:00
utils.c selftests/powerpc: Move set_dscr() into rfi_flush.c 2020-09-08 22:23:57 +10:00