From a3fa3845e14e60e791121a89985a72a651e397e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Zaoral?= Date: Thu, 19 Mar 2026 10:18:15 +0100 Subject: [PATCH] fix df/direct.sh and unexpand/mb.sh tests Resolves: RHEL-151532 --- coreutils-df-direct.patch | 23 ++++++++++++++---- coreutils-i18n.patch | 51 ++++++++++++++++++++------------------- coreutils.spec | 5 +++- 3 files changed, 48 insertions(+), 31 deletions(-) diff --git a/coreutils-df-direct.patch b/coreutils-df-direct.patch index f29a065..1e66ec3 100644 --- a/coreutils-df-direct.patch +++ b/coreutils-df-direct.patch @@ -1,4 +1,4 @@ -From f072852456c545bd89296bc88cf59ccd63287a68 Mon Sep 17 00:00:00 2001 +From aa90ab6dc623541693df454e8a15d433c29c996e Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 29 Mar 2010 17:20:34 +0000 Subject: [PATCH] coreutils-df-direct.patch @@ -7,7 +7,8 @@ Subject: [PATCH] coreutils-df-direct.patch doc/coreutils.texi | 7 ++++++ src/df.c | 34 ++++++++++++++++++++++++++-- tests/df/direct.sh | 55 ++++++++++++++++++++++++++++++++++++++++++++++ - 3 files changed, 94 insertions(+), 2 deletions(-) + tests/local.mk | 1 + + 4 files changed, 95 insertions(+), 2 deletions(-) create mode 100755 tests/df/direct.sh diff --git a/doc/coreutils.texi b/doc/coreutils.texi @@ -123,7 +124,7 @@ index 994f0e3..ceee209 100644 if (posix_format) diff --git a/tests/df/direct.sh b/tests/df/direct.sh new file mode 100755 -index 0000000..8e4cfb8 +index 0000000..8373705 --- /dev/null +++ b/tests/df/direct.sh @@ -0,0 +1,55 @@ @@ -145,7 +146,7 @@ index 0000000..8e4cfb8 +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . + -+. "${srcdir=.}/init.sh"; path_prepend_ ../src ++. "${srcdir=.}/tests/init.sh"; path_prepend_ ./src +print_ver_ df + +df || skip_ "df fails" @@ -182,6 +183,18 @@ index 0000000..8e4cfb8 +compare file_out file_exp || fail=1 + +Exit $fail +diff --git a/tests/local.mk b/tests/local.mk +index fdbf369..c213100 100644 +--- a/tests/local.mk ++++ b/tests/local.mk +@@ -544,6 +544,7 @@ all_tests = \ + tests/df/no-mtab-status.sh \ + tests/df/skip-duplicates.sh \ + tests/df/skip-rootfs.sh \ ++ tests/df/direct.sh \ + tests/dd/ascii.sh \ + tests/dd/direct.sh \ + tests/dd/misc.sh \ -- -2.44.0 +2.53.0 diff --git a/coreutils-i18n.patch b/coreutils-i18n.patch index c73fde2..cc6295b 100644 --- a/coreutils-i18n.patch +++ b/coreutils-i18n.patch @@ -1,4 +1,4 @@ -From a54e632beb3a3f1f980103deea1cf9a8bdd164ac Mon Sep 17 00:00:00 2001 +From cc12563d7081e507b2fb815430c6db8610afb018 Mon Sep 17 00:00:00 2001 From: rpm-build Date: Wed, 30 Aug 2023 17:19:58 +0200 Subject: [PATCH] coreutils-i18n.patch @@ -17,7 +17,7 @@ Subject: [PATCH] coreutils-i18n.patch src/expand-common.c | 114 ++++++ src/expand-common.h | 12 + src/expand.c | 90 +++- - src/fold.c | 311 ++++++++++++-- + src/fold.c | 312 ++++++++++++-- src/local.mk | 4 +- src/pr.c | 443 ++++++++++++++++++-- src/sort.c | 792 +++++++++++++++++++++++++++++++++--- @@ -33,8 +33,8 @@ Subject: [PATCH] coreutils-i18n.patch tests/pr/pr-tests.pl | 49 +++ tests/sort/sort-merge.pl | 42 ++ tests/sort/sort.pl | 40 +- - tests/unexpand/mb.sh | 172 ++++++++ - 30 files changed, 3604 insertions(+), 196 deletions(-) + tests/unexpand/mb.sh | 173 ++++++++ + 30 files changed, 3606 insertions(+), 196 deletions(-) create mode 100644 lib/mbchar.c create mode 100644 lib/mbchar.h create mode 100644 lib/mbfile.c @@ -1820,7 +1820,7 @@ index a6176a9..60b1b8e 100644 } diff --git a/src/fold.c b/src/fold.c -index 941ad11..bdc466d 100644 +index 941ad11..2b11981 100644 --- a/src/fold.c +++ b/src/fold.c @@ -23,10 +23,32 @@ @@ -2196,7 +2196,7 @@ index 941ad11..bdc466d 100644 if (STREQ (filename, "-")) clearerr (istream); else if (fclose (istream) != 0 && !saved_errno) -@@ -251,7 +499,8 @@ main (int argc, char **argv) +@@ -251,7 +500,8 @@ main (int argc, char **argv) atexit (close_stdout); @@ -2206,7 +2206,7 @@ index 941ad11..bdc466d 100644 while ((optc = getopt_long (argc, argv, shortopts, longopts, nullptr)) != -1) { -@@ -260,7 +509,15 @@ main (int argc, char **argv) +@@ -260,7 +510,15 @@ main (int argc, char **argv) switch (optc) { case 'b': /* Count bytes rather than columns. */ @@ -4308,7 +4308,7 @@ index 18e7bea..24a141b 100644 warn "$program_name: $test_name: test name is too long (> $max)\n"; diff --git a/tests/expand/mb.sh b/tests/expand/mb.sh new file mode 100644 -index 0000000..dd6007c +index 0000000..6d6497a --- /dev/null +++ b/tests/expand/mb.sh @@ -0,0 +1,183 @@ @@ -4494,7 +4494,7 @@ index 0000000..dd6007c +LC_ALL=C expand in1 in1 > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 + -+exit $fail ++Exit $fail diff --git a/tests/i18n/sort.sh b/tests/i18n/sort.sh new file mode 100644 index 0000000..26c95de @@ -4531,7 +4531,7 @@ index 0000000..26c95de + +Exit $fail diff --git a/tests/local.mk b/tests/local.mk -index fdbf369..a6ce49c 100644 +index c213100..a828e7f 100644 --- a/tests/local.mk +++ b/tests/local.mk @@ -387,6 +387,8 @@ all_tests = \ @@ -4543,7 +4543,7 @@ index fdbf369..a6ce49c 100644 tests/sort/sort-h-thousands-sep.sh \ tests/sort/sort-merge.pl \ tests/sort/sort-merge-fdlimit.sh \ -@@ -590,6 +592,7 @@ all_tests = \ +@@ -591,6 +593,7 @@ all_tests = \ tests/du/threshold.sh \ tests/du/trailing-slash.sh \ tests/du/two-args.sh \ @@ -4551,7 +4551,7 @@ index fdbf369..a6ce49c 100644 tests/id/gnu-zero-uids.sh \ tests/id/no-context.sh \ tests/id/context.sh \ -@@ -746,6 +749,7 @@ all_tests = \ +@@ -747,6 +750,7 @@ all_tests = \ tests/touch/read-only.sh \ tests/touch/relative.sh \ tests/touch/trailing-slash.sh \ @@ -5006,10 +5006,10 @@ index d49f65f..ebba925 100755 my $verbose = $ENV{VERBOSE}; diff --git a/tests/unexpand/mb.sh b/tests/unexpand/mb.sh new file mode 100644 -index 0000000..8a82d74 +index 0000000..f64542e --- /dev/null +++ b/tests/unexpand/mb.sh -@@ -0,0 +1,172 @@ +@@ -0,0 +1,173 @@ +#!/bin/sh + +# Copyright (C) 2012-2015 Free Software Foundation, Inc. @@ -5086,7 +5086,7 @@ index 0000000..8a82d74 +e\t|ascii(1) +\u00E9\t|composed(1) +e\u0301\t|decomposed(1) -+\u3000\t|ideo-space(2) ++\t|ideo-space(2) +\uFF0D\t|full-hypen(2) +' > exp || framework_failure_ + @@ -5108,7 +5108,7 @@ index 0000000..8a82d74 +ä\xFF | + ä\xFF| +\xFF ä| -+äbcdef\xFF | ++äbcde\xFF | +' > in || framework_failure_ + +env printf '12345678 @@ -5118,7 +5118,7 @@ index 0000000..8a82d74 +ä\xFF\t| +\tä\xFF| +\xFF\tä| -+äbcdef\xFF\t| ++äbcde\xFF\t| +' > exp || framework_failure_ + +unexpand -a < in > out || fail=1 @@ -5134,7 +5134,6 @@ index 0000000..8a82d74 +. . . . + äöü . öüä. ä xx +EOF -+env printf ' äöü\t. öüä. \tä xx\n' >> in || framework_failure_ + +printf "\xEF\xBB\xBF" > exp; cat <<\EOF >> exp || framework_failure_ +1234567812345678123456781 @@ -5146,13 +5145,13 @@ index 0000000..8a82d74 + äöü . öüä. ä xx +EOF + -+unexpand < in > out || fail=1 ++unexpand -a < in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 + -+LANG=C unexpand < in > out || fail=1 ++LANG=C unexpand -a < in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 + -+LC_ALL=C unexpand < in > out || fail=1 ++LC_ALL=C unexpand -a < in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 + + @@ -5174,14 +5173,16 @@ index 0000000..8a82d74 +EOF + + -+unexpand in in > out || fail=1 ++unexpand -a in in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 + -+LANG=C unexpand in in > out || fail=1 ++LANG=C unexpand -a in in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 + -+LC_ALL=C unexpand in in > out || fail=1 ++LC_ALL=C unexpand -a in in > out || fail=1 +compare exp out > /dev/null 2>&1 || fail=1 ++ ++Exit $fail -- -2.46.1 +2.53.0 diff --git a/coreutils.spec b/coreutils.spec index 1d4a664..df11162 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 9.5 -Release: 7%{?dist} +Release: 8%{?dist} # some used parts of gnulib are under various variants of LGPL License: GPL-3.0-or-later AND GFDL-1.3-no-invariants-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later Url: https://www.gnu.org/software/coreutils/ @@ -273,6 +273,9 @@ rm -f $RPM_BUILD_ROOT%{_infodir}/dir %license COPYING %changelog +* Thu Mar 19 2026 Lukáš Zaoral - 9.5-8 +- fix df/direct.sh and unexpand/mb.sh tests (RHEL-151532) + * Thu Jan 15 2026 Lukáš Zaoral - 9.5-7 - fold: fix processing of malformed UTF-8 sequences (RHEL-140116)