Message ID | 20231019123559.3922193-1-stli@linux.ibm.com |
---|---|
State | New |
Headers | show |
Series | tst-spawn-cgroup.c: Fix argument order of UNSUPPORTED message. | expand |
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);
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);