summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorGeorge Melikov <[email protected]>2017-04-20 23:05:39 +0400
committerBrian Behlendorf <[email protected]>2017-04-20 12:05:39 -0700
commit3e67c38c3457989fc212bea8361adf9f38a51452 (patch)
tree762d6074f03dbfcc3770929ebd58707340099c1a /tests
parentad7e908ad52b96edf52167670b970483c3c2b95a (diff)
zfs_receive_010_pos: change dd arguments
The `dd` command as written will not create a hole in the file. Additionally, the `stride` argument isn't understood by `dd` so it's replaced with `seek` which isn't equivilant but will result in a single whole which is sufficient for the test case. Finally, `conv=notrunc` is added to avoid truncating the file. Reviewed-by: Brian Behlendorf <[email protected]> Reviewed-by: Giuseppe Di Natale <[email protected]> Signed-off-by: George Melikov <[email protected]> Closes #6023
Diffstat (limited to 'tests')
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_010_pos.ksh4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_010_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_010_pos.ksh
index a9c0a47a3..820e05656 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_010_pos.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_010_pos.ksh
@@ -53,9 +53,9 @@ function make_object
if [[ $type == "file" ]]; then
dd if=/dev/urandom of=${mntpnt}/f$objnum bs=512 count=16
elif [[ $type == "hole1" ]]; then
- dd if=/dev/urandom of=${mntpnt}/fh$objnum bs=512 count=5 stride=4
+ dd if=/dev/zero of=${mntpnt}/fh$objnum bs=512 count=5 seek=4 conv=notrunc
elif [[ $type == "hole2" ]]; then
- dd if=/dev/urandom of=${mntpnt}/fh$objnum bs=512 count=4 stride=5
+ dd if=/dev/zero of=${mntpnt}/fh$objnum bs=512 count=4 seek=5 conv=notrunc
elif [[ $type == "directory" ]]; then
mkdir ${mntpnt}/d$objnum
elif [[ $type == "missing" ]]; then