summaryrefslogtreecommitdiff
path: root/tests/chown
diff options
context:
space:
mode:
Diffstat (limited to 'tests/chown')
-rwxr-xr-xtests/chown/basic12
-rwxr-xr-xtests/chown/deref2
-rwxr-xr-xtests/chown/preserve-root8
-rwxr-xr-xtests/chown/separator8
4 files changed, 15 insertions, 15 deletions
diff --git a/tests/chown/basic b/tests/chown/basic
index 98145dac1..7c8951c83 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -25,12 +25,12 @@ touch f || framework_failure_
chown -R --preserve-root 0:1 f
# Make sure the owner and group are 0 and 1 respectively.
-set _ `ls -n f`; shift; test "$3:$4" = 0:1 || fail=1
+set _ $(ls -n f); shift; test "$3:$4" = 0:1 || fail=1
# Make sure the correct diagnostic is output
# Note we output a name even though an id was specified.
chown -v --from=42 43 f > out || fail=1
-printf "ownership of 'f' retained as `id -nu`\n" > exp
+printf "ownership of 'f' retained as $(id -nu)\n" > exp
compare exp out || fail=1
# Ensure diagnostics work for non existent files.
@@ -41,19 +41,19 @@ compare exp out || fail=1
chown --from=0:1 2:010 f || fail=1
# And now they should be 2 and 10 respectively.
-set _ `ls -n f`; shift; test "$3:$4" = 2:10 || fail=1
+set _ $(ls -n f); shift; test "$3:$4" = 2:10 || fail=1
ln -s f slink
# Applying chown to a symlink with --no-dereference
# should change only the link.
chown --no-dereference 0:1 slink || fail=1
# owner/group on the symlink should be set
-set _ `ls -n slink`; shift; test "$3:$4" = 0:1 || fail=1
+set _ $(ls -n slink); shift; test "$3:$4" = 0:1 || fail=1
# owner/group on the referent should remain unchanged
-set _ `ls -n f`; shift; test "$3:$4" = 2:10 || fail=1
+set _ $(ls -n f); shift; test "$3:$4" = 2:10 || fail=1
chown --no-dereference --from=0:1 2:010 slink || fail=1
# owner/group on the symlink should be changed
-set _ `ls -n slink`; shift; test "$3:$4" = 2:10 || fail=1
+set _ $(ls -n slink); shift; test "$3:$4" = 2:10 || fail=1
Exit $fail
diff --git a/tests/chown/deref b/tests/chown/deref
index 9ba28062e..d42a05412 100755
--- a/tests/chown/deref
+++ b/tests/chown/deref
@@ -23,7 +23,7 @@ print_ver_ chown
ln -s no-such dangle || framework_failure_
-set _ `ls -ldo dangle`; shift; user=$3
+set _ $(ls -ldo dangle); shift; user=$3
# With 5.2.1 and earlier, this command would mistakenly succeed.
chown --dereference $user dangle 2> out1 && fail=1
diff --git a/tests/chown/preserve-root b/tests/chown/preserve-root
index a9145b7ab..ffad22228 100755
--- a/tests/chown/preserve-root
+++ b/tests/chown/preserve-root
@@ -38,13 +38,13 @@ chmod -R --preserve-root u+r / >> out 2>&1 && fail=1
# since the symlink in question is not a command line argument.
# Contrary to the above commands, these two should succeed.
echo '==== test -RHh' >> out
-chown -RHh --preserve-root `id -u` d >> out 2>&1 || fail=1
-chgrp -RHh --preserve-root `id -g` d >> out 2>&1 || fail=1
+chown -RHh --preserve-root $(id -u) d >> out 2>&1 || fail=1
+chgrp -RHh --preserve-root $(id -g) d >> out 2>&1 || fail=1
# These must fail.
echo '==== test -RLh' >> out
-chown -RLh --preserve-root `id -u` d >> out 2>&1 && fail=1
-chgrp -RLh --preserve-root `id -g` d >> out 2>&1 && fail=1
+chown -RLh --preserve-root $(id -u) d >> out 2>&1 && fail=1
+chgrp -RLh --preserve-root $(id -g) d >> out 2>&1 && fail=1
cat <<\EOF > exp || fail=1
chown: it is dangerous to operate recursively on '/'
diff --git a/tests/chown/separator b/tests/chown/separator
index 6295fd78f..d4264a8c8 100755
--- a/tests/chown/separator
+++ b/tests/chown/separator
@@ -19,16 +19,16 @@
. "${srcdir=.}/init.sh"; path_prepend_ ../src
print_ver_ chown
-id_u=`id -u` || framework_failure_
+id_u=$(id -u) || framework_failure_
test -n "$id_u" || framework_failure_
-id_un=`id -un` || framework_failure_
+id_un=$(id -un) || framework_failure_
test -n "$id_un" || framework_failure_
-id_g=`id -g` || framework_failure_
+id_g=$(id -g) || framework_failure_
test -n "$id_g" || framework_failure_
-id_gn=`id -gn` || framework_failure_
+id_gn=$(id -gn) || framework_failure_
test -n "$id_gn" || framework_failure_
# FreeBSD 6.x's getgrnam fails to look up a group name containing