diff options
author | Andreas Schneider <asn@samba.org> | 2023-01-23 10:21:33 +0100 |
---|---|---|
committer | Andreas Schneider <asn@cryptomilk.org> | 2023-01-26 14:10:36 +0000 |
commit | fd7187daed85f4ea51762c029ae8ef3fa893b2fb (patch) | |
tree | 69a9ca3be1c383a7670886a2b8e83abc1b0736b1 /source3/script | |
parent | 56c6f0b6d64d29a34659c9af2e4f6ee397b3e0ca (diff) | |
download | samba-fd7187daed85f4ea51762c029ae8ef3fa893b2fb.tar.gz |
s3:tests: Add support for SMBD_DONT_LOG_STDOUT=1 in test_chdir_cache.sh
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15291
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
Diffstat (limited to 'source3/script')
-rwxr-xr-x | source3/script/tests/test_chdir_cache.sh | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/source3/script/tests/test_chdir_cache.sh b/source3/script/tests/test_chdir_cache.sh index c649d2b07b3..11967180d35 100755 --- a/source3/script/tests/test_chdir_cache.sh +++ b/source3/script/tests/test_chdir_cache.sh @@ -9,7 +9,7 @@ if [ $# -lt 5 ]; then echo Usage: test_chdir_user.sh \ - --configfile=SERVERCONFFILE SMBCLIENT SMBCONTROL SERVER SHARE + --configfile=SERVERCONFFILE SMBCLIENT SMBCONTROL SERVER SHARE PREFIX TESTENV exit 1 fi @@ -23,6 +23,12 @@ SERVER=$1 shift 1 SHARE=$1 shift 1 +PREFIX=${1} +shift 1 +TESTENV=${1} +shift 1 + +PREFIX_ABS="$(readlink -f "${PREFIX}")" # Do not let deprecated option warnings muck this up SAMBA_DEPRECATED_SUPPRESS=1 @@ -30,8 +36,6 @@ export SAMBA_DEPRECATED_SUPPRESS conf_dir=$(dirname ${SERVERCONFFILE}) -log_file=${conf_dir}/../smbd_test.log - error_inject_conf=${conf_dir}/error_inject.conf rm -f ${error_inject_conf} @@ -52,6 +56,12 @@ ${SMBCLIENT} //${SERVER}/${SHARE} ${CONF} -U${USER}%${PASSWORD} \ <smbclient-stdin >smbclient-stdout 2>smbclient-stderr & CLIENT_PID=$! +log_file="${PREFIX_ABS}/${TESTENV}/smbd_test.log" +# Add support for "SMBD_DONT_LOG_STDOUT=1" +if [ -r "${PREFIX_ABS}/${TESTENV}/logs/log.smbd" ]; then + log_file="${PREFIX_ABS}/${TESTENV}/logs/log.smbd" +fi + # Count the number of chdir_current_service: vfs_ChDir.*failed: Permission denied # errors that are already in the log (should be zero). num_errs=$(grep "chdir_current_service: vfs_ChDir.*failed: Permission denied" ${log_file} | wc -l) |