* [kvm-unit-tests PATCH] s390x: Fix selftest malloc check
@ 2019-10-23 8:40 Janosch Frank
2019-10-23 8:41 ` David Hildenbrand
0 siblings, 1 reply; 4+ messages in thread
From: Janosch Frank @ 2019-10-23 8:40 UTC (permalink / raw)
To: kvm; +Cc: linux-s390, thuth, david, borntraeger
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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH] s390x: Fix selftest malloc check
2019-10-23 8:40 [kvm-unit-tests PATCH] s390x: Fix selftest malloc check Janosch Frank
@ 2019-10-23 8:41 ` David Hildenbrand
2019-10-23 8:45 ` Janosch Frank
0 siblings, 1 reply; 4+ messages in thread
From: David Hildenbrand @ 2019-10-23 8:41 UTC (permalink / raw)
To: Janosch Frank, kvm; +Cc: linux-s390, thuth, borntraeger
On 23.10.19 10:40, Janosch Frank wrote:
> 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);
>
>
See
https://lore.kernel.org/kvm/CAGG=3QUdVBg5JArMaBcRbBLrHqLLCpAcrtvgT4q1h0V7SHbbEQ@mail.gmail.com/T/
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH] s390x: Fix selftest malloc check
2019-10-23 8:41 ` David Hildenbrand
@ 2019-10-23 8:45 ` Janosch Frank
2019-10-23 8:47 ` David Hildenbrand
0 siblings, 1 reply; 4+ messages in thread
From: Janosch Frank @ 2019-10-23 8:45 UTC (permalink / raw)
To: David Hildenbrand, kvm; +Cc: linux-s390, thuth, borntraeger
[-- Attachment #1.1: Type: text/plain, Size: 1494 bytes --]
On 10/23/19 10:41 AM, David Hildenbrand wrote:
> On 23.10.19 10:40, Janosch Frank wrote:
>> 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);
>>
>>
>
> See
>
> https://lore.kernel.org/kvm/CAGG=3QUdVBg5JArMaBcRbBLrHqLLCpAcrtvgT4q1h0V7SHbbEQ@mail.gmail.com/T/
>
I completely missed that patch and only looked for fixpatches on the
list -_-
If possible CC me if something like this turns up, so I don't have the
CI flashing red lights at me unexpectedly :)
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [kvm-unit-tests PATCH] s390x: Fix selftest malloc check
2019-10-23 8:45 ` Janosch Frank
@ 2019-10-23 8:47 ` David Hildenbrand
0 siblings, 0 replies; 4+ messages in thread
From: David Hildenbrand @ 2019-10-23 8:47 UTC (permalink / raw)
To: Janosch Frank, kvm; +Cc: linux-s390, thuth, borntraeger
On 23.10.19 10:45, Janosch Frank wrote:
> On 10/23/19 10:41 AM, David Hildenbrand wrote:
>> On 23.10.19 10:40, Janosch Frank wrote:
>>> 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);
>>>
>>>
>>
>> See
>>
>> https://lore.kernel.org/kvm/CAGG=3QUdVBg5JArMaBcRbBLrHqLLCpAcrtvgT4q1h0V7SHbbEQ@mail.gmail.com/T/
>>
>
> I completely missed that patch and only looked for fixpatches on the
> list -_-
>
> If possible CC me if something like this turns up, so I don't have the
> CI flashing red lights at me unexpectedly :)
Will do in case I don't forget :)
--
Thanks,
David / dhildenb
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2019-10-23 8:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-23 8:40 [kvm-unit-tests PATCH] s390x: Fix selftest malloc check Janosch Frank
2019-10-23 8:41 ` David Hildenbrand
2019-10-23 8:45 ` Janosch Frank
2019-10-23 8:47 ` David Hildenbrand
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.