Skip to content

Commit

Permalink
selftests/futex: Increment ksft pass and fail counters
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Darren Hart authored and Shuah Khan committed May 26, 2015
1 parent 9705315 commit 33ca224
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tools/testing/selftests/futex/functional/Makefile
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 3 additions & 0 deletions tools/testing/selftests/futex/include/logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit 33ca224

Please sign in to comment.