summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2016-01-06 22:22:48 +0100
committerBrian Behlendorf <[email protected]>2016-06-28 13:47:02 -0700
commit47dfff3b86c67c6ae184c2b7166eaa529590c2d2 (patch)
treeea731650ffe4a016c08fb83d2a6f00e6bd6738d4 /tests
parent669cf0ab298dd66e512b37f6c4a42aee2d767b80 (diff)
OpenZFS 2605, 6980, 6902
2605 want to resume interrupted zfs send Reviewed by: George Wilson <[email protected]> Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: Richard Elling <[email protected]> Reviewed by: Xin Li <[email protected]> Reviewed by: Arne Jansen <[email protected]> Approved by: Dan McDonald <[email protected]> Ported-by: kernelOfTruth <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/2605 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/9c3fd12 6980 6902 causes zfs send to break due to 32-bit/64-bit struct mismatch Reviewed by: Paul Dagnelie <[email protected]> Reviewed by: George Wilson <[email protected]> Approved by: Robert Mustacchi <[email protected]> Ported by: Brian Behlendorf <[email protected]> OpenZFS-issue: https://www.illumos.org/issues/6980 OpenZFS-commit: https://github.com/openzfs/openzfs/commit/ea4a67f Porting notes: - All rsend and snapshop tests enabled and updated for Linux. - Fix misuse of input argument in traverse_visitbp(). - Fix ISO C90 warnings and errors. - Fix gcc 'missing braces around initializer' in 'struct send_thread_arg to_arg =' warning. - Replace 4 argument fletcher_4_native() with 3 argument version, this change was made in OpenZFS 4185 which has not been ported. - Part of the sections for 'zfs receive' and 'zfs send' was rewritten and reordered to approximate upstream. - Fix mktree xattr creation, 'user.' prefix required. - Minor fixes to newly enabled test cases - Long holds for volumes allowed during receive for minor registration.
Diffstat (limited to 'tests')
-rw-r--r--tests/runfiles/linux.run58
-rw-r--r--tests/zfs-tests/cmd/mktree/mktree.c2
-rw-r--r--tests/zfs-tests/include/commands.cfg.in3
-rw-r--r--tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am5
-rwxr-xr-xtests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh2
-rw-r--r--tests/zfs-tests/tests/functional/rsend/rsend.kshlib16
-rwxr-xr-xtests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh8
-rwxr-xr-x[-rw-r--r--]tests/zfs-tests/tests/functional/rsend/rsend_014_pos.ksh1
-rwxr-xr-x[-rw-r--r--]tests/zfs-tests/tests/functional/rsend/rsend_019_pos.ksh0
-rwxr-xr-x[-rw-r--r--]tests/zfs-tests/tests/functional/rsend/rsend_020_pos.ksh0
-rwxr-xr-x[-rw-r--r--]tests/zfs-tests/tests/functional/rsend/rsend_021_pos.ksh0
-rwxr-xr-x[-rw-r--r--]tests/zfs-tests/tests/functional/rsend/rsend_022_pos.ksh0
-rwxr-xr-x[-rw-r--r--]tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh0
13 files changed, 52 insertions, 43 deletions
diff --git a/tests/runfiles/linux.run b/tests/runfiles/linux.run
index 003c513dd..e5594cd84 100644
--- a/tests/runfiles/linux.run
+++ b/tests/runfiles/linux.run
@@ -146,14 +146,13 @@ tests = ['zfs_promote_001_pos', 'zfs_promote_002_pos', 'zfs_promote_003_pos',
tests = []
# DISABLED:
-# zfs_receive_003_pos - needs investigation
-# zfs_receive_010_pos - needs investigation
-# zfs_receive_011_pos - needs investigation
-# zfs_receive_012_pos - needs investigation
+# zfs_receive_004_neg - Fails for OpenZFS on illumos
+# zfs_receive_011_pos - Requires port of OpenZFS 6562
+# zfs_receive_012_pos - Requires port of OpenZFS 6562
[tests/functional/cli_root/zfs_receive]
-tests = ['zfs_receive_001_pos', 'zfs_receive_002_pos', 'zfs_receive_005_neg',
- 'zfs_receive_006_pos', 'zfs_receive_007_neg', 'zfs_receive_008_pos',
- 'zfs_receive_009_neg']
+tests = ['zfs_receive_001_pos', 'zfs_receive_002_pos', 'zfs_receive_003_pos',
+ 'zfs_receive_005_neg', 'zfs_receive_006_pos',
+ 'zfs_receive_007_neg', 'zfs_receive_008_pos', 'zfs_receive_009_neg']
# DISABLED:
# zfs_rename_002_pos - needs investigation
@@ -175,11 +174,10 @@ tests = ['zfs_reservation_001_pos', 'zfs_reservation_002_pos']
[tests/functional/cli_root/zfs_rollback]
tests = ['zfs_rollback_003_neg', 'zfs_rollback_004_neg']
-# DISABLED:
-# zfs_send_007_pos - needs investigation
[tests/functional/cli_root/zfs_send]
tests = ['zfs_send_001_pos', 'zfs_send_002_pos', 'zfs_send_003_pos',
- 'zfs_send_004_neg', 'zfs_send_005_pos', 'zfs_send_006_pos']
+ 'zfs_send_004_neg', 'zfs_send_005_pos', 'zfs_send_006_pos',
+ 'zfs_send_007_pos']
# DISABLED:
# mountpoint_003_pos - needs investigation
@@ -207,10 +205,11 @@ tests = ['cache_001_pos', 'cache_002_neg', 'canmount_001_pos',
# DISABLED:
# zfs_snapshot_008_neg - nested pools
+# zfs_snapshot_009_pos - Fails for OpenZFS on illumos
[tests/functional/cli_root/zfs_snapshot]
tests = ['zfs_snapshot_001_neg', 'zfs_snapshot_002_neg',
'zfs_snapshot_003_neg', 'zfs_snapshot_004_neg', 'zfs_snapshot_005_neg',
- 'zfs_snapshot_006_pos', 'zfs_snapshot_007_neg', 'zfs_snapshot_009_pos']
+ 'zfs_snapshot_006_pos', 'zfs_snapshot_007_neg']
# DISABLED:
# zfs_unmount_005_pos - needs investigation
@@ -565,12 +564,17 @@ tests = ['reservation_001_pos', 'reservation_002_pos', 'reservation_003_pos',
#[tests/functional/rootpool]
#tests = ['rootpool_002_neg', 'rootpool_003_neg', 'rootpool_007_neg']
-# DISABLED: Hangs on I/O for unclear reason.
-#[tests/functional/rsend]
-#tests = ['rsend_002_pos', 'rsend_003_pos', 'rsend_004_pos',
-# 'rsend_005_pos', 'rsend_006_pos', 'rsend_007_pos', 'rsend_008_pos',
-# 'rsend_009_pos', 'rsend_010_pos', 'rsend_011_pos', 'rsend_012_pos',
-# 'rsend_013_pos']
+# DISABLED:
+# rsend_008_pos - Fails for OpenZFS on illumos
+# rsend_009_pos - Fails for OpenZFS on illumos
+# rsend_020_pos - ASSERTs in dump_record()
+[tests/functional/rsend]
+tests = ['rsend_001_pos', 'rsend_002_pos', 'rsend_003_pos', 'rsend_004_pos',
+ 'rsend_005_pos', 'rsend_006_pos', 'rsend_007_pos',
+ 'rsend_010_pos', 'rsend_011_pos', 'rsend_012_pos',
+ 'rsend_013_pos', 'rsend_014_pos',
+ 'rsend_019_pos',
+ 'rsend_021_pos', 'rsend_022_pos', 'rsend_024_pos']
[tests/functional/scrub_mirror]
tests = ['scrub_mirror_001_pos', 'scrub_mirror_002_pos',
@@ -586,17 +590,17 @@ tests = ['slog_001_pos', 'slog_002_pos', 'slog_003_pos', 'slog_004_pos',
'slog_009_neg', 'slog_010_neg', 'slog_011_neg']
# DISABLED:
+# clone_001_pos - nested pools
# rollback_003_pos - Hangs in unmount and spins.
-# snapshot_013_pos - Hangs on I/O for unclear reason.
-# snapshot_016_pos - .zfs mv/rmdir/mkdir disabled by default.
-#[tests/functional/snapshot]
-#tests = ['clone_001_pos', 'rollback_001_pos', 'rollback_002_pos',
-# 'snapshot_001_pos', 'snapshot_002_pos',
-# 'snapshot_003_pos', 'snapshot_004_pos', 'snapshot_005_pos',
-# 'snapshot_006_pos', 'snapshot_007_pos', 'snapshot_008_pos',
-# 'snapshot_009_pos', 'snapshot_010_pos', 'snapshot_011_pos',
-# 'snapshot_012_pos', 'snapshot_014_pos',
-# 'snapshot_015_pos', 'snapshot_017_pos']
+# snapshot_016_pos - Problem with automount
+[tests/functional/snapshot]
+tests = ['rollback_001_pos', 'rollback_002_pos',
+ 'snapshot_001_pos', 'snapshot_002_pos',
+ 'snapshot_003_pos', 'snapshot_004_pos', 'snapshot_005_pos',
+ 'snapshot_006_pos', 'snapshot_007_pos', 'snapshot_008_pos',
+ 'snapshot_009_pos', 'snapshot_010_pos', 'snapshot_011_pos',
+ 'snapshot_012_pos', 'snapshot_013_pos', 'snapshot_014_pos',
+ 'snapshot_015_pos', 'snapshot_017_pos']
[tests/functional/snapused]
tests = ['snapused_001_pos', 'snapused_002_pos', 'snapused_003_pos',
'snapused_004_pos', 'snapused_005_pos']
diff --git a/tests/zfs-tests/cmd/mktree/mktree.c b/tests/zfs-tests/cmd/mktree/mktree.c
index 8f9b38578..95d31a652 100644
--- a/tests/zfs-tests/cmd/mktree/mktree.c
+++ b/tests/zfs-tests/cmd/mktree/mktree.c
@@ -172,7 +172,7 @@ crtfile(char *pname)
exit(errno);
}
- if (fsetxattr(fd, "xattr", pbuf, 1024, 0) < 0) {
+ if (fsetxattr(fd, "user.xattr", pbuf, 1024, 0) < 0) {
(void) fprintf(stderr, "fsetxattr(fd, \"xattr\", pbuf, "
"1024, 0) failed.\n[%d]: %s.\n", errno, strerror(errno));
exit(errno);
diff --git a/tests/zfs-tests/include/commands.cfg.in b/tests/zfs-tests/include/commands.cfg.in
index 823ee9679..bea8df629 100644
--- a/tests/zfs-tests/include/commands.cfg.in
+++ b/tests/zfs-tests/include/commands.cfg.in
@@ -85,6 +85,7 @@ export SHARE="@SHARE@"
export SHUF="@SHUF@"
export SLEEP="@SLEEP@"
export SORT="@SORT@"
+export STAT="@STAT@"
export STRINGS="@STRINGS@"
export SU="@SU@"
export SUM="@SUM@"
@@ -97,8 +98,8 @@ export TAIL="@TAIL@"
export TAR="@TAR@"
export TOUCH="@TOUCH@"
export TR="@TR@"
-export TRUE="@TRUE@"
export TRUNCATE="@TRUNCATE@"
+export TRUE="@TRUE@"
export UDEVADM="@UDEVADM@"
export UFSDUMP="@UFSDUMP@"
export UFSRESTORE="@UFSRESTORE@"
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
index 533acc695..f5857f4a4 100644
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_receive/Makefile.am
@@ -10,4 +10,7 @@ dist_pkgdata_SCRIPTS = \
zfs_receive_006_pos.ksh \
zfs_receive_007_neg.ksh \
zfs_receive_008_pos.ksh \
- zfs_receive_009_neg.ksh
+ zfs_receive_009_neg.ksh \
+ zfs_receive_010_pos.ksh \
+ zfs_receive_011_pos.ksh \
+ zfs_receive_012_pos.ksh
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh
index 13ae4f024..308903d97 100755
--- a/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh
+++ b/tests/zfs-tests/tests/functional/cli_root/zfs_send/zfs_send_007_pos.ksh
@@ -61,7 +61,7 @@ test_pool ()
first_object=$(ls -i $mntpnt | awk '{print $1}')
log_must $ZFS snapshot $POOL/fs@a
while true; do
- log_must $FIND $mntpnt -delete
+ log_must $FIND $mntpnt/* -delete
sync
log_must $MKFILES "$mntpnt/" 4000
FILE=$(ls -i $mntpnt | awk \
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
index 91779cc78..4cdf6b731 100644
--- a/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
+++ b/tests/zfs-tests/tests/functional/rsend/rsend.kshlib
@@ -74,9 +74,11 @@ function setup_test_model
if is_global_zone ; then
log_must $ZFS create -V 16M $pool/vol
log_must $ZFS create -V 16M $pool/$FS/vol
+ block_device_wait
log_must $ZFS snapshot $pool/$FS/vol@vsnap
log_must $ZFS clone $pool/$FS/vol@vsnap $pool/$FS/vclone
+ block_device_wait
fi
log_must snapshot_tree $pool/$FS/fs1/fs2@fsnap
@@ -199,10 +201,10 @@ function cmp_ds_prop
typeset dtst1=$1
typeset dtst2=$2
- for item in "type" "origin" "volblocksize" "aclinherit" "aclmode" \
+ for item in "type" "origin" "volblocksize" "aclinherit" "acltype" \
"atime" "canmount" "checksum" "compression" "copies" "devices" \
"dnodesize" "exec" "quota" "readonly" "recordsize" "reservation" \
- "setuid" "sharenfs" "snapdir" "version" "volsize" "xattr" "zoned" \
+ "setuid" "snapdir" "version" "volsize" "xattr" "zoned" \
"mountpoint";
do
$ZFS get -H -o property,value,source $item $dtst1 >> \
@@ -393,7 +395,7 @@ function mk_files
for ((i=0; i<$nfiles; i=i+1)); do
$DD if=/dev/urandom \
of=/$fs/file-$maxsize-$((i+$file_id_offset)) \
- bs=$(($RANDOM * $RANDOM % $maxsize)) \
+ bs=$((($RANDOM * $RANDOM % ($maxsize - 1)) + 1)) \
count=1 >/dev/null 2>&1 || log_fail \
"Failed to create /$fs/file-$maxsize-$((i+$file_id_offset))"
done
@@ -438,7 +440,7 @@ function mess_file
# write the same value that's already there.
#
log_must eval "$DD if=/dev/urandom of=$file conv=notrunc " \
- "bs=1 count=2 oseek=$offset >/dev/null 2>&1"
+ "bs=1 count=2 seek=$offset >/dev/null 2>&1"
else
log_must $TRUNCATE -s $offset $file
fi
@@ -523,20 +525,20 @@ function test_fs_setup
mk_files 100 1048576 0 $sendfs &
mk_files 10 10485760 0 $sendfs &
mk_files 1 104857600 0 $sendfs &
- log_must $WAIT
+ wait
log_must $ZFS snapshot $sendfs@a
rm_files 200 256 0 $sendfs &
rm_files 200 131072 0 $sendfs &
rm_files 20 1048576 0 $sendfs &
rm_files 2 10485760 0 $sendfs &
- log_must $WAIT
+ wait
mk_files 400 256 0 $sendfs &
mk_files 400 131072 0 $sendfs &
mk_files 40 1048576 0 $sendfs &
mk_files 4 10485760 0 $sendfs &
- log_must $WAIT
+ wait
log_must $ZFS snapshot $sendfs@b
log_must eval "$ZFS send -v $sendfs@a >/$sendpool/initial.zsend"
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
index 91cdd6e34..a7698da69 100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_012_pos.ksh
@@ -110,9 +110,6 @@ function cleanup
log_must $ZFS inherit $prop $POOL2
done
- #if is_shared $POOL; then
- # log_must $ZFS set sharenfs=off $POOL
- #fi
log_must setup_test_model $POOL
if [[ -d $TESTDIR ]]; then
@@ -131,7 +128,7 @@ for fs in "$POOL" "$POOL/pclone" "$POOL/$FS" "$POOL/$FS/fs1" \
"$POOL/$FS/fs1/fs2" "$POOL/$FS/fs1/fclone" ; do
rand_set_prop $fs aclinherit "discard" "noallow" "secure" "passthrough"
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
- rand_set_prop $fs aclmode "discard" "groupmask" "passthrough"
+ rand_set_prop $fs acltype "off" "noacl" "posixacl"
rand_set_prop $fs atime "on" "off"
rand_set_prop $fs checksum "on" "off" "fletcher2" "fletcher4" "sha256"
rand_set_prop $fs compression "on" "off" "lzjb" "gzip" \
@@ -161,7 +158,8 @@ done
# Verify inherited property can be received
-rand_set_prop $POOL sharenfs "on" "off" "rw"
+rand_set_prop $POOL redundant_metadata "all" "most"
+rand_set_prop $POOL sync "standard" "always" "disabled"
#
# Duplicate POOL2 for testing
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_014_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_014_pos.ksh
index b6cbb1c63..68576816c 100644..100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_014_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_014_pos.ksh
@@ -46,6 +46,7 @@ log_must cleanup_pool $POOL2
log_must eval "$ZFS send -R $POOL/$FS@final > $BACKDIR/fs-final-R"
log_must eval "$ZFS receive -d $POOL2 < $BACKDIR/fs-final-R"
+block_device_wait
log_must eval "$ZPOOL export $POOL"
log_must eval "$ZPOOL import $POOL"
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_019_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_019_pos.ksh
index 26f475ea4..26f475ea4 100644..100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_019_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_019_pos.ksh
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_020_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_020_pos.ksh
index 43cf34591..43cf34591 100644..100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_020_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_020_pos.ksh
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_021_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_021_pos.ksh
index 37901213e..37901213e 100644..100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_021_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_021_pos.ksh
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_022_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_022_pos.ksh
index fd06b06fd..fd06b06fd 100644..100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_022_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_022_pos.ksh
diff --git a/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh b/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
index 2f8f3f77d..2f8f3f77d 100644..100755
--- a/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh
+++ b/tests/zfs-tests/tests/functional/rsend/rsend_024_pos.ksh