summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorBernhard Voelker <mail@bernhard-voelker.de>2012-08-22 15:04:04 +0200
committerJim Meyering <meyering@redhat.com>2012-08-22 15:45:01 +0200
commitfadf9c525787f063e6fe84bdd5566e53a622c1ce (patch)
treeb1b113b7e2603f431dba408f79f4954545c28baf /tests
parentcf7e1b5b8fb53aef2a9103a32d6ad5ee0b595fa6 (diff)
downloadcoreutils-fadf9c525787f063e6fe84bdd5566e53a622c1ce.tar.xz
tests: correct print_ver_ arguments and add a rule to enforce this
We use print_ver_ to run "PROG --version" for each program under test. Some tests have been derived from others, while the argument(s) to print_ver_ have not been adapted. Add a new cfg.mk rule to prohibit this. * cfg.mk (sc_prohibit_test_calls_print_ver_with_irrelevant_argument): New rule, to prohibit a test script from calling print_env_ for a program not actually used by that test. * tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/ * tests/cp/acl: s/\(print_ver_\) mv/\1 cp/ * tests/cp/capability: s/\(print_ver_\) ls/\1 cp/ * tests/cp/cp-parents: s/(print_ver_\) mv/\1 cp/ * tests/du/bind-mount-dir-cycle: s/(print_ver_\) rm/\1 du/ * tests/misc/wc-parallel: s/(print_ver_\) md5sum/\1 wc/
Diffstat (limited to 'tests')
-rwxr-xr-xtests/chown/basic2
-rwxr-xr-xtests/cp/acl2
-rwxr-xr-xtests/cp/capability2
-rwxr-xr-xtests/cp/cp-parents2
-rwxr-xr-xtests/du/bind-mount-dir-cycle2
-rwxr-xr-xtests/misc/wc-parallel2
6 files changed, 6 insertions, 6 deletions
diff --git a/tests/chown/basic b/tests/chown/basic
index 7c8951c83..6225400e1 100755
--- a/tests/chown/basic
+++ b/tests/chown/basic
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ chgrp
+print_ver_ chown
require_root_
touch f || framework_failure_
diff --git a/tests/cp/acl b/tests/cp/acl
index 26a7f420a..4520fc9c6 100755
--- a/tests/cp/acl
+++ b/tests/cp/acl
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ mv getfacl setfacl
+print_ver_ cp getfacl setfacl
require_acl_
diff --git a/tests/cp/capability b/tests/cp/capability
index 1338c9407..94e5aea16 100755
--- a/tests/cp/capability
+++ b/tests/cp/capability
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ ls
+print_ver_ cp
require_root_
working_umask_or_skip_
diff --git a/tests/cp/cp-parents b/tests/cp/cp-parents
index b325c722b..506e708ac 100755
--- a/tests/cp/cp-parents
+++ b/tests/cp/cp-parents
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ mv
+print_ver_ cp
working_umask_or_skip_
diff --git a/tests/du/bind-mount-dir-cycle b/tests/du/bind-mount-dir-cycle
index 8f9e197f9..516ceae58 100755
--- a/tests/du/bind-mount-dir-cycle
+++ b/tests/du/bind-mount-dir-cycle
@@ -17,7 +17,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ rm
+print_ver_ du
require_root_
cleanup_()
diff --git a/tests/misc/wc-parallel b/tests/misc/wc-parallel
index 074160fd8..6611b47c2 100755
--- a/tests/misc/wc-parallel
+++ b/tests/misc/wc-parallel
@@ -18,7 +18,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
. "${srcdir=.}/init.sh"; path_prepend_ ../src
-print_ver_ md5sum
+print_ver_ wc
(mkdir tmp && cd tmp && seq 2000 | xargs touch)