Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Darren Hart and committed by
Shuah Khan
33ca2248 9705315b

+4 -1
+1 -1
tools/testing/selftests/futex/functional/Makefile
··· 1 - INCLUDES := -I../include 1 + INCLUDES := -I../include -I../../ 2 2 CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES) 3 3 LDFLAGS := $(LDFLAGS) -pthread -lrt 4 4
+3
tools/testing/selftests/futex/include/logging.h
··· 24 24 #include <string.h> 25 25 #include <unistd.h> 26 26 #include <linux/futex.h> 27 + #include "kselftest.h" 27 28 28 29 /* 29 30 * Define PASS, ERROR, and FAIL strings with and without color escape ··· 112 111 113 112 switch (ret) { 114 113 case RET_PASS: 114 + ksft_inc_pass_cnt(); 115 115 result = PASS; 116 116 break; 117 117 case RET_ERROR: 118 118 result = ERROR; 119 119 break; 120 120 case RET_FAIL: 121 + ksft_inc_fail_cnt(); 121 122 result = FAIL; 122 123 break; 123 124 }