From: Pavel Filipenský Date: Sun, 13 Oct 2024 19:57:27 +0000 (+0200) Subject: smbtorture: Allow debugging output to be configured using smb.conf parameters X-Git-Tag: tdb-1.4.13~943 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=a4dea49411fc179ce74afc02ab34df4d8cff9bec;p=thirdparty%2Fsamba.git smbtorture: Allow debugging output to be configured using smb.conf parameters It might be useful to see timestamps for some smbtorture tests. Timestamps can be printed via 'debug syslog format=always'. It can be specified either in smb.conf or directly via smbtorture option -T 'OPTION=VALUE' smb.conf option line However, smbtorture is not evaluating the option. It needs to call reopen_logs()->debug_set_settings() to copy 'Globals.debug_syslog_format' to 'state->settings.debug_syslog_format' $ bin/smbtorture3 //foo/bar -U% LOCAL-G-LOCK4 -d10 -T 'debug syslog format=always' Before: dbwrap_lock_order_unlock: release lock order 3 for /home/pfilipen/ws/projects/samba/smbtorture/st/client/lockdir/g_lock.tdb waited child 2473726 exited with 0 g_lock_lock_retry: watch_recv returned NT_STATUS_OK After (see 1 sec delay): 2024-10-13T21:26:56.476859+00:00 addc.addom.samba.example.com smbtorture[2473806]: dbwrap_lock_order_unlock: release lock order 3 for /home/pfilipen/ws/projects/samba/smbtorture/st/client/lockdir/g_lock.tdb waited child 2473807 exited with 0 2024-10-13T21:26:57.487363+00:00 addc.addom.samba.example.com smbtorture[2473806]: g_lock_lock_retry: watch_recv returned NT_STATUS_OK Signed-off-by: Pavel Filipenský Reviewed-by: Volker Lendecke --- diff --git a/source3/torture/torture.c b/source3/torture/torture.c index 67f1b19b169..36f0d99d911 100644 --- a/source3/torture/torture.c +++ b/source3/torture/torture.c @@ -16550,6 +16550,8 @@ static void usage(void) } } + reopen_logs(); + printf("host=%s share=%s user=%s myname=%s\n", host, share, username, myname);