Skip to content

Commit

Permalink
tests: check for daemon user
Browse files Browse the repository at this point in the history
Some test assume the existence of the user daemon with the uid of 1.
Skip those if the user doesn't exists.
  • Loading branch information
ebfe authored and garlick committed Nov 27, 2018
1 parent ff730b1 commit d3946ca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/misc/t10
@@ -1,5 +1,8 @@
#!/bin/bash -e

# skip if uid 1 doesn't exist
getent passwd 1 >/dev/null 2>&1 || exit 77

TEST=$(basename $0 | cut -d- -f1)
${MISC_SRCDIR}/memcheck ./tnpsrv >$TEST.out 2>&1
diff ${MISC_SRCDIR}/$TEST.exp $TEST.out >$TEST.diff
2 changes: 2 additions & 0 deletions tests/user/runtest
Expand Up @@ -23,6 +23,8 @@ case $(basename $TEST) in
echo "requires non-root" >$TEST.out
exit 77
fi
# requires daemon user
id -u daemon > /dev/null 2>&1 || exit 77
;;
t11|t13|t14)
if [ -n "$FAKEROOTEKEY" ]; then
Expand Down

0 comments on commit d3946ca

Please sign in to comment.