diff options
| author | Thomas Huth <[email protected]> | 2023-07-12 07:59:07 +0000 |
|---|---|---|
| committer | Sean Christopherson <[email protected]> | 2023-08-02 21:34:01 +0000 |
| commit | 6d85f51a1f08411617d0bfe12c537ed6eba7f0f4 (patch) | |
| tree | 4ca9602053c3c4f547d31f53a388bfedf0a47428 /tools/testing/selftests/kvm/include/test_util.h | |
| parent | KVM: selftests: Remove superfluous variable assignment (diff) | |
| download | kernel-6d85f51a1f08411617d0bfe12c537ed6eba7f0f4.tar.gz kernel-6d85f51a1f08411617d0bfe12c537ed6eba7f0f4.zip | |
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 <[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
Reviewed-by: Philippe Mathieu-Daudé <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Sean Christopherson <[email protected]>
Diffstat (limited to 'tools/testing/selftests/kvm/include/test_util.h')
| -rw-r--r-- | tools/testing/selftests/kvm/include/test_util.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/testing/selftests/kvm/include/test_util.h b/tools/testing/selftests/kvm/include/test_util.h index a6e9f215ce70..e734e52d8a3a 100644 --- a/tools/testing/selftests/kvm/include/test_util.h +++ b/tools/testing/selftests/kvm/include/test_util.h @@ -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); \ |
