summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPádraig Brady <P@draigBrady.com>2013-09-22 02:49:40 +0100
committerPádraig Brady <P@draigBrady.com>2013-09-22 02:51:37 +0100
commitf4f4568d8c48afa1997213311801ba81a7b65dbc (patch)
tree6e4ce5f3d8b0227839c2949a90b967edb7b6c27e /tests
parent2a0d241f69f7f3f5b826656a97f9bafb20bd8711 (diff)
downloadcoreutils-f4f4568d8c48afa1997213311801ba81a7b65dbc.tar.xz
tests: avoid a failure when there isn't a name for all user IDs
* tests/misc/id-zero.sh: Don't check exit status when in -n mode. Prompted by the continuous integration build failure at: http://hydra.nixos.org/build/6196762
Diffstat (limited to 'tests')
-rwxr-xr-xtests/misc/id-zero.sh6
1 files changed, 4 insertions, 2 deletions
diff --git a/tests/misc/id-zero.sh b/tests/misc/id-zero.sh
index cef5672fc..61a2c07ce 100755
--- a/tests/misc/id-zero.sh
+++ b/tests/misc/id-zero.sh
@@ -49,8 +49,10 @@ while read u ; do
for n in '' n ; do
printf '%s: ' "id -${o}${n}[z] $u" >> exp || framework_failure_
printf '\n%s: ' "id -${o}${n}[z] $u" >> out || framework_failure_
- id -${o}${n} $u >> exp || fail=1
- id -${o}${n}z $u > tmp || fail=1
+ # There may be no name corresponding to an id, so don't check
+ # exit status when in name lookup mode
+ id -${o}${n} $u >> exp || { test -z "$n" && fail=1; }
+ id -${o}${n}z $u > tmp || { test -z "$n" && fail=1; }
head -c-1 < tmp >> out || framework_failure_
done
done