summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorWayne Davison <wayne@opencoder.net>2020-07-13 12:59:22 -0700
committerWayne Davison <wayne@opencoder.net>2020-07-13 12:59:22 -0700
commit883de22c29a6e24a9fbf75524fe427dc078db51e (patch)
tree8fc39d8a846703088d844eb72040b24b98fe6cf1 /testsuite
parent18f500a7a4fa8d9d437343ccf5863e8e72a9d717 (diff)
downloadrsync-883de22c29a6e24a9fbf75524fe427dc078db51e.tar.gz
Avoid a test failure if `id` didn't work.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/rsync.fns6
1 files changed, 3 insertions, 3 deletions
diff --git a/testsuite/rsync.fns b/testsuite/rsync.fns
index 023a8e19..fb1721f3 100644
--- a/testsuite/rsync.fns
+++ b/testsuite/rsync.fns
@@ -102,7 +102,7 @@ rsync_ls_lR() {
}
get_testuid() {
- uid=`id -u 2>/dev/null`
+ uid=`id -u 2>/dev/null || true`
case "$uid" in
[0-9]*) echo "$uid" ;;
*) id 2>/dev/null | sed 's/^[^0-9]*\([0-9][0-9]*\).*/\1/' ;;
@@ -110,7 +110,7 @@ get_testuid() {
}
get_rootuid() {
- uid=`id -u root 2>/dev/null`
+ uid=`id -u root 2>/dev/null || true`
case "$uid" in
[0-9]*) echo "$uid" ;;
*) echo 0 ;;
@@ -118,7 +118,7 @@ get_rootuid() {
}
get_rootgid() {
- gid=`id -g root 2>/dev/null`
+ gid=`id -g root 2>/dev/null || true`
case "$gid" in
[0-9]*) echo "$gid" ;;
*) echo 0 ;;