From: Janosch Frank <frankja@linux.ibm.com>
To: kvm@vger.kernel.org
Cc: linux-s390@vger.kernel.org, thuth@redhat.com, david@redhat.com,
borntraeger@de.ibm.com
Subject: [kvm-unit-tests PATCH] s390x: Fix selftest malloc check
Date: Wed, 23 Oct 2019 04:40:17 -0400 [thread overview]
Message-ID: <20191023084017.13142-1-frankja@linux.ibm.com> (raw)
Commit c09c54c ("lib: use an argument which doesn't require default
argument promotion") broke the selftest. Let's fix it by converting
the binary operations to bool.
Signed-off-by: Janosch Frank <frankja@linux.ibm.com>
---
s390x/selftest.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/s390x/selftest.c b/s390x/selftest.c
index f4acdc4..9cd6943 100644
--- a/s390x/selftest.c
+++ b/s390x/selftest.c
@@ -49,9 +49,9 @@ static void test_malloc(void)
*tmp2 = 123456789;
mb();
- report("malloc: got vaddr", (uintptr_t)tmp & 0xf000000000000000ul);
+ report("malloc: got vaddr", !!((uintptr_t)tmp & 0xf000000000000000ul));
report("malloc: access works", *tmp == 123456789);
- report("malloc: got 2nd vaddr", (uintptr_t)tmp2 & 0xf000000000000000ul);
+ report("malloc: got 2nd vaddr", !!((uintptr_t)tmp2 & 0xf000000000000000ul));
report("malloc: access works", (*tmp2 == 123456789));
report("malloc: addresses differ", tmp != tmp2);
--
2.20.1
next reply other threads:[~2019-10-23 8:40 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-23 8:40 Janosch Frank [this message]
2019-10-23 8:41 ` [kvm-unit-tests PATCH] s390x: Fix selftest malloc check David Hildenbrand
2019-10-23 8:45 ` Janosch Frank
2019-10-23 8:47 ` David Hildenbrand
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=20191023084017.13142-1-frankja@linux.ibm.com \
--to=frankja@linux.ibm.com \
--cc=borntraeger@de.ibm.com \
--cc=david@redhat.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