diff options
| author | Jim Meyering <meyering@redhat.com> | 2010-05-28 09:24:15 +0200 |
|---|---|---|
| committer | Jim Meyering <meyering@redhat.com> | 2011-01-22 12:16:42 +0100 |
| commit | 6f85fe2eeb9fbb551cf6f3b2ad86cd1d9d0edebb (patch) | |
| tree | 3b4c0f635e4c519f003ba4338bc5605a41eeeed6 | |
| parent | tests: add a new test for FIEMAP-copy (diff) | |
| download | coreutils-6f85fe2eeb9fbb551cf6f3b2ad86cd1d9d0edebb.tar.gz coreutils-6f85fe2eeb9fbb551cf6f3b2ad86cd1d9d0edebb.zip | |
tests: sparse-fiemap: factor out some set-up
* tests/cp/sparse-fiemap: Cd into test directory sooner.
| -rwxr-xr-x | tests/cp/sparse-fiemap | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/cp/sparse-fiemap b/tests/cp/sparse-fiemap index 945c94b12..21b02acac 100755 --- a/tests/cp/sparse-fiemap +++ b/tests/cp/sparse-fiemap @@ -33,9 +33,10 @@ dd if=/dev/zero of=blob bs=8192 count=1000 || skip=1 mkdir mnt mkfs -t ext4 -F blob || skip_test_ "failed to create ext4 file system" -mount -oloop blob mnt || skip=1 -echo test > mnt/f || skip=1 -test -s mnt/f || skip=1 +mount -oloop blob mnt || skip=1 +cd mnt || skip=1 +echo test > f || skip=1 +test -s f || skip=1 test $skip = 1 && skip_test_ "insufficient mount/ext4 support" @@ -43,7 +44,6 @@ test $skip = 1 && # Create a 1TiB sparse file dd if=/dev/zero of=mnt/sparse bs=1k count=1 seek=1G || framework_failure -cd mnt || fail=1 # It takes many minutes to copy this sparse file using the old method. # By contrast, it takes far less than 1 second using FIEMAP-copy. |
