aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/tools/testing/selftests/futex/include
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2017-05-22 12:47:43 +0530
committerShuah Khan <shuahkh@osg.samsung.com>2017-06-07 10:07:21 -0600
commit1f666e522cc49df2659f40be118624bf7a529a0f (patch)
tree445abec98d3055c6425ec834e24106c2be54c14c /tools/testing/selftests/futex/include
parentLinux 4.12-rc4 (diff)
downloadwireguard-linux-1f666e522cc49df2659f40be118624bf7a529a0f.tar.xz
wireguard-linux-1f666e522cc49df2659f40be118624bf7a529a0f.zip
selftests: futex: print testcase-name and PASS/FAIL/ERROR status
Most of the tests under selftests follow a pattern for their results, which can then be parsed easily by other external tools easily. Though futex tests do print the test results very well, it doesn't really follow the general selftests pattern. This patch makes necessary changes to fix that. Output before this patch: futex_requeue_pi: Test requeue functionality Arguments: broadcast=0 locked=0 owner=0 timeout=0ns Result: PASS Output after this patch: futex_requeue_pi: Test requeue functionality Arguments: broadcast=0 locked=0 owner=0 timeout=0ns selftests: futex-requeue-pi [PASS] Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org> Signed-off-by: Shuah Khan <shuahkh@osg.samsung.com>
Diffstat (limited to 'tools/testing/selftests/futex/include')
-rw-r--r--tools/testing/selftests/futex/include/logging.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/futex/include/logging.h b/tools/testing/selftests/futex/include/logging.h
index e14469103f07..4e7944984fbb 100644
--- a/tools/testing/selftests/futex/include/logging.h
+++ b/tools/testing/selftests/futex/include/logging.h
@@ -107,7 +107,7 @@ void log_verbosity(int level)
*
* print_result() is primarily intended for functional tests.
*/
-void print_result(int ret)
+void print_result(const char *test_name, int ret)
{
const char *result = "Unknown return code";
@@ -124,7 +124,7 @@ void print_result(int ret)
result = FAIL;
break;
}
- printf("Result: %s\n", result);
+ printf("selftests: %s [%s]\n", test_name, result);
}
/* log level macros */