mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 18:40:43 +03:00
Enable quota_002_pos, quota_004_pos and quota_005_pos
In this test the 'ls -ls' command was used to print testfile size in blocks. Because the environment variable BLOCK_SIZE was set the 'ls -ls' command detected this and output its block count as the number of 8192 blocks. Rather than change the variable name the -k was was added to force ls to return 1k blocks. This has the additional advantage of behaving consistently across platforms. For additional details on GNU 'ls' behavior regarding block size: https://www.gnu.org/software/coreutils/manual/html_node/Block-size.html Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: yuxiang <guo.yong33@zte.com.cn> Closes #5269
This commit is contained in:
committed by
Brian Behlendorf
parent
5f014a0cc4
commit
21237e9167
@@ -60,9 +60,9 @@ function fill_quota
|
||||
[[ $zret -ne $EDQUOT ]] && \
|
||||
log_fail "Returned error code: $zret. Expected: $EDQUOT."
|
||||
|
||||
typeset -i file_size=`$LS -ls $MNTPT/$TESTFILE1 | $AWK '{ print $1 }'`
|
||||
typeset -i file_size=`$LS -lsk $MNTPT/$TESTFILE1 | $AWK '{ print $1 }'`
|
||||
typeset -i limit=0
|
||||
(( file_size = file_size * 512 ))
|
||||
(( file_size = file_size * 1024 ))
|
||||
(( limit = QUOTA_VALUE + TOLERANCE ))
|
||||
(( file_size > limit )) && \
|
||||
log_fail "File was created larger than the quota value, aborting!!!"
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
# 1) Apply quota to the ZFS file system
|
||||
# 2) Exceed the quota
|
||||
# 3) Attempt to write another file
|
||||
# 4) Verify the attempt fails with error code 49 (EDQUOTA)
|
||||
# 4) Verify the attempt fails with error code EDQUOTA (linux 122, others 49)
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
@@ -42,7 +42,7 @@
|
||||
# 1) Apply quota to the ZFS file system dataset
|
||||
# 2) Exceed the quota
|
||||
# 3) Attempt to write another file
|
||||
# 4) Verify the attempt fails with error code 49 (EDQUOTA)
|
||||
# 4) Verify the attempt fails with error code EDQUOTA (linux 122, others 49)
|
||||
#
|
||||
#
|
||||
|
||||
|
||||
Reference in New Issue
Block a user