summaryrefslogtreecommitdiff
path: root/tools/testing/selftests/kvm/aarch64/arch_timer.c
diff options
context:
space:
mode:
authorOliver Upton <oliver.upton@linux.dev>2024-02-12 21:09:33 +0000
committerOliver Upton <oliver.upton@linux.dev>2024-02-13 01:42:34 +0000
commit8cdc71fbf65567dca6f52aac206d91754ad55147 (patch)
treead804568f187d1d9684e30b3b07888b5553afb53 /tools/testing/selftests/kvm/aarch64/arch_timer.c
parent06fdd894b473c6cc29c9b39b82e0941cefec4e51 (diff)
KVM: selftests: Print timer ctl register in ISTATUS assertion
Zenghui noted that the test assertion for the ISTATUS bit is printing the current timer value instead of the control register in the case of failure. While the assertion is sound, printing CNT isn't informative. Change things around to actually print the CTL register value instead. Reported-by: Zenghui Yu <yuzenghui@huawei.com> Closes: https://lore.kernel.org/kvmarm/3188e6f1-f150-f7d0-6c2b-5b7608b0b012@huawei.com/ Reviewed-by: Zenghui Yu <zenghui.yu@linux.dev> Link: https://lore.kernel.org/r/20240212210932.3095265-2-oliver.upton@linux.dev Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
Diffstat (limited to 'tools/testing/selftests/kvm/aarch64/arch_timer.c')
-rw-r--r--tools/testing/selftests/kvm/aarch64/arch_timer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/testing/selftests/kvm/aarch64/arch_timer.c b/tools/testing/selftests/kvm/aarch64/arch_timer.c
index d5e8f365aa01..ab4b604d8ec0 100644
--- a/tools/testing/selftests/kvm/aarch64/arch_timer.c
+++ b/tools/testing/selftests/kvm/aarch64/arch_timer.c
@@ -160,7 +160,7 @@ static void guest_validate_irq(unsigned int intid,
__GUEST_ASSERT(xcnt >= cval,
"xcnt = 0x%lx, cval = 0x%lx, xcnt_diff_us = 0x%lx",
xcnt, cval, xcnt_diff_us);
- __GUEST_ASSERT(xctl & CTL_ISTATUS, "xcnt = 0x%lx", xcnt);
+ __GUEST_ASSERT(xctl & CTL_ISTATUS, "xctl = 0x%lx", xctl);
WRITE_ONCE(shared_data->nr_iter, shared_data->nr_iter + 1);
}