On 27/08/2023 17:31, Bruno Haible wrote:
On Cygwin 2.9.0/x86_64, I see 8 ERROR and 30 FAIL:
ERROR: tests/tail/inotify-hash-abuse
ERROR: tests/rm/rm-readdir-fail
ERROR: tests/cp/nfs-removal-race
ERROR: tests/df/no-mtab-status
ERROR: tests/df/skip-duplicates
ERROR: tests/du/inodes
ERROR: tests/ls/getxattr-speedup
ERROR: tests/rmdir/ignore
FAIL: tests/rm/cycle
FAIL: tests/chmod/no-x
FAIL: tests/rm/fail-eacces
FAIL: tests/rm/inaccessible
FAIL: tests/rm/rm1
FAIL: tests/rm/rm2
FAIL: tests/chgrp/no-x
FAIL: tests/env/env
FAIL: tests/cksum/b2sum
FAIL: tests/cksum/md5sum-bsd
FAIL: tests/misc/paste
FAIL: tests/shred/shred-remove
FAIL: tests/cksum/sm3sum
FAIL: tests/misc/tee
FAIL: tests/timeout/timeout-group
FAIL: tests/cp/fail-perm
FAIL: tests/cp/preserve-mode
FAIL: tests/df/df-symlink
FAIL: tests/dd/direct
FAIL: tests/du/inacc-dest
FAIL: tests/du/no-x
FAIL: tests/mv/force
FAIL: tests/mv/into-self-4
FAIL: tests/mv/perm-1
FAIL: tests/readlink/can-e
FAIL: tests/readlink/can-f
FAIL: tests/readlink/can-m
FAIL: tests/readlink/multi
FAIL: tests/tail/follow-stdin
FAIL: tests/tail/pipe-f
The cksum failures are regressions,
which should be handled by the two attached patches.
cheers,
Pádraig
From f4e2e2bb577829b3c68f1ed18884ff00f9def819 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Sun, 27 Aug 2023 19:52:13 +0100
Subject: [PATCH] cksum: adjust tests and docs to binary mode handling
Following commit v9.3-80-g5e1e0993b which makes cksum
match the output of the standalone utilities...
* doc/coreutils.texi (cksum output modes): Remove the mention
that cksum never outputs a binary indicator, as that's no longer the
case.
* tests/cksum/b2sum.sh: Avoid outputting a binary indicator.
* tests/cksum/sm3sum.pl: Likewise.
---
doc/coreutils.texi | 3 +--
tests/cksum/b2sum.sh | 3 +--
tests/cksum/sm3sum.pl | 2 +-
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index 638fffd0f..14d9ba5e6 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -4046,8 +4046,7 @@ For each @var{file}, we print the checksum, a space, a flag indicating
binary or text input mode, and the file name.
Binary mode is indicated with @samp{*}, text mode with @samp{ } (space).
Binary mode is the default on systems where it's significant,
-otherwise text mode is the default. The @command{cksum} command always
-uses binary mode and a @samp{ } (space) flag.
+otherwise text mode is the default.
@end table
diff --git a/tests/cksum/b2sum.sh b/tests/cksum/b2sum.sh
index 7013b4972..475faa2bc 100755
--- a/tests/cksum/b2sum.sh
+++ b/tests/cksum/b2sum.sh
@@ -41,9 +41,8 @@ $prog --strict -c openssl.b2sum || fail=1
rm -f check.vals || framework_failure_
# Ensure we can check non tagged format
[ "$prog" != 'b2sum' ] && tag_opt='--untagged' || tag_opt=''
-[ "$prog" == 'b2sum' ] && text_opt='--text' || text_opt=''
for l in 0 128; do
- $prog $tag_opt $text_opt -l $l /dev/null | tee -a check.vals > check.b2sum
+ $prog $tag_opt --text -l $l /dev/null | tee -a check.vals > check.b2sum
$prog -l $l --strict -c check.b2sum || fail=1
$prog --strict -c check.b2sum || fail=1
done
diff --git a/tests/cksum/sm3sum.pl b/tests/cksum/sm3sum.pl
index 3872fface..6356ae4aa 100755
--- a/tests/cksum/sm3sum.pl
+++ b/tests/cksum/sm3sum.pl
@@ -45,7 +45,7 @@ my @Tests =
my $t;
foreach $t (@Tests)
{
- splice @$t, 1, 0, '--untagged -a sm3'
+ splice @$t, 1, 0, '--untagged --text -a sm3'
}
my $save_temps = $ENV{DEBUG};
--
2.41.0
From b3afbcad9ca68863ea3c049f7d5ce0860d07f260 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?P=C3=A1draig=20Brady?= <p...@draigbrady.com>
Date: Sun, 27 Aug 2023 20:22:32 +0100
Subject: [PATCH] tests: avoid false failure on cygwin
* tests/cksum/md5sum-bsd.sh: Avoid part of test dealing with backslashes
in file names, on systems where backslash is a directory separator.
Issue reported by Bruno Haible on cygwin.
---
tests/cksum/md5sum-bsd.sh | 48 ++++++++++++++++++++-------------------
1 file changed, 25 insertions(+), 23 deletions(-)
diff --git a/tests/cksum/md5sum-bsd.sh b/tests/cksum/md5sum-bsd.sh
index 1581b8ac8..2c7cd4d4f 100755
--- a/tests/cksum/md5sum-bsd.sh
+++ b/tests/cksum/md5sum-bsd.sh
@@ -70,30 +70,32 @@ for i in 'a' ' b' '*c' 'dd' ' '; do
done
md5sum --strict -c check.md5 || fail=1
-# Ensure we can --check BSD traditional format we produce
-# with the GNU extension of escaped newlines
-nl='
+if : > 'backslash\is\not\dir\sep'; then
+ # Ensure we can --check BSD traditional format we produce
+ # with the GNU extension of escaped newlines
+ nl='
'
-t=' '
-rm check.md5
-for i in 'a\b' 'a\' '\a' "a${nl}b" "a${t}b"; do
- : > "$i"
- md5sum --tag "$i" >> check.md5 || fail=1
-done
-md5sum --strict -c check.md5 > out || fail=1
-printf '%s: OK\n' '\a\\b' '\a\\' '\\\a' '\a\nb' "a${t}b" > exp ||
- framework_failure_
-compare exp out || fail=1
-
-
-# Ensure BSD traditional format with GNU extension escapes
-# is in the expected format
-ex_file='test
+ t=' '
+ rm check.md5
+ for i in 'a\b' 'a\' '\a' "a${nl}b" "a${t}b"; do
+ : > "$i"
+ md5sum --tag "$i" >> check.md5 || fail=1
+ done
+ md5sum --strict -c check.md5 > out || fail=1
+ printf '%s: OK\n' '\a\\b' '\a\\' '\\\a' '\a\nb' "a${t}b" > exp ||
+ framework_failure_
+ compare exp out || fail=1
+
+
+ # Ensure BSD traditional format with GNU extension escapes
+ # is in the expected format
+ ex_file='test
\\file'
-ex_output='\MD5 (test\n\\\\file) = d41d8cd98f00b204e9800998ecf8427e'
-touch "$ex_file"
-printf "%s\n" "$ex_output" > exp
-md5sum --tag "$ex_file" > out || fail=1
-compare exp out || fail=1
+ ex_output='\MD5 (test\n\\\\file) = d41d8cd98f00b204e9800998ecf8427e'
+ touch "$ex_file"
+ printf "%s\n" "$ex_output" > exp
+ md5sum --tag "$ex_file" > out || fail=1
+ compare exp out || fail=1
+fi
Exit $fail
--
2.41.0