summaryrefslogtreecommitdiff
path: root/selftest/selftest.pl
diff options
context:
space:
mode:
authorTim Beale <timbeale@catalyst.net.nz>2019-02-11 17:15:22 +1300
committerKarolin Seeger <kseeger@samba.org>2020-03-04 11:26:37 +0000
commit43b343786e36cc440df993ae78d241f2fbea1ac1 (patch)
tree545597addca4a85f0a9ddfe7df3cc8d8b4227a6b /selftest/selftest.pl
parent1905ed84f8a1c05e08a95c104d3a0200d35bd08c (diff)
downloadsamba-43b343786e36cc440df993ae78d241f2fbea1ac1.tar.gz
selftest: Export DC conf path for special cases
In a few rare cases, a test needs to assert aspects both client-side and server-side aspects. A typical example would be the audit logging, which is exercising client-side behaviour, but also asserting the server-side logging. Usually this has involved a kludge in tests.py to either use socket-wrapper explicitly, or hardcode in the server smb.conf path. This patch exposes the existing SERVERCONFFILE env variable to the tests. DC_SERVERCONFFILE has been added for 2 DC testenvs, where we need the PDC's smb.conf. The benefit of doing this way is the filepath/testenv-dependency logic is all self-contained with the Perl code, and it doesn't bleed out into tests.py as well. Signed-off-by: Tim Beale <timbeale@catalyst.net.nz> Reviewed-by: Andrew Bartlett <abartlet@samba.org> (cherry picked from commit aeadf75c24a4af4143e389e2b27d3a90899fb638) Fixes autobuild with the patches for BUG: https://bugzilla.samba.org/show_bug.cgi?id=14285 Autobuild-User(v4-10-test): Karolin Seeger <kseeger@samba.org> Autobuild-Date(v4-10-test): Wed Mar 4 11:26:37 UTC 2020 on sn-devel-144
Diffstat (limited to 'selftest/selftest.pl')
-rwxr-xr-xselftest/selftest.pl7
1 files changed, 7 insertions, 0 deletions
diff --git a/selftest/selftest.pl b/selftest/selftest.pl
index 45eb51fa3c1..f2968139cfd 100755
--- a/selftest/selftest.pl
+++ b/selftest/selftest.pl
@@ -888,6 +888,13 @@ my @exported_envvars = (
"NETBIOSALIAS",
"SAMSID",
+ # only use these 2 as a last resort. Some tests need to test both client-
+ # side and server-side. In this case, run as default client, ans access
+ # server's smb.conf as needed, typically using:
+ # param.LoadParm(filename_for_non_global_lp=os.environ['SERVERCONFFILE'])
+ "SERVERCONFFILE",
+ "DC_SERVERCONFFILE",
+
# user stuff
"USERNAME",
"USERID",