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

selftests: kvm: Introduce the TEST_FAIL macro

Some tests/utilities use the TEST_ASSERT(false, ...) pattern to
indicate a failure and stop execution.

This change introduces the TEST_FAIL macro which is a wrap around
TEST_ASSERT(false, ...) and so provides a direct alternative for
failing a test.

Signed-off-by: Wainer dos Santos Moschetta <wainersm@redhat.com>
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>

authored by

Wainer dos Santos Moschetta and committed by
Paolo Bonzini
a46f8a63 3203a017

+3
+3
tools/testing/selftests/kvm/include/test_util.h
··· 55 55 #a, #b, #a, (unsigned long) __a, #b, (unsigned long) __b); \ 56 56 } while (0) 57 57 58 + #define TEST_FAIL(fmt, ...) \ 59 + TEST_ASSERT(false, fmt, ##__VA_ARGS__) 60 + 58 61 size_t parse_size(const char *size); 59 62 60 63 int64_t timespec_to_ns(struct timespec ts);