1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-04-20 18:56:39 +02:00

tests: avoid false failure on new mv --exchange test

* tests/mv/mv-exchange.sh: Canonicalize different
"operation not supported" messages, so we can ignore correctly.
Reported by Bruno Haible on AIX, NetBSD, and OpenBSD.
This commit is contained in:
Pádraig Brady
2024-03-24 18:30:54 +00:00
parent e0cce6b62a
commit c45fcb2ed2

View File

@@ -23,7 +23,10 @@ print_ver_ mv
# Test exchanging files.
touch a || framework_failure_
mkdir b || framework_failure_
if ! mv -T --exchange a b 2>exchange_err; then
if ! mv -T --exchange a b 2>errt; then
# AIX gives "Unsupported attribute value" (errno 124)
# NetBSD and OpenBSD give "Not supported"
sed 's/Not /not /; s/[Uu]nsupported/not supported/' < errt > exchange_err
grep 'not supported' exchange_err || { cat exchange_err; fail=1; }
else
test -d a || fail=1