[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] tests: correct print_ver_ arguments
From: |
Bernhard Voelker |
Subject: |
[PATCH] tests: correct print_ver_ arguments |
Date: |
Wed, 22 Aug 2012 08:53:22 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120713 Thunderbird/14.0 |
I noticed (too late) that the new tests/du/bind-mount-dir-cycle
calls print_ver_ with rm as argument instead of du.
A little script found other wrong uses, too.
Have a nice day,
Berny
>From cc5ac9fc522533cead606e6496fbe0df76e089af Mon Sep 17 00:00:00 2001
From: Bernhard Voelker <address@hidden>
Date: Wed, 22 Aug 2012 08:48:09 +0200
Subject: [PATCH] tests: correct print_ver_ arguments
Some tests have been derived from other tests while
the argument(s) to print_ver_ have not been adapted.
The following snippet found the wrong ones:
grep print_ver_ $(git ls-files | grep ^tests) \
| sed 's#:print_ver_##' \
| grep -v '\.log' \
| while read a b ; do
for i in $b ; do
grep -q "$i " $a ||
echo Test: $a, args: $b, offending: $i
done
done
* tests/chown/basic: s/\(print_ver_\) chgrp/\1 chown/
* 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/
---
tests/chown/basic | 2 +-
tests/cp/cp-parents | 2 +-
tests/du/bind-mount-dir-cycle | 2 +-
tests/misc/wc-parallel | 2 +-
4 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/tests/chown/basic b/tests/chown/basic
index 7c8951c..6225400 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/cp-parents b/tests/cp/cp-parents
index b325c72..506e708 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 8f9e197..516ceae 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 074160f..6611b47 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)
--
1.7.7
- [PATCH] tests: correct print_ver_ arguments,
Bernhard Voelker <=