From: Andreas Schneider Date: Thu, 22 Dec 2022 09:36:02 +0000 (+0100) Subject: s3:script: Improve test_chdir_cache.sh X-Git-Tag: samba-4.16.9~31 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=eeeb1a476f60b55f27083cdbe51c540ed4d86cc6;p=thirdparty%2Fsamba.git s3:script: Improve test_chdir_cache.sh BUG: https://bugzilla.samba.org/show_bug.cgi?id=15268 Signed-off-by: Andreas Schneider Reviewed-by: Ralph Boehme (cherry picked from commit 0d1961267cd9e8f1158a407c5d135514c363f37e) --- diff --git a/source3/script/tests/test_chdir_cache.sh b/source3/script/tests/test_chdir_cache.sh index ae244acdd58..c649d2b07b3 100755 --- a/source3/script/tests/test_chdir_cache.sh +++ b/source3/script/tests/test_chdir_cache.sh @@ -33,7 +33,7 @@ conf_dir=$(dirname ${SERVERCONFFILE}) log_file=${conf_dir}/../smbd_test.log error_inject_conf=${conf_dir}/error_inject.conf ->${error_inject_conf} +rm -f ${error_inject_conf} incdir=$(dirname $0)/../../../testprogs/blackbox . $incdir/subunit.sh @@ -80,7 +80,9 @@ head -n 4 <&101 # Ensure any chdir will give EACCESS. echo "error_inject:chdir = EACCES" >${error_inject_conf} -${SMBCONTROL} ${CONF} 0 reload-config +testit "reload config 1" \ + "${SMBCONTROL}" "${CONF}" smbd reload-config || + failed=$((failed + 1)) sleep 1 @@ -94,8 +96,10 @@ kill ${CLIENT_PID} rm -f smbclient-stdin smbclient-stdout smbclient-stderr # Remove the chdir inject. ->${error_inject_conf} -${SMBCONTROL} ${CONF} 0 reload-config +rm -f ${error_inject_conf} +testit "reload config 2" \ + "${SMBCONTROL}" "${CONF}" smbd reload-config || + failed=$((failed + 1)) # Now look for chdir_current_service: vfs_ChDir.*failed: Permission denied # in the smb log. There should be one more than before.