diff options
author | liaoyuxiangqin <[email protected]> | 2016-09-30 04:08:44 +0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2016-09-29 13:08:44 -0700 |
commit | 8a1cf1a5608151635b67d89613e51427b177dab0 (patch) | |
tree | 295cc0da1f8e268188842030601c67c7c778f054 /tests/zfs-tests | |
parent | db6597c6ea17ecaeb46423003cc33a79df28b8d7 (diff) |
Fix zfs_clone_010_pos.ksh to verify zfs clones property displays right
Because the macro ZFS_MAXPROPLEN used in function print_dataset
differs between platforms set it appropriately and calculate the expected
number of passes.
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Richard Laager <[email protected]>
Signed-off-by: yuxiang <[email protected]>
Closes #5154
Diffstat (limited to 'tests/zfs-tests')
-rwxr-xr-x | tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh b/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh index 8f405a0a5..f22e3a1f6 100755 --- a/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh +++ b/tests/zfs-tests/tests/functional/cli_root/zfs_clone/zfs_clone_010_pos.ksh @@ -217,16 +217,21 @@ log_note "verify clone list truncated correctly" typeset -i j=200 i=1 fs=$TESTPOOL/$TESTFS1 +if is_linux; then + ZFS_MAXPROPLEN=4096 +else + ZFS_MAXPROPLEN=1024 +fi log_must $ZFS create $fs log_must $ZFS snapshot $fs@snap -while((i < 7)); do +while((i <= $(( $ZFS_MAXPROPLEN/200+1 )))); do log_must $ZFS clone $fs@snap $fs/$TESTCLONE$(python -c 'print "x" * 200').$i ((i=i+1)) ((j=j+200)) done clone_list=$($ZFS list -o clones $fs@snap) char_count=$($ECHO "$clone_list" | $TAIL -1 | wc | $AWK '{print $3}') -[[ $char_count -eq 1024 ]] || \ +[[ $char_count -eq $ZFS_MAXPROPLEN ]] || \ log_fail "Clone list not truncated correctly. Unexpected character count" \ "$char_count" |