summaryrefslogtreecommitdiff
path: root/tests/dd
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-10-30 10:50:21 +0100
committerJim Meyering <meyering@redhat.com>2009-10-30 12:50:12 +0100
commit3c88587b2eadee11413f4207abbbf13af07c438d (patch)
tree79d45c03b5c6ba2520eeeb236170dbafef49fac7 /tests/dd
parent12a0a583f6fe3303bd9dfb30de4a5fe46e8e486f (diff)
downloadcoreutils-3c88587b2eadee11413f4207abbbf13af07c438d.tar.xz
tests: factor 350 fail=0 initializations into test-lib.sh
Run this command to remove the factored-out "fail=0" lines. perl -ni -e '/^fail=0$/ or print' $(g grep -l '^fail=0$') * tests/test-lib.sh: Initialize fail=0 here, not in 300+ scripts. * tests/...: nearly all bourne shell scripts Suggested by Eric Blake.
Diffstat (limited to 'tests/dd')
-rwxr-xr-xtests/dd/direct1
-rwxr-xr-xtests/dd/misc1
-rwxr-xr-xtests/dd/not-rewound1
-rwxr-xr-xtests/dd/reblock1
-rwxr-xr-xtests/dd/skip-seek-past-dev1
-rwxr-xr-xtests/dd/skip-seek-past-file1
-rwxr-xr-xtests/dd/skip-seek21
-rwxr-xr-xtests/dd/stderr1
-rwxr-xr-xtests/dd/unblock-sync1
9 files changed, 0 insertions, 9 deletions
diff --git a/tests/dd/direct b/tests/dd/direct
index 7e80bee15..05c487f6f 100755
--- a/tests/dd/direct
+++ b/tests/dd/direct
@@ -31,7 +31,6 @@ truncate -s 511 short || framework_failure
truncate -s 8191 m1 || framework_failure
truncate -s 8193 p1 || framework_failure
-fail=0
for i in short m1 p1; do
rm -f out
dd if=$i oflag=direct of=out || fail=1
diff --git a/tests/dd/misc b/tests/dd/misc
index 07a019a49..53562d1dd 100755
--- a/tests/dd/misc
+++ b/tests/dd/misc
@@ -29,7 +29,6 @@ tmp_in2=dd-in2.$$
tmp_sym=dd-sym.$$
tmp_out=dd-out.$$
-fail=0
warn=0
echo data > $tmp_in || framework_failure
ln $tmp_in $tmp_in2 || framework_failure
diff --git a/tests/dd/not-rewound b/tests/dd/not-rewound
index 056d961cd..101e37564 100755
--- a/tests/dd/not-rewound
+++ b/tests/dd/not-rewound
@@ -24,7 +24,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
echo abcde > in
(dd skip=1 count=1 bs=1; dd skip=1 bs=1) < in > out 2> /dev/null || fail=1
diff --git a/tests/dd/reblock b/tests/dd/reblock
index 5d6e95b1f..244345a4a 100755
--- a/tests/dd/reblock
+++ b/tests/dd/reblock
@@ -37,7 +37,6 @@ cat <<\EOF > exp-no-reblock || framework_failure
4 bytes (4 B) copied
EOF
-fail=0
# Use a fifo rather than a pipe in the tests below
# so that the producer (printf subshell) will wait
diff --git a/tests/dd/skip-seek-past-dev b/tests/dd/skip-seek-past-dev
index c9abfc01f..f11542a2d 100755
--- a/tests/dd/skip-seek-past-dev
+++ b/tests/dd/skip-seek-past-dev
@@ -33,7 +33,6 @@ get_device_size() {
$BLOCKDEV --getsize64 "$1"
}
-fail=0
# Get path to device the current dir is on.
# Note df can only get fs size, not device size.
diff --git a/tests/dd/skip-seek-past-file b/tests/dd/skip-seek-past-file
index 937f99e17..6bbf505f5 100755
--- a/tests/dd/skip-seek-past-file
+++ b/tests/dd/skip-seek-past-file
@@ -25,7 +25,6 @@ fi
require_sparse_support_ # for `truncate --size=$OFF_T_MAX`
eval $(getlimits) # for OFF_T limits
-fail=0
printf "1234" > file || framework_failure
diff --git a/tests/dd/skip-seek2 b/tests/dd/skip-seek2
index 8bf0c851d..ce57b6b24 100755
--- a/tests/dd/skip-seek2
+++ b/tests/dd/skip-seek2
@@ -24,7 +24,6 @@ fi
. $srcdir/test-lib.sh
-fail=0
echo LA:3456789abcdef > in || fail=1
(dd bs=1 skip=3 count=0 && dd bs=5) < in > out 2> /dev/null || fail=1
diff --git a/tests/dd/stderr b/tests/dd/stderr
index a6c8fba4e..5c903c8d5 100755
--- a/tests/dd/stderr
+++ b/tests/dd/stderr
@@ -25,7 +25,6 @@ fi
p=$abs_top_builddir
-fail=0
# Ensure this exits successfully, even though stderr is closed,
# because it generates no stderr output.
diff --git a/tests/dd/unblock-sync b/tests/dd/unblock-sync
index 4112e0e28..4b213c1f9 100755
--- a/tests/dd/unblock-sync
+++ b/tests/dd/unblock-sync
@@ -25,7 +25,6 @@ fi
printf 000100020003xx > in || framework_failure
-fail=0
dd cbs=4 ibs=4 conv=unblock,sync < in > out 2> /dev/null || fail=1
cat <<\EOF > exp || fail=1