linux/tools/testing/selftests/mqueue
Athira Rajeev ce64763c63 testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set
The selftest "mqueue/mq_perf_tests.c" use CPU_ALLOC to allocate
CPU set. This cpu set is used further in pthread_attr_setaffinity_np
and by pthread_create in the code. But in current code, allocated
cpu set is not freed.

Fix this issue by adding CPU_FREE in the "shutdown" function which
is called in most of the error/exit path for the cleanup. There are
few error paths which exit without using shutdown. Add a common goto
error path with CPU_FREE for these cases.

Fixes: 7820b0715b ("tools/selftests: add mq_perf_tests")
Signed-off-by: Athira Rajeev <atrajeev@linux.vnet.ibm.com>
Signed-off-by: Shuah Khan <skhan@linuxfoundation.org>
2022-04-12 13:54:49 -06:00
..
.gitignore .gitignore: add SPDX License Identifier 2020-03-25 11:50:48 +01:00
Makefile selftests: mqueue: delete RUN_TESTS and EMIT_TESTS overrides 2018-05-30 15:21:52 -06:00
mq_open_tests.c selftests: mqueue: return Kselftest Skip code for skipped tests 2018-05-30 15:29:06 -06:00
mq_perf_tests.c testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu set 2022-04-12 13:54:49 -06:00