Skip to contentSkip to conversation

KVM: selftests: Print timer ctl register in ISTATUS assertion

PATCH Applied Oliver Upton 2 participants 3 messages Feb 12, 2024 – Feb 13, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 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.

---

Applies to kvmarm/next.

 tools/testing/selftests/kvm/aarch64/arch_timer.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/testing/selftests/kvm/aarch64/arch_timer.c +1 -1
index d5e8f365aa01..ab4b604d8ec0 100644
@@ -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);
 }

base-commit: 680f749c272378a796388a3244bab53b5a952d67

Signature · 1 line
2.43.0.687.g38aa6559b0-goog
Reviewed-by on v1 1/1
#1 lore raw
Quoted 9 lines · Oliver Upton

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.

author Applied
#2 lore raw
In reply to Oliver Upton
Quoted 8 lines · Oliver Upton

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.

[...]

Applied to kvmarm/next, thanks!

[1/1] KVM: selftests: Print timer ctl register in ISTATUS assertion

      https://git.kernel.org/kvmarm/kvmarm/c/8cdc71fbf655

--
Best,
Oliver