Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 33ca2248 authored by Darren Hart's avatar Darren Hart Committed by Shuah Khan
Browse files

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: default avatarDarren Hart <dvhart@linux.intel.com>
Signed-off-by: default avatarShuah Khan <shuahkh@osg.samsung.com>
parent 9705315b
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
INCLUDES := -I../include
INCLUDES := -I../include -I../../
CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
CFLAGS := $(CFLAGS) -g -O2 -Wall -D_GNU_SOURCE -pthread $(INCLUDES)
LDFLAGS := $(LDFLAGS) -pthread -lrt
LDFLAGS := $(LDFLAGS) -pthread -lrt


+3 −0
Original line number Original line Diff line number Diff line
@@ -24,6 +24,7 @@
#include <string.h>
#include <string.h>
#include <unistd.h>
#include <unistd.h>
#include <linux/futex.h>
#include <linux/futex.h>
#include "kselftest.h"


/*
/*
 * Define PASS, ERROR, and FAIL strings with and without color escape
 * Define PASS, ERROR, and FAIL strings with and without color escape
@@ -111,12 +112,14 @@ void print_result(int ret)


	switch (ret) {
	switch (ret) {
	case RET_PASS:
	case RET_PASS:
		ksft_inc_pass_cnt();
		result = PASS;
		result = PASS;
		break;
		break;
	case RET_ERROR:
	case RET_ERROR:
		result = ERROR;
		result = ERROR;
		break;
		break;
	case RET_FAIL:
	case RET_FAIL:
		ksft_inc_fail_cnt();
		result = FAIL;
		result = FAIL;
		break;
		break;
	}
	}