From 96d47c21d503e08b00659d8b35f46e8409dc0172 Mon Sep 17 00:00:00 2001 From: Tim Beale Date: Fri, 9 Nov 2018 11:44:18 +1300 Subject: [PATCH] selftest: Add README note: always use --configfile in testenv creation 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 Reviewed-by: Andreas Schneider Reviewed-by: Alexander Bokovoy --- selftest/target/README | 10 ++++++++++ selftest/target/Samba3.pm | 3 +++ selftest/target/Samba4.pm | 3 +++ 3 files changed, 16 insertions(+) diff --git a/selftest/target/README b/selftest/target/README index 28a8d00cb97..237cd6cd963 100644 --- a/selftest/target/README +++ b/selftest/target/README @@ -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 diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 569b5d69517..363840e4521 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -3,6 +3,9 @@ # Copyright (C) 2005-2007 Jelmer Vernooij # 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; diff --git a/selftest/target/Samba4.pm b/selftest/target/Samba4.pm index 1f142336293..56756003690 100755 --- a/selftest/target/Samba4.pm +++ b/selftest/target/Samba4.pm @@ -3,6 +3,9 @@ # Copyright (C) 2005-2007 Jelmer Vernooij # 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; -- 2.34.1