1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-02-11 09:51:56 +02:00

tests: ensure returns_ check failures are propagated

* tests/misc/cksum-a.sh: Set fail=1 if returns_ check fails.
* tests/misc/sync.sh: Likewise.
* tests/misc/yes.sh: Likewise.
This commit is contained in:
Pádraig Brady
2021-09-16 12:21:16 +01:00
parent 73f8fd760d
commit 814cbd5698
3 changed files with 4 additions and 4 deletions

View File

@@ -47,7 +47,7 @@ while read algo prog; do
done < input_options
compare out out-a || fail=1
returns_ 1 cksum -a bsd --tag </dev/null
returns_ 1 cksum -a bsd --check </dev/null
returns_ 1 cksum -a bsd --tag </dev/null || fail=1
returns_ 1 cksum -a bsd --check </dev/null || fail=1
Exit $fail

View File

@@ -42,7 +42,7 @@ returns_ 1 sync file nofile || fail=1
mkdir norw || framework_failure_
chmod 0 norw || framework_failure_
if ! test -r norw; then
returns_ 1 sync norw 2>errt
returns_ 1 sync norw 2>errt || fail=1
# AIX gives "Is a directory"
sed 's/Is a directory/Permission denied/' <errt >err || framework_failure_
printf "sync: error opening 'norw': Permission denied\n" >exp

View File

@@ -50,7 +50,7 @@ if test -w /dev/full && test -c /dev/full; then
printf '%s\n' "yes: standard output" > exp
for size in 1 16384; do
returns_ 1 yes "$(printf %${size}s '')" >/dev/full 2>errt
returns_ 1 yes "$(printf %${size}s '')" >/dev/full 2>errt || fail=1
sed 's/\(yes:.*\):.*/\1/' errt > err
compare exp err || fail=1
done