]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
selftests/futex: Increment ksft pass and fail counters
authorDarren Hart <dvhart@linux.intel.com>
Wed, 13 May 2015 04:07:54 +0000 (21:07 -0700)
committerShuah Khan <shuahkh@osg.samsung.com>
Tue, 26 May 2015 21:58:08 +0000 (15:58 -0600)
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>
tools/testing/selftests/futex/functional/Makefile
tools/testing/selftests/futex/include/logging.h

index 4b018febf9f13f39285d206d897b0cee4d8911b9..9d6b75ef7b5d679a698862b2406b619e633e8672 100644 (file)
@@ -1,4 +1,4 @@
-INCLUDES := -I../include
+INCLUDES := -I../include -I../../
 CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
 LDFLAGS := $(LDFLAGS) -pthread -lrt
 
index f6ed5c205ba7ea4f2ca05285156239b72e6d8bff..014aa01197af5084c097de3e5a425894ad630140 100644 (file)
@@ -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;
        }