Commit e653b656 authored by Breno Leitao's avatar Breno Leitao Committed by Michael Ellerman
Browse files

selftests/powerpc: Create a new SKIP_IF macro



This patch creates a new macro that skips a test and prints a message to
stderr. This is useful to give an idea why the tests is being skipped,
other than just skipping the test blindly.

Signed-off-by: default avatarBreno Leitao <leitao@debian.org>
Reviewed-by: default avatarThiago Jung Bauermann <bauerman@linux.ibm.com>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent 5249497a
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -82,6 +82,16 @@ do { \
	}							\
} while (0)

#define SKIP_IF_MSG(x, msg)					\
do {								\
	if ((x)) {						\
		fprintf(stderr,					\
		"[SKIP] Test skipped on line %d: %s\n",		\
		 __LINE__, msg);				\
		return MAGIC_SKIP_RETURN_VALUE;			\
	}							\
} while (0)

#define _str(s) #s
#define str(s) _str(s)