summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/futex/functional/futex_wait_timeout.c
diff options
context:
space:
mode:
authorNaresh Kamboju <naresh.kamboju@linaro.org>2017-05-22 10:17:43 +0300
committerShuah Khan <shuahkh@osg.samsung.com>2017-06-07 19:07:21 +0300
commit1f666e522cc49df2659f40be118624bf7a529a0f (patch)
tree445abec98d3055c6425ec834e24106c2be54c14c /tools/testing/selftests/futex/functional/futex_wait_timeout.c
parent3c2993b8c6143d8a5793746a54eba8f86f95240f (diff)
downloadlinux-1f666e522cc49df2659f40be118624bf7a529a0f.tar.xz
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/functional/futex_wait_timeout.c')
-rw-r--r--tools/testing/selftests/futex/functional/futex_wait_timeout.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/testing/selftests/futex/functional/futex_wait_timeout.c b/tools/testing/selftests/futex/functional/futex_wait_timeout.c
index ab428ca894de..6aadd560366e 100644
--- a/tools/testing/selftests/futex/functional/futex_wait_timeout.c
+++ b/tools/testing/selftests/futex/functional/futex_wait_timeout.c
@@ -27,6 +27,8 @@
#include "futextest.h"
#include "logging.h"
+#define TEST_NAME "futex-wait-timeout"
+
static long timeout_ns = 100000; /* 100us default timeout */
void usage(char *prog)
@@ -81,6 +83,6 @@ int main(int argc, char *argv[])
ret = RET_FAIL;
}
- print_result(ret);
+ print_result(TEST_NAME, ret);
return ret;
}