From: Darren Hart Date: Wed, 13 May 2015 04:07:54 +0000 (-0700) Subject: selftests/futex: Increment ksft pass and fail counters X-Git-Tag: firefly_0821_release~176^2~1529^2~7 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=33ca2248e9cdd595caab6becda910ef7d2ef9f42;p=firefly-linux-kernel-4.4.55.git 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 Cc: linux-api@vger.kernel.org Cc: Ingo Molnar Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Davidlohr Bueso Cc: KOSAKI Motohiro Signed-off-by: Darren Hart Signed-off-by: Shuah Khan --- diff --git a/tools/testing/selftests/futex/functional/Makefile b/tools/testing/selftests/futex/functional/Makefile index 4b018febf9f1..9d6b75ef7b5d 100644 --- a/tools/testing/selftests/futex/functional/Makefile +++ b/tools/testing/selftests/futex/functional/Makefile @@ -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 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 #include #include +#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; }