# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chgrp --version
- chmod --version
- chown --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { chgrp --version; chmod --version; chown --version; }
chmod -f 0 no-such 2> out && fail=1
chgrp -f 0 no-such 2>> out && fail=1
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure we get English translations.
-
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- getfacl --version
- setfacl --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { mv --version; getfacl --version; setfacl --version; }
+
require_acl_
# Skip this test if cp was built without ACL support:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
-fi
-
-# Ensure that ls sorts the same way for everyone.
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && cp --version
umask 022
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+
require_root_
cwd=`pwd`
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+
very_expensive_
umask 037
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && cp --version
+
require_root_
# Some of the tests expect a umask that grants group and/or world read access.
"$nameless_uid" "$@"
}
-if test "x$VERBOSE" = xyes; then
- set -x
- cp --version
-fi
-
nameless_uid=`$PERL -le 'foreach my $i (1000..16*1024-1) { getpwuid $i or (print $i), exit }'`
nameless_gid1=`$PERL -le 'foreach my $i (1000..16*1024) { getgrgid $i or (print $i), exit }'`
nameless_gid2=`$PERL -le 'foreach my $i ('"$nameless_gid1"'+1..16*1024) { getgrgid $i or (print $i), exit }'`
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ln --version
-fi
-
-# Make sure we get English translations.
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && ln --version
echo foo > a || framework_failure
ln -s . b || framework_failure
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
-fi
-
: ${srcdir=.}
. $srcdir/require-perl
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && ls --version
+
require_root_
nameless_uid=`$PERL -e 'foreach my $i (1000..16*1024) { getpwuid $i or (print "$i\n"), exit }'`
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-if test "$VERBOSE" = yes; then
- set -x
- ls --version
- touch --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { ls --version; touch --version; }
date=1998-01-15
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. $srcdir/test-lib.sh
-require_built_ arch
-
-if test "$VERBOSE" = yes; then
- set -x
- arch --version
-fi
+test "$VERBOSE" = yes && arch --version
+require_built_ arch
arch > out || fail=1
uname -m > exp || fail=1
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-if test "$VERBOSE" = yes; then
- set -x
- env --version
- env -- printenv --version
-fi
-
. $srcdir/test-lib.sh
-
+test "$VERBOSE" = yes && { env --version; env -- printenv --version; }
# POSIX is clear that environ may, but need not be, sorted.
# Environment variable values may contain newlines, which cannot be
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. $srcdir/test-lib.sh
-
-if test "$VERBOSE" = yes; then
- set -x
- md5sum --version
-fi
-
+test "$VERBOSE" = yes && md5sum --version
(mkdir tmp && cd tmp && seq 500 | xargs touch)
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- env -- printenv --version
-fi
-
. $srcdir/test-lib.sh
-
+test "$VERBOSE" = yes && env -- printenv --version
# Without arguments, printenv behaves like env. Some shells provide
# printenv as a builtin, so we must invoke it via "env".
prog="$abs_top_builddir/src/printf"
-if test "$VERBOSE" = yes; then
- set -x
- "$prog" --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && env -- printf --version
+
getlimits_
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-prog="$abs_top_builddir/src/printf"
-
-if test "$VERBOSE" = yes; then
- set -x
- "$prog" --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && env -- printf --version
-
-
-"$prog" '\x7e3\n' > out || fail=1
+env printf '\x7e3\n' > out || fail=1
cat <<\EOF > exp
~3
EOF
prog=printf
-if test "$VERBOSE" = yes; then
- set -x
- env $prog --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && env -- printf --version
+
require_ulimit_
. $srcdir/require-perl
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && env -- pwd --version
+
require_readable_root_
ARGV_0=$0
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- env -- pwd --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && env -- pwd --version
mkdir -p a/b || framework_failure
ln -s a/b c || framework_failure
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- env -- pwd --version
- readlink --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { env -- pwd --version; readlink --version; }
test $host_os != linux-gnu &&
skip_test_ 'vendor getcwd may be inadequate'
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- chcon --version
- cp --version
- ls --version
- mv --version
- stat --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && for i in chcon cp ls mv stat; do $i --version; done
+
require_root_
require_selinux_
skip_if_mcstransd_is_running_
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { stdbuf --version; mv --version; }
+
getlimits_
require_built_ stdbuf
-if test "$VERBOSE" = yes; then
- set -x
- stdbuf --version
-fi
-
# stdbuf fails when the absolute top build dir name contains e.g., space, TAB, NL
lf='
'
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- stty --version
-fi
-
# Make sure there's a tty on stdin.
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && stty --version
+
require_controlling_input_terminal_
trap '' TTOU # Ignore SIGTTOU
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-
-# This script takes no arguments.
-
-if test "$VERBOSE" = yes; then
- set -x
- stty --version
-fi
-
# Setting this envvar to a very small value used to cause e.g., `stty size'
# to generate slightly different output on certain systems.
COLUMNS=80
export LC_ALL
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && stty --version
+
require_controlling_input_terminal_
trap '' TTOU # Ignore SIGTTOU
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. $srcdir/test-lib.sh
-require_built_ su
-
-if test "$VERBOSE" = yes; then
- set -x
- su --version
-fi
+test "$VERBOSE" = yes && su --version
+require_built_ su
# Very little that we can test without a root password
su --- / true # unknown option
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- sum --version
-fi
-
: ${srcdir=.}
. $srcdir/require-perl
export LC_ALL
. $srcdir/test-lib.sh
-
+test "$VERBOSE" = yes && sum --version
# FYI, 16843009 is floor (2^32 / 255).
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- truncate --version
-fi
-
-. $srcdir/envvar-check
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && truncate --version
+
require_root_
group_num=$(id -g $NON_ROOT_USERNAME)
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. $srcdir/test-lib.sh
-
-if test "$VERBOSE" = yes; then
- set -x
- md5sum --version
-fi
-
+test "$VERBOSE" = yes && md5sum --version
(mkdir tmp && cd tmp && seq 2000 | xargs touch)
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
- ginstall --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; ginstall --version; }
# Skip this test if cp was built without xattr support:
touch src dest || framework_failure
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mkdir --version
- mkfifo --version
- mknod --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { mkdir --version; mkfifo --version; mknod --version; }
# Note: on an SELinux/enforcing system running mcstransd older than
# mcstrans-0.2.8-1.fc9, the following commands may mistakenly exit
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- getfacl --version
- setfacl --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { mv --version; getfacl --version; setfacl --version; }
+
require_acl_
# Skip this test if cp was built without ACL support:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
- ln --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; ln --version; }
+
skip_if_root_
mkdir a b c || framework_failure
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
-fi
-
-# Make sure we get English translations.
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && mv --version
touch f1 || framework_failure
touch f2 || framework_failure
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
-fi
-
. $srcdir/test-lib.sh
-skip_if_root_
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+skip_if_root_
for i in cp; do
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- cp --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+
skip_if_root_
mkdir dst || framework_failure
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- cp --version
-fi
-
-
-# Make sure we get English translations.
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+
skip_if_root_
for i in a b c d e f g h; do
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- mv --version
- cp --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
+
cleanup_() { rm -rf "$other_partition_tmpdir"; }
. "$abs_srcdir/other-fs-tmpdir"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-if test "$VERBOSE" = yes; then
- set -x
- cp --version
- mv --version
-fi
-
. $srcdir/test-lib.sh
+test "$VERBOSE" = yes && { cp --version; mv --version; }
echo old > old || framework_failure
touch -d yesterday old || framework_failure
test "$VERBOSE" = yes && rm --version
require_root_
-# If used, these must *follow* test-lib.sh.
cleanup_()
{
# When you take the undesirable shortcut of making /etc/mtab a link