diff options
author | Samuel Cabrero <scabrero@suse.de> | 2018-08-31 12:44:09 +0200 |
---|---|---|
committer | Noel Power <npower@samba.org> | 2018-12-19 12:42:09 +0100 |
commit | d0b5e216b0732a95c0fee3e04659ee7d3792baf6 (patch) | |
tree | 2d6d36aa7ef60c787a5d9389d5e99e318035258d /selftest/target/Samba3.pm | |
parent | b1ad5a880fd571c970a0fff33e20f4ea0c469f4c (diff) | |
download | samba-d0b5e216b0732a95c0fee3e04659ee7d3792baf6.tar.gz |
selftest: Create included files during provision
Files included from smb.conf have to exists, otherwise python fails to
load the configuration. Found while trying to run a python test before
samba3.blackbox.smbd_error creates the included file.
Signed-off-by: Samuel Cabrero <scabrero@suse.de>
Reviewed-by: Noel Power <npower@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'selftest/target/Samba3.pm')
-rwxr-xr-x | selftest/target/Samba3.pm | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/selftest/target/Samba3.pm b/selftest/target/Samba3.pm index 63c24377e96..a86a37aa8f0 100755 --- a/selftest/target/Samba3.pm +++ b/selftest/target/Samba3.pm @@ -1645,6 +1645,8 @@ sub provision($$$$$$$$$) my $conffile="$libdir/server.conf"; my $dfqconffile="$libdir/dfq.conf"; + my $errorinjectconf="$libdir/error_inject.conf"; + my $delayinjectconf="$libdir/delay_inject.conf"; my $nss_wrapper_pl = "$ENV{PERL} $self->{srcdir}/third_party/nss_wrapper/nss_wrapper.pl"; my $nss_wrapper_passwd = "$privatedir/passwd"; @@ -2270,7 +2272,7 @@ sub provision($$$$$$$$$) [error_inject] copy = tmp vfs objects = error_inject - include = $libdir/error_inject.conf + include = $errorinjectconf [delay_inject] copy = tmp @@ -2278,7 +2280,7 @@ sub provision($$$$$$$$$) kernel share modes = no kernel oplocks = no posix locking = no - include = $libdir/delay_inject.conf + include = $delayinjectconf [aio_delay_inject] copy = tmp @@ -2302,6 +2304,18 @@ sub provision($$$$$$$$$) return undef; } + unless (open(ERRORCONF, ">$errorinjectconf")) { + warn("Unable to open $errorinjectconf"); + return undef; + } + close(ERRORCONF); + + unless (open(DELAYCONF, ">$delayinjectconf")) { + warn("Unable to open $delayinjectconf"); + return undef; + } + close(DELAYCONF); + unless (open(DFQCONF, ">$dfqconffile")) { warn("Unable to open $dfqconffile"); return undef; |