Commit 5321270b authored by Sean Christopherson's avatar Sean Christopherson Committed by Paolo Bonzini
Browse files

KVM: selftests: Use TAP-friendly ksft_exit_skip() in __TEST_REQUIRE



Use the TAP-friendly ksft_exit_skip() instead of KVM's custom print_skip()
when skipping a test via __TEST_REQUIRE.  KVM's "skipping test" has no
known benefit, whereas some setups rely on TAP output.

Signed-off-by: default avatarSean Christopherson <seanjc@google.com>
Signed-off-by: default avatarPaolo Bonzini <pbonzini@redhat.com>
parent 7ed397d1
Loading
Loading
Loading
Loading
+4 −6
Original line number Diff line number Diff line
@@ -36,10 +36,8 @@ static inline int _no_printf(const char *format, ...) { return 0; }
void print_skip(const char *fmt, ...) __attribute__((format(printf, 1, 2)));
#define __TEST_REQUIRE(f, fmt, ...)				\
do {								\
	if (!(f)) {				\
		print_skip(fmt, ##__VA_ARGS__);	\
		exit(KSFT_SKIP);		\
	}					\
	if (!(f))						\
		ksft_exit_skip("- " fmt "\n", ##__VA_ARGS__);	\
} while (0)

#define TEST_REQUIRE(f) __TEST_REQUIRE(f, "Requirement not met: %s", #f)