selftest: Add README note: always use --configfile in testenv creation
authorTim Beale <timbeale@catalyst.net.nz>
Thu, 8 Nov 2018 22:44:18 +0000 (11:44 +1300)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 9 Nov 2018 16:52:30 +0000 (17:52 +0100)
We always need to specify "env->{CONFIGURATION}" when running a samba-tool
command to setup a testenv. Add a note to the README as this wasn't at
all clear.

Signed-off-by: Tim Beale <timbeale@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
selftest/target/README
selftest/target/Samba3.pm
selftest/target/Samba4.pm

index 28a8d00cb974d9fc2081acee9931afe0c3b85524..237cd6cd96308cf0dfd04eead1d01e7cf5effed6 100644 (file)
@@ -16,6 +16,16 @@ interference.
 
 Some of the different testenvs are described in more detail below.
 
+Important notes if adding a new testenv
+---------------------------------------
+- When adding a new testenv, in the Perl code it is recommended to always
+explicitly specify the --configfile option in the samba-tool command, i.e. add
+"env->{CONFIGURATION}" to the samba-tool command. Otherwise, the samba-tool
+can try to load smb.conf from the default install location (i.e.
+/usr/local/samba/etc/smb.conf). Loading a host-specific smb.conf that's outside
+of the testenv is obviously not ideal and something we want to avoid in a
+reliable test framework.
+
 'local' disambiguation
 ----------------------
 You may notice some variation in the target testenv that test suites are run
index 569b5d695173072068f408d397afe65842f879b9..363840e45215d93e8569d93eac9f6723925e0348 100755 (executable)
@@ -3,6 +3,9 @@
 # Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org>
 # Published under the GNU GPL, v3 or later.
 
+# NOTE: Refer to the README for more details about the various testenvs,
+# and tips about adding new testenvs.
+
 package Samba3;
 
 use strict;
index 1f142336293e8aadc7d3cb054757c8ee60cfe1d2..567560036909cbc6a0a44da8f0ba7f7a71ca6484 100755 (executable)
@@ -3,6 +3,9 @@
 # Copyright (C) 2005-2007 Jelmer Vernooij <jelmer@samba.org>
 # Published under the GNU GPL, v3 or later.
 
+# NOTE: Refer to the README for more details about the various testenvs,
+# and tips about adding new testenvs.
+
 package Samba4;
 
 use strict;