mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/herbert/cryptodev-2.6.git
synced 2026-04-23 05:56:14 -04:00
KVM: selftests: Rename the ASSERT_EQ macro
There is already an ASSERT_EQ macro in the file tools/testing/selftests/kselftest_harness.h, so currently KVM selftests can't include test_util.h from the KVM selftests together with that file. Rename the macro in the KVM selftests to TEST_ASSERT_EQ to avoid the problem - it is also more similar to the other macros in test_util.h that way. Suggested-by: Sean Christopherson <seanjc@google.com> Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Link: https://lore.kernel.org/r/20230712075910.22480-2-thuth@redhat.com Signed-off-by: Sean Christopherson <seanjc@google.com>
This commit is contained in:
committed by
Sean Christopherson
parent
7e4966e6e1
commit
6d85f51a1f
@@ -53,11 +53,11 @@ void test_assert(bool exp, const char *exp_str,
|
||||
#define TEST_ASSERT(e, fmt, ...) \
|
||||
test_assert((e), #e, __FILE__, __LINE__, fmt, ##__VA_ARGS__)
|
||||
|
||||
#define ASSERT_EQ(a, b) do { \
|
||||
#define TEST_ASSERT_EQ(a, b) do { \
|
||||
typeof(a) __a = (a); \
|
||||
typeof(b) __b = (b); \
|
||||
TEST_ASSERT(__a == __b, \
|
||||
"ASSERT_EQ(%s, %s) failed.\n" \
|
||||
"TEST_ASSERT_EQ(%s, %s) failed.\n" \
|
||||
"\t%s is %#lx\n" \
|
||||
"\t%s is %#lx", \
|
||||
#a, #b, #a, (unsigned long) __a, #b, (unsigned long) __b); \
|
||||
|
||||
Reference in New Issue
Block a user