From: Janosch Frank <frankja@linux.ibm.com>
To: Christian Borntraeger <borntraeger@de.ibm.com>,
Janosch Frank <frankja@linux.vnet.ibm.com>
Cc: KVM <kvm@vger.kernel.org>, Cornelia Huck <cohuck@redhat.com>,
David Hildenbrand <david@redhat.com>,
linux-s390 <linux-s390@vger.kernel.org>,
Thomas Huth <thuth@redhat.com>, Andrew Jones <drjones@redhat.com>
Subject: Re: [PATCH 2/2] selftests: KVM: s390: fix format strings for access reg test
Date: Wed, 11 Mar 2020 15:03:47 +0100 [thread overview]
Message-ID: <6c8ac2c1-a4c3-41be-6e9c-0c82f2d7a59d@linux.ibm.com> (raw)
In-Reply-To: <20200311131056.140016-3-borntraeger@de.ibm.com>
[-- Attachment #1.1: Type: text/plain, Size: 1784 bytes --]
On 3/11/20 2:10 PM, Christian Borntraeger wrote:
> acrs are 32 bit and not 64 bit.
>
> Reported-by: Andrew Jones <drjones@redhat.com>
> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Acked-by: Janosch Frank <frankja@linux.ibm.com>
> ---
> tools/testing/selftests/kvm/s390x/sync_regs_test.c | 11 +++++++++--
> 1 file changed, 9 insertions(+), 2 deletions(-)
>
> diff --git a/tools/testing/selftests/kvm/s390x/sync_regs_test.c b/tools/testing/selftests/kvm/s390x/sync_regs_test.c
> index b705637ca14b..70a56580042b 100644
> --- a/tools/testing/selftests/kvm/s390x/sync_regs_test.c
> +++ b/tools/testing/selftests/kvm/s390x/sync_regs_test.c
> @@ -42,6 +42,13 @@ static void guest_code(void)
> " values did not match: 0x%llx, 0x%llx\n", \
> left->reg, right->reg)
>
> +#define REG_COMPARE32(reg) \
> + TEST_ASSERT(left->reg == right->reg, \
> + "Register " #reg \
> + " values did not match: 0x%x, 0x%x\n", \
> + left->reg, right->reg)
> +
> +
One \n too much?
> static void compare_regs(struct kvm_regs *left, struct kvm_sync_regs *right)
> {
> int i;
> @@ -55,7 +62,7 @@ static void compare_sregs(struct kvm_sregs *left, struct kvm_sync_regs *right)
> int i;
>
> for (i = 0; i < 16; i++)
> - REG_COMPARE(acrs[i]);
> + REG_COMPARE32(acrs[i]);
>
> for (i = 0; i < 16; i++)
> REG_COMPARE(crs[i]);
> @@ -155,7 +162,7 @@ int main(int argc, char *argv[])
> "r11 sync regs value incorrect 0x%llx.",
> run->s.regs.gprs[11]);
> TEST_ASSERT(run->s.regs.acrs[0] == 1 << 11,
> - "acr0 sync regs value incorrect 0x%llx.",
> + "acr0 sync regs value incorrect 0x%x.",
> run->s.regs.acrs[0]);
>
> vcpu_regs_get(vm, VCPU_ID, ®s);
>
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2020-03-11 14:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-11 13:10 [PATCH 0/2] format string fixups for selftests Christian Borntraeger
2020-03-11 13:10 ` [PATCH 1/2] selftests: KVM: s390: fixup fprintf format error in reset.c Christian Borntraeger
2020-03-11 14:02 ` Janosch Frank
2020-03-11 13:10 ` [PATCH 2/2] selftests: KVM: s390: fix format strings for access reg test Christian Borntraeger
2020-03-11 14:03 ` Janosch Frank [this message]
2020-03-11 14:07 ` Christian Borntraeger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6c8ac2c1-a4c3-41be-6e9c-0c82f2d7a59d@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=cohuck@redhat.com \
--cc=david@redhat.com \
--cc=drjones@redhat.com \
--cc=frankja@linux.vnet.ibm.com \
--cc=kvm@vger.kernel.org \
--cc=linux-s390@vger.kernel.org \
--cc=thuth@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox