selftest: Allow to set the 'log level' for clients
authorAndreas Schneider <asn@samba.org>
Wed, 31 Mar 2021 13:24:20 +0000 (15:24 +0200)
committerJeremy Allison <jra@samba.org>
Wed, 31 Mar 2021 21:20:23 +0000 (21:20 +0000)
This allows to set the 'log level' for clients on the command line:

    make test TESTS=wurst CLIENT_LOG_LEVEL=10

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Mar 31 21:20:23 UTC 2021 on sn-devel-184

selftest/selftest.pl

index cfc5e4384802f126ea93285694ab2777d5b0fdea..d0c025af6b3896232b852f7e2c9711537f38e3cb 100755 (executable)
@@ -528,6 +528,7 @@ sub write_clientconf($$$)
        my $cacert = "$cadir/Public/CA-samba.example.com-cert.pem";
        my $cacrl_pem = "$cadir/Public/CA-samba.example.com-crl.pem";
        my $ca_users_dir = "$cadir/Users";
+       my $client_loglevel = $ENV{CLIENT_LOG_LEVEL} || 1;
 
        # each user has a USER-${USER_PRINCIPAL_NAME}-cert.pem and
        # USER-${USER_PRINCIPAL_NAME}-private-key.pem symlink
@@ -581,7 +582,7 @@ sub write_clientconf($$$)
        system:anonymous = true
        client lanman auth = Yes
        client min protocol = CORE
-       log level = 1
+       log level = $client_loglevel
        torture:basedir = $clientdir
 #We don't want to pass our self-tests if the PAC code is wrong
        gensec:require_pac = true