* [PATCH] common/rc: fix _check_xfs_scrub_does_unicode on newer versions of libc-bin
@ 2022-01-09 19:59 Theodore Ts'o
2022-01-10 17:29 ` Darrick J. Wong
0 siblings, 1 reply; 2+ messages in thread
From: Theodore Ts'o @ 2022-01-09 19:59 UTC (permalink / raw)
To: fstests; +Cc: Theodore Ts'o
Debian 10 uses ldd from glibc 2.28, where as Debian 11 uses ldd from
glibc 2.31. Sometime between glibc 2.28 and 2.31, ldd has been
changed so that the message "not a dynamic executable" is sent stderr,
where before it was sent to stdout. As a result, it caused
regressions for tests such as generic/453 which uses
_check_xfs_scurb_does_unicode:
generic/453 5s ... [22:42:03] [22:42:08]- output mismatch (see /results/xfs/results-4k/generic/453.out.bad)
--- tests/generic/453.out 2022-01-08 15:15:15.000000000 -0500
+++ /results/xfs/results-4k/generic/453.out.bad 2022-01-08 22:42:08.596982251 -0500
@@ -4,3 +4,4 @@
Test files
Uniqueness of inodes?
Test XFS online scrub, if applicable
+ not a dynamic executable
...
Fix this by sending stderr from ldd to /dev/null. This is not a
perfect solution, since it means that even if xfs_scrub was compiled
with libicui18n, we will skip the online scrub portion of generic/453.
However, this fixes the regression when runtime OS is changed from
Debian Buster to Debian Bullseye when xfsprogs is built statically.
In the long run, it would be nice if we could determine whether
xfs_scrub has unicode support without using ldd --- perhaps by
signally this in the output of xfs_scrub -V --- but we'll need to
discuss this with the xfsprogs maintainers.
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
---
common/rc | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/rc b/common/rc
index 87b9b69b..add6170c 100644
--- a/common/rc
+++ b/common/rc
@@ -4909,7 +4909,7 @@ _check_xfs_scrub_does_unicode() {
# We only care if xfs_scrub has unicode string support...
if ! type ldd > /dev/null 2>&1 || \
- ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then
+ ! ldd "${XFS_SCRUB_PROG}" 2> /dev/null | grep -q libicui18n; then
return 1
fi
--
2.31.0
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [PATCH] common/rc: fix _check_xfs_scrub_does_unicode on newer versions of libc-bin
2022-01-09 19:59 [PATCH] common/rc: fix _check_xfs_scrub_does_unicode on newer versions of libc-bin Theodore Ts'o
@ 2022-01-10 17:29 ` Darrick J. Wong
0 siblings, 0 replies; 2+ messages in thread
From: Darrick J. Wong @ 2022-01-10 17:29 UTC (permalink / raw)
To: Theodore Ts'o; +Cc: fstests
On Sun, Jan 09, 2022 at 02:59:35PM -0500, Theodore Ts'o wrote:
> Debian 10 uses ldd from glibc 2.28, where as Debian 11 uses ldd from
> glibc 2.31. Sometime between glibc 2.28 and 2.31, ldd has been
> changed so that the message "not a dynamic executable" is sent stderr,
> where before it was sent to stdout. As a result, it caused
> regressions for tests such as generic/453 which uses
> _check_xfs_scurb_does_unicode:
>
> generic/453 5s ... [22:42:03] [22:42:08]- output mismatch (see /results/xfs/results-4k/generic/453.out.bad)
> --- tests/generic/453.out 2022-01-08 15:15:15.000000000 -0500
> +++ /results/xfs/results-4k/generic/453.out.bad 2022-01-08 22:42:08.596982251 -0500
> @@ -4,3 +4,4 @@
> Test files
> Uniqueness of inodes?
> Test XFS online scrub, if applicable
> + not a dynamic executable
> ...
>
> Fix this by sending stderr from ldd to /dev/null. This is not a
> perfect solution, since it means that even if xfs_scrub was compiled
> with libicui18n, we will skip the online scrub portion of generic/453.
> However, this fixes the regression when runtime OS is changed from
> Debian Buster to Debian Bullseye when xfsprogs is built statically.
>
> In the long run, it would be nice if we could determine whether
> xfs_scrub has unicode support without using ldd --- perhaps by
> signally this in the output of xfs_scrub -V --- but we'll need to
> discuss this with the xfsprogs maintainers.
Hm, yeah, I suppose we could improve the way xfs_scrub reports its own
capabilities. I'll work on that, though in the mean time I think you
can detect it via...
strings $XFS_SCRUB_PROG | grep -q 'Unicode name.*%s'
> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
In the meantime, this at least shuts up the false fail, so
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
--D
> ---
> common/rc | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/common/rc b/common/rc
> index 87b9b69b..add6170c 100644
> --- a/common/rc
> +++ b/common/rc
> @@ -4909,7 +4909,7 @@ _check_xfs_scrub_does_unicode() {
>
> # We only care if xfs_scrub has unicode string support...
> if ! type ldd > /dev/null 2>&1 || \
> - ! ldd "${XFS_SCRUB_PROG}" | grep -q libicui18n; then
> + ! ldd "${XFS_SCRUB_PROG}" 2> /dev/null | grep -q libicui18n; then
> return 1
> fi
>
> --
> 2.31.0
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-01-10 17:29 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-01-09 19:59 [PATCH] common/rc: fix _check_xfs_scrub_does_unicode on newer versions of libc-bin Theodore Ts'o
2022-01-10 17:29 ` Darrick J. Wong
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox