aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2022-01-09 14:59:35 -0500
committerEryu Guan <guaneryu@gmail.com>2022-01-16 12:20:57 +0800
commitdb4dfa826d7a2533c3038adfc509ab9e33b5b509 (patch)
treef3a08c82110c883d168b4082ac2e680bad3b5b00
parent9100066c20348b662bdfd45419f6a4746b8744a6 (diff)
downloadxfstests-dev-db4dfa826d7a2533c3038adfc509ab9e33b5b509.tar.gz
common/rc: fix _check_xfs_scrub_does_unicode on newer versions of libc-bin
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> Reviewed-by: Darrick J. Wong <djwong@kernel.org> Signed-off-by: Eryu Guan <guaneryu@gmail.com>
-rw-r--r--common/rc2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/rc b/common/rc
index c087875a42..c63add750a 100644
--- a/common/rc
+++ b/common/rc
@@ -4728,7 +4728,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