The branch, master has been updated
via eb02776cf41 s3:tests: Adapt winbind_call_depth_trace to depth=3
via 26cb20fb7e5 s3:tests: Make winbind_call_depth_trace to use
global_inject.conf
from a2d47e989e9 libcli: Speed up sddl_decode_ace()
https://git.samba.org/?p=samba.git;a=shortlog;h=master
- Log -----------------------------------------------------------------
commit eb02776cf412ac10480547fb60f7feb1a7c6b39c
Author: Pavel Filipenský <[email protected]>
Date: Sat Nov 30 20:52:29 2024 +0100
s3:tests: Adapt winbind_call_depth_trace to depth=3
Signed-off-by: Pavel Filipenský <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
Autobuild-User(master): Pavel Filipensky <[email protected]>
Autobuild-Date(master): Thu Dec 5 15:54:57 UTC 2024 on atb-devel-224
commit 26cb20fb7e553beabf91f81b9133766c277e123e
Author: Pavel Filipenský <[email protected]>
Date: Sat Nov 30 20:49:05 2024 +0100
s3:tests: Make winbind_call_depth_trace to use global_inject.conf
To get the expected traces we need:
debug syslog format = no
log level = 10
Signed-off-by: Pavel Filipenský <[email protected]>
Reviewed-by: Andreas Schneider <[email protected]>
-----------------------------------------------------------------------
Summary of changes:
.../script/tests/test_winbind_call_depth_trace.sh | 43 ++++++----------------
1 file changed, 11 insertions(+), 32 deletions(-)
Changeset truncated at 500 lines:
diff --git a/source3/script/tests/test_winbind_call_depth_trace.sh
b/source3/script/tests/test_winbind_call_depth_trace.sh
index 6d978beca8f..a89dbcc4ae6 100755
--- a/source3/script/tests/test_winbind_call_depth_trace.sh
+++ b/source3/script/tests/test_winbind_call_depth_trace.sh
@@ -34,43 +34,22 @@ EOF
exit 0
fi
-saved_level=1
-
-get_winbind_loglevel()
-{
- s1=$(${SMBCONTROL} "${CONFIGURATION}" winbind debuglevel)
- # We need to get the all level from output like this:
- # "PID 664474: all:1 tdb:1 printdrivers:1 lanman:1 smb:1 rpc_parse:1
rpc_srv:1 rpc_cli:1 passdb:1 sam:1..."
- # 1. remove PID 664474:
- s2=${s1#PID*: }
- # "all:1 tdb:1 printdrivers:1 lanman:1 smb:1 rpc_parse:1 rpc_srv:1
rpc_cli:1 passdb"
- # 2. remove " tdb:1 printdrivers:1 ..."
- s3=${s2%% *}
- # "all:1"
- # 3. remove "all:"
- saved_level=${s3#all:}
-}
-
# Example of trace line
# [2023/01/25 00:20:33.307038, 5, pid=535581, effective(0, 0), real(0, 0),
class=winbind, traceid=78, depth=4]
../../source3/winbindd/wb_group_members.c:310(wb_group_members_send)
test_winbind_call_depth_trace()
{
- get_winbind_loglevel
-
- # If loglevel < 10, set it to 10.
- if [ "$saved_level" -lt 10 ]; then
- ${SMBCONTROL} "${CONFIGURATION}" winbind debug 10
- fi
+ global_inject_conf=$(dirname $SMB_CONF_PATH)/global_inject.conf
+ echo "debug syslog format = no" >$global_inject_conf
+ echo "log level = 10" >>$global_inject_conf
+ ${SMBCONTROL} "${CONFIGURATION}" winbind reload-config
COUNT1=$(grep -c wb_group_members_send "$LOGFILE")
id ADDOMAIN/alice
ret=$?
- # Restore loglevel, if it was changed.
- if [ "$saved_level" -lt 10 ]; then
- ${SMBCONTROL} "${CONFIGURATION}" winbind debug "$saved_level"
- fi
+ echo "" >$global_inject_conf
+ ${SMBCONTROL} "${CONFIGURATION}" winbind reload-config
if [ $ret != 0 ]; then
echo "Command 'id ADDOMAIN/alice' failed!"
@@ -84,17 +63,17 @@ test_winbind_call_depth_trace()
return 1
fi
- # Test that the depth of last line with 'wb_group_members_send' is:
depth=4
- COUNT3=$(grep wb_group_members_send "$LOGFILE" | tail -1 | grep -c
depth=4)
+ # Test that the depth of last line with 'wb_group_members_send' is:
depth=3
+ COUNT3=$(grep wb_group_members_send "$LOGFILE" | tail -1 | grep -c
depth=3)
if [ "$COUNT3" -ne 1 ]; then
- echo "The last line with wb_group_members_send should have
depth=4."
+ echo "The last line with wb_group_members_send should have
depth=3."
return 1
fi
# Test that the indentation of the line below last
'wb_group_members_send' is indented by 2+4*4 spaces:
- COUNT4=$(grep -A1 wb_group_members_send "$LOGFILE" | tail -1| grep -c
'^ WB command group_members start')
+ COUNT4=$(grep 'WB command group_members start' "$LOGFILE" | tail -1|
grep -c '^ WB command group_members start')
if [ "$COUNT4" -ne 1 ]; then
- echo "The line after the last line with wb_group_members_send
should be indented by 18 spaces."
+ echo "The line after the last line with wb_group_members_send
should be indented by 14 spaces."
return 1
fi
--
Samba Shared Repository