From f77c6c8be6b19880fb46fb5524a39cea03ef7bd5 Mon Sep 17 00:00:00 2001 From: Christof Schmitt Date: Tue, 13 Aug 2019 13:44:52 -0700 Subject: [PATCH] selftest: Add test for quota query on directory with SGID Signed-off-by: Christof Schmitt Reviewed-by: Volker Lendecke --- source3/script/tests/test_dfree_quota.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/source3/script/tests/test_dfree_quota.sh b/source3/script/tests/test_dfree_quota.sh index 444a6684942..cfba4a9173f 100755 --- a/source3/script/tests/test_dfree_quota.sh +++ b/source3/script/tests/test_dfree_quota.sh @@ -76,6 +76,9 @@ nfs:udflt:nosys = 1 confdfqp:df:block size = 4096:disk free = 10:disk size = 80 confdfqp:u$uid1:block size = 4096:hard limit = 40:soft limit = 40:cur blocks = 36 confdfqp:u$uid2:block size = 4096:hard limit = 41:soft limit = 41:cur blocks = 36 +sgid:stat:sgid = 98765 +sgid:u$uid:block size = 4096:hard limit = 0:soft limit = 0:cur blocks = 80 +sgid:g98765:block size = 4096:hard limit = 50:soft limit = 50:cur blocks = 40 ABC } @@ -227,6 +230,12 @@ test_smbclient_dfree "Test quota->dfree inode hard limit" dfq "subdir1" "ihlimit test_smbclient_dfree "Test quota->dfree err try group" dfq "subdir1" "trygrp1 subdir1" "240 1024. 20" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1` test_smbclient_dfree "Test quota->dfree no-quota try group" dfq "subdir1" "trygrp2 subdir1" "240 1024. 16" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1` +# sgid on directory +test_smbclient_dfree "Test quota on sgid directory" dfq "subdir1" \ + "sgid subdir1" "200 1024. 40" -U$USERNAME%$PASSWORD \ + --option=clientmaxprotocol=SMB3 \ + || failed=`expr $failed + 1` + #block size different in quota and df systems test_smbclient_dfree "Test quota->dfree different block size" dfq "subdir1" "blksize subdir1" "307200 1024. 307200" -U$USERNAME%$PASSWORD --option=clientmaxprotocol=SMB3 || failed=`expr $failed + 1` -- 2.47.2