summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUri Simchoni <uri@samba.org>2016-05-26 22:52:09 +0300
committerJeremy Allison <jra@samba.org>2016-05-27 20:36:06 +0200
commitde2d624d071c338b356824d3b30ab2c9075c8528 (patch)
tree8de2a02e38d3e9e116b65557e8a5b52facdca8ef
parentb5ac30e96ede7a68bc191b983b068b62cbc160ec (diff)
downloadsamba-de2d624d071c338b356824d3b30ab2c9075c8528.tar.gz
selftest: add disk-free quota tests
Add a test for situation where quota accounting is enabled but quota enforcement is disabled (disk-free should not take quota into account) Add a test for situation where overall quota status reporting (whether or not it's enforcing) is not supported - as with NFS. In that case it must be assumed that if quota is configured, then it is also enforced (as with NFS). BUG: https://bugzilla.samba.org/show_bug.cgi?id=11937 Signed-off-by: Uri Simchoni <uri@samba.org> Reviewed-by: Jeremy Allison <jra@samba.org>
-rw-r--r--selftest/knownfail2
-rwxr-xr-xsource3/script/tests/test_dfree_quota.sh12
2 files changed, 14 insertions, 0 deletions
diff --git a/selftest/knownfail b/selftest/knownfail
index 2f2d6bffbae..fd86a9c998f 100644
--- a/selftest/knownfail
+++ b/selftest/knownfail
@@ -330,3 +330,5 @@
# ad_dc requires signing
#
^samba4.smb.signing.*disabled.*signing=off.*\(ad_dc\)
+#new disk-free tests fail the code
+^samba3.blackbox.dfree_quota \(fileserver\).Test dfree share root quota not enforced\(fileserver\)
diff --git a/source3/script/tests/test_dfree_quota.sh b/source3/script/tests/test_dfree_quota.sh
index 25792553fa3..d36530d2d86 100755
--- a/source3/script/tests/test_dfree_quota.sh
+++ b/source3/script/tests/test_dfree_quota.sh
@@ -66,6 +66,12 @@ trygrp2:u$uid:block size = 4096:hard limit = 0:soft limit = 0:cur blocks = 41
trygrp2:g$gid:block size = 4096:hard limit = 60:soft limit = 60:cur blocks = 56
blksize:df:block size = 512:disk free = 614400:disk size = 614400
blksize:u$uid:block size = 1024:hard limit = 512000:soft limit = 0:cur blocks = 0
+notenforce:df:block size = 4096:disk free = 10:disk size = 80
+notenforce:u$uid:block size = 4096:hard limit = 40:soft limit = 40:cur blocks = 37
+notenforce:udflt:block size = 4096:qflags = 0
+nfs:df:block size = 4096:disk free = 10:disk size = 80
+nfs:u$uid:block size = 4096:hard limit = 40:soft limit = 40:cur blocks = 37
+nfs:udflt:nosys = 1
ABC
}
@@ -175,5 +181,11 @@ test_smbclient_dfree "Test quota->dfree no-quota try group" "subdir1" "trygrp2 s
#block size different in quota and df systems
test_smbclient_dfree "Test quota->dfree different block size" "subdir1" "blksize subdir1" "307200 1024. 307200" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1`
+#quota configured but not enforced
+test_smbclient_dfree "Test dfree share root quota not enforced" "." "notenforce ." "320 1024. 40" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1`
+
+#FS quota not implemented (NFS case)
+test_smbclient_dfree "Test dfree share root FS quota not implemented" "." "nfs ." "160 1024. 12" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1`
+
setup_conf
exit $failed