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

KVM: selftests: Use GUEST_FAIL() in ARM's arch timer helpers

Use GUEST_FAIL() in ARM's arch timer helpers now that printf-based
guest asserts are the default (and only) style of guest asserts, and
say goodbye to the GUEST_ASSERT_1() alias.

Link: https://lore.kernel.org/r/20230729003643.1053367-35-seanjc@google.com
Signed-off-by: Sean Christopherson <seanjc@google.com>

+6 -10
+6 -6
tools/testing/selftests/kvm/include/aarch64/arch_timer.h
··· 41 41 case PHYSICAL: 42 42 return read_sysreg(cntpct_el0); 43 43 default: 44 - GUEST_ASSERT_1(0, timer); 44 + GUEST_FAIL("Unexpected timer type = %u", timer); 45 45 } 46 46 47 47 /* We should not reach here */ ··· 58 58 write_sysreg(cval, cntp_cval_el0); 59 59 break; 60 60 default: 61 - GUEST_ASSERT_1(0, timer); 61 + GUEST_FAIL("Unexpected timer type = %u", timer); 62 62 } 63 63 64 64 isb(); ··· 72 72 case PHYSICAL: 73 73 return read_sysreg(cntp_cval_el0); 74 74 default: 75 - GUEST_ASSERT_1(0, timer); 75 + GUEST_FAIL("Unexpected timer type = %u", timer); 76 76 } 77 77 78 78 /* We should not reach here */ ··· 89 89 write_sysreg(tval, cntp_tval_el0); 90 90 break; 91 91 default: 92 - GUEST_ASSERT_1(0, timer); 92 + GUEST_FAIL("Unexpected timer type = %u", timer); 93 93 } 94 94 95 95 isb(); ··· 105 105 write_sysreg(ctl, cntp_ctl_el0); 106 106 break; 107 107 default: 108 - GUEST_ASSERT_1(0, timer); 108 + GUEST_FAIL("Unexpected timer type = %u", timer); 109 109 } 110 110 111 111 isb(); ··· 119 119 case PHYSICAL: 120 120 return read_sysreg(cntp_ctl_el0); 121 121 default: 122 - GUEST_ASSERT_1(0, timer); 122 + GUEST_FAIL("Unexpected timer type = %u", timer); 123 123 } 124 124 125 125 /* We should not reach here */
-4
tools/testing/selftests/kvm/include/ucall_common.h
··· 103 103 (const char *)(ucall).args[GUEST_FILE], \ 104 104 (ucall).args[GUEST_LINE], "%s", (ucall).buffer) 105 105 106 - /* FIXME: Drop this alias once the param-based guest asserts are gone. */ 107 - #define GUEST_ASSERT_1(_condition, arg1) \ 108 - __GUEST_ASSERT(_condition, "arg1 = 0x%lx", arg1) 109 - 110 106 #endif /* SELFTEST_KVM_UCALL_COMMON_H */