aboutsummaryrefslogtreecommitdiff
path: root/tools/testing/selftests/mqueue/mq_perf_tests.c
AgeCommit message (Collapse)AuthorFilesLines
2024-06-24selftests/mqueue: fix 5 warnings about signed/unsigned mismatchesJohn Hubbard1-2/+4
When building with clang, via: make LLVM=1 -C tools/testing/selftest ...clang warns about several cases of using a signed integer for the priority argument to mq_receive(3), which expects an unsigned int. Fix this by declaring the type as unsigned int in all cases. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: John Hubbard <[email protected]> Reviewed-by: Muhammad Usama Anjum <[email protected]> Reviewed-by: Ryan Roberts <[email protected]> Cc: David Hildenbrand <[email protected]> Cc: Muhammad Usama Anjum <[email protected]> Cc: SeongJae Park <[email protected]> Cc: Shuah Khan <[email protected]> Cc: Valentin Obst <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
2022-04-19selftests: mqueue: drop duplicate min definitionGeliang Tang1-2/+2
Drop duplicate macro min() definition in mq_perf_tests.c, use MIN() in sys/param.h instead. Signed-off-by: Geliang Tang <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2022-04-12testing/selftests/mqueue: Fix mq_perf_tests to free the allocated cpu setAthira Rajeev1-8/+17
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: 7820b0715b6f ("tools/selftests: add mq_perf_tests") Signed-off-by: Athira Rajeev <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2018-05-30selftests: mqueue: return Kselftest Skip code for skipped testsShuah Khan (Samsung OSG)1-4/+4
When mqueue test is skipped because of unmet dependencies and/or unsupported configuration, it exits with error which is treated as a fail by the Kselftest framework. This leads to false negative result even when the test could not be run. Change it to return kselftest skip code when a test gets skipped to clearly report that the test could not be run. Change it to use ksft_exit_skip() when the test is skipped. Signed-off-by: Shuah Khan (Samsung OSG) <[email protected]>
2015-11-03selftests: Add missing #include directivesBen Hutchings1-0/+1
Several C programs fail to include the headers declaring all the functions they call, resulting in warnings or errors. After this, memfd_test.c is still missing some function declarations but can't easily get them because of a conflict between <linux/fcntl.h> and <sys/fcntl.h>. Signed-off-by: Ben Hutchings <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2015-01-06tools: testing: selftests: mq_perf_tests: Fix infinite loop on ARMdann frazier1-2/+1
We can't use a char type to check for a negative return value since char isn't guaranteed to be signed. Indeed, the char type tends to be unsigned on ARM. Signed-off-by: dann frazier <[email protected]> Signed-off-by: Shuah Khan <[email protected]>
2014-07-11tools: fix mq_perf_tests compile warningsShuah Khan1-19/+21
Fix numerous compile warnings in mq_perf_tests.c. All of these are wrong format in printfs when printing nvsec. Signed-off-by: Shuah Khan <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-05-31tools/selftests: add mq_perf_testsDoug Ledford1-0/+741
Add the mq_perf_tests tool I used when creating my mq performance patch. Also add a local .gitignore to keep the binaries from showing up in git status output. [[email protected]: checkpatch fixes] Signed-off-by: Doug Ledford <[email protected]> Cc: Stephen Rothwell <[email protected]> Cc: Manfred Spraul <[email protected]> Cc: Frederic Weisbecker <[email protected]> Acked-by: KOSAKI Motohiro <[email protected]> Signed-off-by: Andrew Morton <[email protected]> Signed-off-by: Linus Torvalds <[email protected]>