summaryrefslogtreecommitdiffstats
path: root/tools/testing/selftests/futex/include
diff options
context:
space:
mode:
authorDarren Hart2015-05-13 06:07:54 +0200
committerShuah Khan2015-05-26 23:58:08 +0200
commit33ca2248e9cdd595caab6becda910ef7d2ef9f42 (patch)
treeebe37d4877bed77eca012006e176d1584d11589c /tools/testing/selftests/futex/include
parentselftests/futex: Update Makefile to use lib.mk (diff)
downloadkernel-qcow2-linux-33ca2248e9cdd595caab6becda910ef7d2ef9f42.tar.gz
kernel-qcow2-linux-33ca2248e9cdd595caab6becda910ef7d2ef9f42.tar.xz
kernel-qcow2-linux-33ca2248e9cdd595caab6becda910ef7d2ef9f42.zip
selftests/futex: Increment ksft pass and fail counters
Add kselftest.h to logging.h and increment the pass and fail counters as part of the print_result routine which is called by all futex tests. Cc: Shuah Khan <shuahkh@osg.samsung.com> Cc: linux-api@vger.kernel.org Cc: Ingo Molnar <mingo@elte.hu> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Davidlohr Bueso <dave@stgolabs.net> Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com> Signed-off-by: Darren Hart <dvhart@linux.intel.com> 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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/testing/selftests/futex/include/logging.h b/tools/testing/selftests/futex/include/logging.h
index f6ed5c205ba7..014aa01197af 100644
--- a/tools/testing/selftests/futex/include/logging.h
+++ b/tools/testing/selftests/futex/include/logging.h
@@ -24,6 +24,7 @@
#include <string.h>
#include <unistd.h>
#include <linux/futex.h>
+#include "kselftest.h"
/*
* Define PASS, ERROR, and FAIL strings with and without color escape
@@ -111,12 +112,14 @@ void print_result(int ret)
switch (ret) {
case RET_PASS:
+ ksft_inc_pass_cnt();
result = PASS;
break;
case RET_ERROR:
result = ERROR;
break;
case RET_FAIL:
+ ksft_inc_fail_cnt();
result = FAIL;
break;
}