* [PATCH] tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message.
@ 2023-10-19 12:35 Stefan Liebler
2023-10-19 13:36 ` Adhemerval Zanella Netto
2023-10-19 13:39 ` Florian Weimer
0 siblings, 2 replies; 4+ messages in thread
From: Stefan Liebler @ 2023-10-19 12:35 UTC (permalink / raw)
To: libc-alpha; +Cc: Stefan Liebler
The arguments for "expected" and "got" are mismatched. Furthermore
this patch is dumping both values as hex.
---
sysdeps/unix/sysv/linux/tst-spawn-cgroup.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c b/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
index 84e24696eb..a9843aeb89 100644
--- a/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
+++ b/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
@@ -136,9 +136,9 @@ create_new_cgroup (char **newcgroup)
}
if (!F_TYPE_EQUAL (fs.f_type, CGROUP2_SUPER_MAGIC))
- FAIL_UNSUPPORTED ("%s is not a cgroupv2 (expected %jx, got %jd)",
- CGROUPFS, (intmax_t) fs.f_type,
- (intmax_t) CGROUP2_SUPER_MAGIC);
+ FAIL_UNSUPPORTED ("%s is not a cgroupv2 (expected 0x%jx, got 0x%jx)",
+ CGROUPFS, (intmax_t) CGROUP2_SUPER_MAGIC,
+ (intmax_t) fs.f_type);
char *cgroup = get_cgroup ();
TEST_VERIFY_EXIT (cgroup != NULL);
--
2.41.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message.
2023-10-19 12:35 [PATCH] tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message Stefan Liebler
@ 2023-10-19 13:36 ` Adhemerval Zanella Netto
2023-10-20 6:48 ` Stefan Liebler
2023-10-19 13:39 ` Florian Weimer
1 sibling, 1 reply; 4+ messages in thread
From: Adhemerval Zanella Netto @ 2023-10-19 13:36 UTC (permalink / raw)
To: libc-alpha, Stefan Liebler
On 19/10/23 09:35, Stefan Liebler wrote:
> The arguments for "expected" and "got" are mismatched. Furthermore
> this patch is dumping both values as hex.
LGTM, thanks.
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
> ---
> sysdeps/unix/sysv/linux/tst-spawn-cgroup.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c b/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
> index 84e24696eb..a9843aeb89 100644
> --- a/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
> +++ b/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
> @@ -136,9 +136,9 @@ create_new_cgroup (char **newcgroup)
> }
>
> if (!F_TYPE_EQUAL (fs.f_type, CGROUP2_SUPER_MAGIC))
> - FAIL_UNSUPPORTED ("%s is not a cgroupv2 (expected %jx, got %jd)",
> - CGROUPFS, (intmax_t) fs.f_type,
> - (intmax_t) CGROUP2_SUPER_MAGIC);
> + FAIL_UNSUPPORTED ("%s is not a cgroupv2 (expected 0x%jx, got 0x%jx)",
You can use %#jx instead.
> + CGROUPFS, (intmax_t) CGROUP2_SUPER_MAGIC,
> + (intmax_t) fs.f_type);
>
> char *cgroup = get_cgroup ();
> TEST_VERIFY_EXIT (cgroup != NULL);
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message.
2023-10-19 12:35 [PATCH] tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message Stefan Liebler
2023-10-19 13:36 ` Adhemerval Zanella Netto
@ 2023-10-19 13:39 ` Florian Weimer
1 sibling, 0 replies; 4+ messages in thread
From: Florian Weimer @ 2023-10-19 13:39 UTC (permalink / raw)
To: Stefan Liebler; +Cc: libc-alpha
* Stefan Liebler:
> The arguments for "expected" and "got" are mismatched. Furthermore
> this patch is dumping both values as hex.
> ---
> sysdeps/unix/sysv/linux/tst-spawn-cgroup.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c b/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
> index 84e24696eb..a9843aeb89 100644
> --- a/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
> +++ b/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
> @@ -136,9 +136,9 @@ create_new_cgroup (char **newcgroup)
> }
>
> if (!F_TYPE_EQUAL (fs.f_type, CGROUP2_SUPER_MAGIC))
> - FAIL_UNSUPPORTED ("%s is not a cgroupv2 (expected %jx, got %jd)",
> - CGROUPFS, (intmax_t) fs.f_type,
> - (intmax_t) CGROUP2_SUPER_MAGIC);
> + FAIL_UNSUPPORTED ("%s is not a cgroupv2 (expected 0x%jx, got 0x%jx)",
> + CGROUPFS, (intmax_t) CGROUP2_SUPER_MAGIC,
> + (intmax_t) fs.f_type);
>
> char *cgroup = get_cgroup ();
> TEST_VERIFY_EXIT (cgroup != NULL);
Looks okay.
Reviewed-by: Florian Weimer <fweimer@redhat.com>
Thanks,
Florian
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message.
2023-10-19 13:36 ` Adhemerval Zanella Netto
@ 2023-10-20 6:48 ` Stefan Liebler
0 siblings, 0 replies; 4+ messages in thread
From: Stefan Liebler @ 2023-10-20 6:48 UTC (permalink / raw)
To: Adhemerval Zanella Netto, libc-alpha, Florian Weimer
On 19.10.23 15:36, Adhemerval Zanella Netto wrote:
>
>
> On 19/10/23 09:35, Stefan Liebler wrote:
>> The arguments for "expected" and "got" are mismatched. Furthermore
>> this patch is dumping both values as hex.
>
> LGTM, thanks.
>
> Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
>
>> ---
>> sysdeps/unix/sysv/linux/tst-spawn-cgroup.c | 6 +++---
>> 1 file changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c b/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
>> index 84e24696eb..a9843aeb89 100644
>> --- a/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
>> +++ b/sysdeps/unix/sysv/linux/tst-spawn-cgroup.c
>> @@ -136,9 +136,9 @@ create_new_cgroup (char **newcgroup)
>> }
>>
>> if (!F_TYPE_EQUAL (fs.f_type, CGROUP2_SUPER_MAGIC))
>> - FAIL_UNSUPPORTED ("%s is not a cgroupv2 (expected %jx, got %jd)",
>> - CGROUPFS, (intmax_t) fs.f_type,
>> - (intmax_t) CGROUP2_SUPER_MAGIC);
>> + FAIL_UNSUPPORTED ("%s is not a cgroupv2 (expected 0x%jx, got 0x%jx)",
>
> You can use %#jx instead.
>
Thanks Adhemerval, Florian for your review.
I've just committed it with %#jx.
Bye
Stefan
>> + CGROUPFS, (intmax_t) CGROUP2_SUPER_MAGIC,
>> + (intmax_t) fs.f_type);
>>
>> char *cgroup = get_cgroup ();
>> TEST_VERIFY_EXIT (cgroup != NULL);
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2023-10-20 6:48 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-19 12:35 [PATCH] tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message Stefan Liebler
2023-10-19 13:36 ` Adhemerval Zanella Netto
2023-10-20 6:48 ` Stefan Liebler
2023-10-19 13:39 ` Florian Weimer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).