mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Fix zfs_clone_010_pos.ksh to verify the space used by multiple copies
The default blocksize in Linux is 1024 due to a GNU-ism. Setting the expected blocksize resolves the issue. As mentioned in the PR an alternate solution would be to set POSIXLY_CORRECT=1. Reviewed-by: Richard Laager <rlaager@wiktel.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: yuxiang <guo.yong33@zte.com.cn> Closes #5167
This commit is contained in:
parent
9ec0403d6a
commit
f25bc4938d
@ -81,11 +81,11 @@ tests = ['zfs_clone_001_neg', 'zfs_clone_002_pos', 'zfs_clone_003_pos',
|
||||
'zfs_clone_007_pos', 'zfs_clone_008_neg', 'zfs_clone_009_neg']
|
||||
|
||||
# DISABLED:
|
||||
# zfs_copies_002_pos - needs investigation
|
||||
# zfs_copies_003_pos - zpool on zvol
|
||||
# zfs_copies_005_neg - nested pools
|
||||
[tests/functional/cli_root/zfs_copies]
|
||||
tests = ['zfs_copies_001_pos', 'zfs_copies_004_neg', 'zfs_copies_006_pos']
|
||||
tests = ['zfs_copies_001_pos', 'zfs_copies_002_pos', 'zfs_copies_004_neg',
|
||||
'zfs_copies_006_pos']
|
||||
|
||||
[tests/functional/cli_root/zfs_create]
|
||||
tests = ['zfs_create_001_pos', 'zfs_create_002_pos', 'zfs_create_003_pos',
|
||||
|
@ -77,9 +77,14 @@ for val in 1 2 3; do
|
||||
done
|
||||
|
||||
log_note "Verify 'ls -s' can correctly list the space charged."
|
||||
if is_linux; then
|
||||
blksize=1024
|
||||
else
|
||||
blksize=512
|
||||
fi
|
||||
for val in 1 2 3; do
|
||||
blks=`$LS -ls /$TESTPOOL/fs_$val/$FILE | $AWK '{print $1}'`
|
||||
(( used = blks * 512 / (1024 * 1024) ))
|
||||
(( used = blks * $blksize / (1024 * 1024) ))
|
||||
check_used $used $val
|
||||
done
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user