# Nothing can read (much less write) that many bytes in so little time.
timeout 10 cp f f2 || fail=1
+# Ensure that the sparse file copied through fiemap has the same size
+# in bytes as the original.
+test $(stat --printf %s sparse) = $(stat --printf %s fiemap) || fail=1
+
Exit $fail
#!/bin/sh
# Test cp --sparse=always through fiemap copy
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
skip_test_ "insufficient mount/ext4 support"
fi
-# Create a 1TiB sparse file
-dd if=/dev/zero of=sparse bs=1k count=1 seek=1G || framework_failure
-
-# 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.
-timeout 10 cp --sparse=always sparse fiemap || fail=1
-
-# Ensure that the sparse file copied through fiemap has the same size
-# in bytes as the original.
-test $(stat --printf %s sparse) = $(stat --printf %s fiemap) || fail=1
-
# =================================================
# Ensure that we exercise the FIEMAP-copying code enough
# to provoke at least two iterations of the do...while loop