tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message.
Checks
Context |
Check |
Description |
redhat-pt-bot/TryBot-apply_patch |
success
|
Patch applied to master at the time it was sent
|
redhat-pt-bot/TryBot-32bit |
success
|
Build for i686
|
linaro-tcwg-bot/tcwg_glibc_build--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_build--master-aarch64 |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-arm |
success
|
Testing passed
|
linaro-tcwg-bot/tcwg_glibc_check--master-aarch64 |
success
|
Testing passed
|
Commit Message
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(-)
Comments
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);
* 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
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);
@@ -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);