KVM: selftests: Fix GUEST_PRINTF() format warnings in ARM code
authorSean Christopherson <seanjc@google.com>
Fri, 2 Feb 2024 23:46:03 +0000 (15:46 -0800)
committerOliver Upton <oliver.upton@linux.dev>
Mon, 12 Feb 2024 20:41:49 +0000 (20:41 +0000)
commit06fdd894b473c6cc29c9b39b82e0941cefec4e51
treefd430f5fafe26853bfade7ab8a3bcf12e980cc88
parenta02395d0f3bfa4b2d2a0aa53cc0f2eaeea0e3e66
KVM: selftests: Fix GUEST_PRINTF() format warnings in ARM code

Fix a pile of -Wformat warnings in the KVM ARM selftests code, almost all
of which are benign "long" versus "long long" issues (selftests are 64-bit
only, and the guest printf code treats "ll" the same as "l").  The code
itself isn't problematic, but the warnings make it impossible to build ARM
selftests with -Werror, which does detect real issues from time to time.

Opportunistically have GUEST_ASSERT_BITMAP_REG() interpret set_expected,
which is a bool, as an unsigned decimal value, i.e. have it print '0' or
'1' instead of '0x0' or '0x1'.

Signed-off-by: Sean Christopherson <seanjc@google.com>
Tested-by: Zenghui Yu <yuzenghui@huawei.com>
Link: https://lore.kernel.org/r/20240202234603.366925-1-seanjc@google.com
Signed-off-by: Oliver Upton <oliver.upton@linux.dev>
tools/testing/selftests/kvm/aarch64/arch_timer.c
tools/testing/selftests/kvm/aarch64/debug-exceptions.c
tools/testing/selftests/kvm/aarch64/hypercalls.c
tools/testing/selftests/kvm/aarch64/page_fault_test.c
tools/testing/selftests/kvm/aarch64/vpmu_counter_access.c