Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/bareos/bareos.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPhilipp Storz <philipp.storz@bareos.com>2022-09-19 13:48:53 +0300
committerGitHub <noreply@github.com>2022-09-19 13:48:53 +0300
commit6bf69897ca6784734d62bce849c3d8a7d4750d7f (patch)
tree23210e98815420ccbc2fe4418b417d44ed62770e
parentd8277245c29ca8e10d8dfb024739a08a0970d10e (diff)
parenta0d38988b8e0dba22987f4022298ae2c7a955c34 (diff)
Merge pull request #1186
systemtest: fixed issues with systemtests not succeeding on first try
-rw-r--r--CHANGELOG.md1
-rwxr-xr-xcore/scripts/bareos-ctl-funcs4
-rw-r--r--core/src/tests/bareos_test_sockets.cc37
-rwxr-xr-xsystemtests/scripts/check_for_zombie_jobs7
-rwxr-xr-xsystemtests/scripts/cleanup2
-rwxr-xr-xsystemtests/scripts/diff.pl.in4
-rw-r--r--systemtests/scripts/functions14
-rwxr-xr-xsystemtests/scripts/setup2
-rw-r--r--systemtests/tests/CMakeLists.txt4
-rwxr-xr-xsystemtests/tests/acl/testrunner1
-rwxr-xr-xsystemtests/tests/bareos-acl/testrunner2
-rwxr-xr-xsystemtests/tests/bconsole-pam/bin/check_pam_exec_available.sh4
-rwxr-xr-xsystemtests/tests/bscan-bextract-bls-bcopy/testrunner2
-rwxr-xr-xsystemtests/tests/chflags/testrunner1
-rwxr-xr-xsystemtests/tests/client-initiated/testrunner2
-rw-r--r--systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/device/FileStorage.conf4
-rw-r--r--systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in2
-rwxr-xr-xsystemtests/tests/copy-archive-job/testrunner1
-rwxr-xr-xsystemtests/tests/dbcopy-mysql-postgresql/testrunner1
-rwxr-xr-xsystemtests/tests/droplet-s3/testrunner1
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/CMakeLists.txt (renamed from systemtests/tests/encrypt-signature/CMakeLists.txt)2
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in (renamed from systemtests/tests/commandline-options/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/messages/Daemon.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/messages/Daemon.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/messages/Standard.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/messages/Standard.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Differential.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Differential.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Full.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Full.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Incremental.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Incremental.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Scratch.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Scratch.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/profile/operator.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/profile/operator.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/storage/File.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/storage/File.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/client/myself.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/client/myself.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/messages/Standard.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/messages/Standard.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/device/FileStorage.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/device/FileStorage.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/messages/Standard.conf (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/messages/Standard.conf)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in)0
-rw-r--r--systemtests/tests/encrypt-signature-no-tls/etc/bareos/bconsole.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bconsole.conf.in)0
-rwxr-xr-xsystemtests/tests/encrypt-signature-no-tls/testrunner (renamed from systemtests/tests/encrypt-signature/testrunner)5
-rw-r--r--systemtests/tests/encrypt-signature-tls-cert/CMakeLists.txt2
-rwxr-xr-xsystemtests/tests/encrypt-signature-tls-cert/testrunner5
-rwxr-xr-xsystemtests/tests/filesets/testrunner1
-rwxr-xr-xsystemtests/tests/gfapi-fd/testrunner3
-rwxr-xr-xsystemtests/tests/glusterfs-backend/testrunner1
-rwxr-xr-xsystemtests/tests/list-backups/testrunner1
-rwxr-xr-xsystemtests/tests/multiplied-device/testrunner1
-rwxr-xr-xsystemtests/tests/ndmp/testrunner2
-rwxr-xr-xsystemtests/tests/notls/testrunner1
-rwxr-xr-xsystemtests/tests/passive/testrunner1
-rwxr-xr-xsystemtests/tests/pruning/testrunner1
-rwxr-xr-xsystemtests/tests/py2plug-dir/testrunner1
-rwxr-xr-xsystemtests/tests/py2plug-fd-libcloud/testrunner1
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/CMakeLists.txt (renamed from systemtests/tests/py2plug-fd-local-fileset/CMakeLists.txt)17
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/PluginTest.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/PluginTest.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in (renamed from systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/messages/Daemon.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/messages/Daemon.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/messages/Standard.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/messages/Standard.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Differential.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Differential.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Full.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Full.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Incremental.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Incremental.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Scratch.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Scratch.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/profile/operator.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/profile/operator.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/storage/File.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/storage/File.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/client/myself.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/client/myself.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/messages/Standard.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/messages/Standard.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/device/FileStorage.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/device/FileStorage.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/messages/Standard.conf (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/messages/Standard.conf)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in)0
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bconsole.conf.in (renamed from systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bconsole.conf.in)0
l---------systemtests/tests/py2plug-fd-local-fileset-basic/python-modules/BareosFdPluginLocalFileset.py (renamed from systemtests/tests/py2plug-fd-local-fileset/python-modules/BareosFdPluginLocalFileset.py)0
l---------systemtests/tests/py2plug-fd-local-fileset-basic/python-modules/bareos-fd-local-fileset.py (renamed from systemtests/tests/py2plug-fd-local-fileset/python-modules/bareos-fd-local-fileset.py)0
-rwxr-xr-xsystemtests/tests/py2plug-fd-local-fileset-basic/testrunner (renamed from systemtests/tests/py2plug-fd-local-fileset/testrunner)5
-rwxr-xr-xsystemtests/tests/py2plug-fd-local-fileset-restoreobject/testrunner5
-rw-r--r--systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in11
-rwxr-xr-xsystemtests/tests/py2plug-fd-mariabackup/testrunner5
-rwxr-xr-xsystemtests/tests/py2plug-fd-ovirt/testrunner.in1
-rwxr-xr-xsystemtests/tests/py2plug-fd-percona-xtrabackup/testrunner4
-rwxr-xr-xsystemtests/tests/py2plug-fd-vmware/testrunner1
-rwxr-xr-xsystemtests/tests/py2plug-sd/testrunner1
l---------systemtests/tests/py3plug-fd-local-fileset1
l---------systemtests/tests/py3plug-fd-local-fileset-basic1
-rw-r--r--systemtests/tests/scheduler-backup/etc/bareos/bareos-dir.d/schedule/schedule.conf63
-rwxr-xr-xsystemtests/tests/scheduler-backup/test-setup20
-rwxr-xr-xsystemtests/tests/scheduler-backup/testrunner-scheduler-backup3
-rwxr-xr-xsystemtests/tests/scheduler-backup/testrunner-scheduler-status-copy-job15
-rwxr-xr-xsystemtests/tests/spool/testrunner1
-rwxr-xr-xsystemtests/tests/truncate-command/testrunner3
-rwxr-xr-xsystemtests/tests/virtualfull-bscan/testrunner1
-rwxr-xr-xsystemtests/tests/virtualfull/testrunner1
-rwxr-xr-xsystemtests/tests/xattr/testrunner1
106 files changed, 111 insertions, 173 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 629dc225e..1b6d33012 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -94,6 +94,7 @@ and since Bareos version 20 this project adheres to [Semantic Versioning](https:
- dird: fix odd-even weeks parsing bug in schedule [PR #1210]
- bcopy: fix crash in bcopy when using certain cli arguments [PR #1211]
- webui: fix password string length limitation [BUG #1480][PR #1251]
+- systemtest: fixed issues with systemtests not succeeding on first try [PR #1186]
### Changed
- contrib: rename Python modules to satisfy PEP8 [PR #768]
diff --git a/core/scripts/bareos-ctl-funcs b/core/scripts/bareos-ctl-funcs
index c6b0de878..8b7697af2 100755
--- a/core/scripts/bareos-ctl-funcs
+++ b/core/scripts/bareos-ctl-funcs
@@ -25,13 +25,13 @@ pidofproc() {
if [ ! -z "${PGREP}" -a -x "${PGREP}" ] ; then
pid=`${PGREP} -f $base`
if [ "$pid" != "" ] ; then
- echo $pid
+ echo $pid | cut -d' ' -f 1
return 0
fi
fi
# Finally try to extract it from ps
- pid=`${PSCMD} | grep $base | ${AWK} '{ print $1 }' | tr '\n' ' '`
+ pid=`${PSCMD} | grep -m 1 $base | ${AWK} '{ print $1 }' | tr '\n' ' '`
echo $pid
return 0
}
diff --git a/core/src/tests/bareos_test_sockets.cc b/core/src/tests/bareos_test_sockets.cc
index b51e61d36..aa270377f 100644
--- a/core/src/tests/bareos_test_sockets.cc
+++ b/core/src/tests/bareos_test_sockets.cc
@@ -1,7 +1,7 @@
/*
BAREOSĀ® - Backup Archiving REcovery Open Sourced
- Copyright (C) 2018-2020 Bareos GmbH & Co. KG
+ Copyright (C) 2018-2022 Bareos GmbH & Co. KG
This program is Free Software; you can redistribute it and/or
modify it under the terms of version three of the GNU Affero General Public
@@ -28,9 +28,10 @@
#include "bareos_test_sockets.h"
#include "tests/bsock_test.h"
-
#include "lib/bsock_tcp.h"
+#include <thread>
+
#if HAVE_WIN32
# include <cstdlib>
# include <mutex>
@@ -78,9 +79,22 @@ static int create_listening_server_socket(int port)
address.sin_family = AF_INET;
address.sin_addr.s_addr = INADDR_ANY;
address.sin_port = htons(port);
- if (bind(listen_file_descriptor, (struct sockaddr*)&address, sizeof(address))
- < 0) {
- perror("bind failed");
+
+ int bindresult = -1;
+ for (int i = 0; i < 6; i++) {
+ bindresult = bind(listen_file_descriptor, (struct sockaddr*)&address,
+ sizeof(address));
+ if (bindresult == 0) {
+ std::cout << "bind successful after " << i + 1 << " tries" << std::endl;
+ break;
+ } else {
+ std::this_thread::sleep_for(std::chrono::seconds(2));
+ }
+ }
+ std::string errormessage{"bind failed for port "};
+ errormessage.append(std::to_string(port));
+ if (bindresult < 0) {
+ perror(errormessage.c_str());
return -4;
}
@@ -105,8 +119,17 @@ static int create_listening_server_socket(int port)
perror("setsockopt");
return -5;
}
-
- if (listen(listen_file_descriptor, 3) < 0) {
+ int listenresult = -1;
+ for (int i = 0; i < 6; i++) {
+ listenresult = listen(listen_file_descriptor, 3);
+ if (listenresult == 0) {
+ std::cout << "listen successful after " << i + 1 << " tries" << std::endl;
+ break;
+ } else {
+ std::this_thread::sleep_for(std::chrono::seconds(2));
+ }
+ }
+ if (listenresult < 0) {
perror("listen");
return -6;
}
diff --git a/systemtests/scripts/check_for_zombie_jobs b/systemtests/scripts/check_for_zombie_jobs
index 96fc9c8bc..b52209e72 100755
--- a/systemtests/scripts/check_for_zombie_jobs
+++ b/systemtests/scripts/check_for_zombie_jobs
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#
# Check for zombie jobs (not terminated).
# Also scan logs for ERROR messages
@@ -7,6 +7,9 @@
# shellcheck source=../environment.in
. ./environment
+# shellcheck source= ./functions
+. "${rscripts}"/functions
+
# check_for_zombie_jobs storage=STORAGE [client=localhost-fd]
if [ $# = 2 ] ; then
@@ -15,6 +18,8 @@ else
client="client"
fi
+wait_for_jobs_to_terminate "${client}" 20
+
"${BAREOS_BCONSOLE_BINARY}" -c "${conf}" <<END_OF_DATA >/dev/null 2>&1
@output "${tmp}"/dir.out
status dir
diff --git a/systemtests/scripts/cleanup b/systemtests/scripts/cleanup
index 732f0dde9..f42bbf904 100755
--- a/systemtests/scripts/cleanup
+++ b/systemtests/scripts/cleanup
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
set -u
#shellcheck source=../environment.in
diff --git a/systemtests/scripts/diff.pl.in b/systemtests/scripts/diff.pl.in
index df0bdb474..058f38c5d 100755
--- a/systemtests/scripts/diff.pl.in
+++ b/systemtests/scripts/diff.pl.in
@@ -52,7 +52,7 @@ my $md5 = Digest::MD5->new;
my $dir = getcwd;
-chdir($src) or die "ERROR: Can't access to $src";
+chdir($src) or die "ERROR: Can't access to $src : $!";
$hash = \%src_attr;
find(\&wanted_src, '.');
@@ -63,7 +63,7 @@ if ($wattr) {
chdir ($dir);
-chdir($dst) or die "ERROR: Can't access to $dst";
+chdir($dst) or die "ERROR: Can't access to $dst : $!";
$hash = \%dst_attr;
find(\&wanted_src, '.');
diff --git a/systemtests/scripts/functions b/systemtests/scripts/functions
index a30475e5b..edc8916a7 100644
--- a/systemtests/scripts/functions
+++ b/systemtests/scripts/functions
@@ -3,6 +3,20 @@
# A set of useful functions to be sourced in each test
#
+wait_for_jobs_to_terminate ()
+{
+ status_of_what=$1
+ max_wait_in_seconds=$2
+ count=max_wait_in_seconds
+ while (( --count >= 0 )); do
+ if "${BAREOS_BCONSOLE_BINARY}" -c "${conf}" <<< "status ${status_of_what}" | grep "No Jobs running.";
+ then
+ break
+ fi
+ sleep 1
+ done
+}
+
copy_configs()
{
COMPONENTS="bareos-dir bareos-sd bareos-fd bconsole tray-monitor"
diff --git a/systemtests/scripts/setup b/systemtests/scripts/setup
index 0bbc8bdb5..b4145cb83 100755
--- a/systemtests/scripts/setup
+++ b/systemtests/scripts/setup
@@ -1,4 +1,4 @@
-#!/bin/sh
+#!/bin/bash
#shellcheck source=../environment.in
. ./environment
. "${rscripts}/functions"
diff --git a/systemtests/tests/CMakeLists.txt b/systemtests/tests/CMakeLists.txt
index f33edde3d..b7504d796 100644
--- a/systemtests/tests/CMakeLists.txt
+++ b/systemtests/tests/CMakeLists.txt
@@ -39,7 +39,7 @@ add_subdirectory(copy-remote-bscan)
add_subdirectory(dbcopy-mysql-postgresql)
add_subdirectory(deprecation)
add_subdirectory(droplet-s3)
-add_subdirectory(encrypt-signature)
+add_subdirectory(encrypt-signature-no-tls)
add_subdirectory(encrypt-signature-tls-cert)
add_subdirectory(fileset-multiple-blocks)
add_subdirectory(filesets)
@@ -57,7 +57,7 @@ add_subdirectory(py2plug-dir)
add_subdirectory(py2plug-fd-contrib-bareos_tasks_mysql)
add_subdirectory(py2plug-fd-ldap)
add_subdirectory(py2plug-fd-libcloud)
-add_subdirectory(py2plug-fd-local-fileset)
+add_subdirectory(py2plug-fd-local-fileset-basic)
add_subdirectory(py2plug-fd-local-fileset-restoreobject)
add_subdirectory(py2plug-fd-mariabackup)
add_subdirectory(py2plug-fd-ovirt)
diff --git a/systemtests/tests/acl/testrunner b/systemtests/tests/acl/testrunner
index 668eb9559..ab445522d 100755
--- a/systemtests/tests/acl/testrunner
+++ b/systemtests/tests/acl/testrunner
@@ -57,7 +57,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
diff --git a/systemtests/tests/bareos-acl/testrunner b/systemtests/tests/bareos-acl/testrunner
index ce9798295..afb6528dc 100755
--- a/systemtests/tests/bareos-acl/testrunner
+++ b/systemtests/tests/bareos-acl/testrunner
@@ -42,6 +42,4 @@ grep -q "status conf: is an invalid command" ${logdir}/acl-status.log || \
grep -q "eprecated configuration settings detected" ${logdir}/acl-status-conf.log || \
set_error "acl-status-conf.log"
-stop_bareos
-
end_test
diff --git a/systemtests/tests/bconsole-pam/bin/check_pam_exec_available.sh b/systemtests/tests/bconsole-pam/bin/check_pam_exec_available.sh
index 3a609cb29..7f6a673f2 100755
--- a/systemtests/tests/bconsole-pam/bin/check_pam_exec_available.sh
+++ b/systemtests/tests/bconsole-pam/bin/check_pam_exec_available.sh
@@ -1,7 +1,7 @@
-#!/bin/sh
+#!/bin/bash
# BAREOSĀ® - Backup Archiving REcovery Open Sourced
#
-# Copyright (C) 2019-2019 Bareos GmbH & Co. KG
+# Copyright (C) 2019-2022 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
diff --git a/systemtests/tests/bscan-bextract-bls-bcopy/testrunner b/systemtests/tests/bscan-bextract-bls-bcopy/testrunner
index 3bb6def44..138423ea2 100755
--- a/systemtests/tests/bscan-bextract-bls-bcopy/testrunner
+++ b/systemtests/tests/bscan-bextract-bls-bcopy/testrunner
@@ -163,8 +163,6 @@ run_bconsole "$tmp/bconcmds2"
check_for_zombie_jobs storage=File
-stop_bareos
-
check_two_logs
check_restore_diff "${BackupDirectory}"
end_test
diff --git a/systemtests/tests/chflags/testrunner b/systemtests/tests/chflags/testrunner
index c55074423..c0e745234 100755
--- a/systemtests/tests/chflags/testrunner
+++ b/systemtests/tests/chflags/testrunner
@@ -62,7 +62,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
diff --git a/systemtests/tests/client-initiated/testrunner b/systemtests/tests/client-initiated/testrunner
index bc19e2467..0ac69dd89 100755
--- a/systemtests/tests/client-initiated/testrunner
+++ b/systemtests/tests/client-initiated/testrunner
@@ -90,8 +90,6 @@ run_bconsole "$tmp/bconcmds"
check_for_zombie_jobs storage=File
-stop_bareos
-
check_two_logs
check_restore_diff "${BackupDirectory}"
end_test
diff --git a/systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/device/FileStorage.conf b/systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/device/FileStorage.conf
index 61463cb61..11a639bc6 100644
--- a/systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/device/FileStorage.conf
+++ b/systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/device/FileStorage.conf
@@ -8,8 +8,4 @@ Device {
RemovableMedia = no;
AlwaysOpen = no;
Description = "File device. A connecting Director must have the same Name and MediaType."
- Auto Inflate = both
- Auto Deflate = both
- Auto Deflate Algorithm = gzip
-
}
diff --git a/systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in b/systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
index 5dc406dca..d555776e0 100644
--- a/systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
+++ b/systemtests/tests/commandline-options/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
@@ -6,8 +6,6 @@ Storage {
# if "Plugin Names" is defined, only the specified plugins will be loaded,
# otherwise all storage plugins (*-sd.so) from the "Plugin Directory".
#
- Plugin Directory = "@SD_PLUGINS_DIR_TO_TEST@"
- Plugin Names = "autoxflate"
Working Directory = "@working_dir@"
SD Port = @sd_port@
}
diff --git a/systemtests/tests/copy-archive-job/testrunner b/systemtests/tests/copy-archive-job/testrunner
index 9f3eab02a..a5d04bf5c 100755
--- a/systemtests/tests/copy-archive-job/testrunner
+++ b/systemtests/tests/copy-archive-job/testrunner
@@ -58,7 +58,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_sd_files_written $tmp/log2.out
check_sd_files_written $tmp/log3.out
diff --git a/systemtests/tests/dbcopy-mysql-postgresql/testrunner b/systemtests/tests/dbcopy-mysql-postgresql/testrunner
index f68dcc54b..920fc7471 100755
--- a/systemtests/tests/dbcopy-mysql-postgresql/testrunner
+++ b/systemtests/tests/dbcopy-mysql-postgresql/testrunner
@@ -80,7 +80,6 @@ END_OF_DATA
run_bareos
check_for_zombie_jobs storage=File client=bareos-fd
-stop_bareos
check_two_logs
check_restore_diff "${BackupDirectory}"
diff --git a/systemtests/tests/droplet-s3/testrunner b/systemtests/tests/droplet-s3/testrunner
index 00e275967..1d630e611 100755
--- a/systemtests/tests/droplet-s3/testrunner
+++ b/systemtests/tests/droplet-s3/testrunner
@@ -55,7 +55,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff "${BackupDirectory}"
diff --git a/systemtests/tests/encrypt-signature/CMakeLists.txt b/systemtests/tests/encrypt-signature-no-tls/CMakeLists.txt
index cfd54bc58..2a79b7f8a 100644
--- a/systemtests/tests/encrypt-signature/CMakeLists.txt
+++ b/systemtests/tests/encrypt-signature-no-tls/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOSĀ® - Backup Archiving REcovery Open Sourced
#
-# Copyright (C) 2021-2021 Bareos GmbH & Co. KG
+# Copyright (C) 2021-2022 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in
index 3c3385945..3c3385945 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in
index 59b617009..59b617009 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
index 266d120dd..266d120dd 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in
index c7cdc433f..c7cdc433f 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in
index ba39719ea..ba39719ea 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in
diff --git a/systemtests/tests/commandline-options/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
index 89256864d..89256864d 100644
--- a/systemtests/tests/commandline-options/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
index ca1891f96..ca1891f96 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in
index 563126477..563126477 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/messages/Daemon.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/messages/Daemon.conf.in
index cf6a8cfa1..cf6a8cfa1 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/messages/Daemon.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/messages/Daemon.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/messages/Standard.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/messages/Standard.conf.in
index b3556ba8c..b3556ba8c 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/messages/Standard.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/messages/Standard.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Differential.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Differential.conf
index 25ce24821..25ce24821 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Differential.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Differential.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Full.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Full.conf
index 867fc66b4..867fc66b4 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Full.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Full.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Incremental.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Incremental.conf
index f4dbbab66..f4dbbab66 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Incremental.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Incremental.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Scratch.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Scratch.conf
index 3a489b198..3a489b198 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/pool/Scratch.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/pool/Scratch.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/profile/operator.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/profile/operator.conf
index 6edd0166d..6edd0166d 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/profile/operator.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/profile/operator.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/storage/File.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/storage/File.conf.in
index a2622f719..a2622f719 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/storage/File.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-dir.d/storage/File.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/client/myself.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/client/myself.conf.in
index 43cb6d2f8..43cb6d2f8 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/client/myself.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/client/myself.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in
index c8dc7085a..c8dc7085a 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/messages/Standard.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/messages/Standard.conf
index 97788e005..97788e005 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-fd.d/messages/Standard.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-fd.d/messages/Standard.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/device/FileStorage.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/device/FileStorage.conf
index 11a639bc6..11a639bc6 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/device/FileStorage.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/device/FileStorage.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in
index deef3360c..deef3360c 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/messages/Standard.conf b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/messages/Standard.conf
index 468348e62..468348e62 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/messages/Standard.conf
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/messages/Standard.conf
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
index c10462de6..c10462de6 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bconsole.conf.in b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bconsole.conf.in
index 50b647c1d..50b647c1d 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bconsole.conf.in
+++ b/systemtests/tests/encrypt-signature-no-tls/etc/bareos/bconsole.conf.in
diff --git a/systemtests/tests/encrypt-signature/testrunner b/systemtests/tests/encrypt-signature-no-tls/testrunner
index 8af731abd..21f3e36f5 100755
--- a/systemtests/tests/encrypt-signature/testrunner
+++ b/systemtests/tests/encrypt-signature-no-tls/testrunner
@@ -42,9 +42,7 @@ messages
@# now do a restore
@#
@$out $tmp/log2.out
-wait
-restore client=bareos-fd fileset=SelfTest where=$tmp/bareos-restores select all done
-yes
+restore client=bareos-fd fileset=SelfTest where=$tmp/bareos-restores select all done yes
wait
messages
quit
@@ -52,7 +50,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff "${BackupDirectory}"
diff --git a/systemtests/tests/encrypt-signature-tls-cert/CMakeLists.txt b/systemtests/tests/encrypt-signature-tls-cert/CMakeLists.txt
index cfd54bc58..2a79b7f8a 100644
--- a/systemtests/tests/encrypt-signature-tls-cert/CMakeLists.txt
+++ b/systemtests/tests/encrypt-signature-tls-cert/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOSĀ® - Backup Archiving REcovery Open Sourced
#
-# Copyright (C) 2021-2021 Bareos GmbH & Co. KG
+# Copyright (C) 2021-2022 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
diff --git a/systemtests/tests/encrypt-signature-tls-cert/testrunner b/systemtests/tests/encrypt-signature-tls-cert/testrunner
index 6d4de716a..8cff86930 100755
--- a/systemtests/tests/encrypt-signature-tls-cert/testrunner
+++ b/systemtests/tests/encrypt-signature-tls-cert/testrunner
@@ -42,9 +42,7 @@ messages
@# now do a restore
@#
@$out $tmp/log2.out
-wait
-restore client=bareos-fd fileset=SelfTest where=$tmp/bareos-restores select all done
-yes
+restore client=bareos-fd fileset=SelfTest where=$tmp/bareos-restores select all done yes
wait
messages
quit
@@ -52,7 +50,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff ${BackupDirectory}
diff --git a/systemtests/tests/filesets/testrunner b/systemtests/tests/filesets/testrunner
index cb80b5863..a0e97e2da 100755
--- a/systemtests/tests/filesets/testrunner
+++ b/systemtests/tests/filesets/testrunner
@@ -60,7 +60,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
for i in $TESTS; do
if ! grep -q $tmp/$i/data2.txt $tmp/estimate-$i.out; then
diff --git a/systemtests/tests/gfapi-fd/testrunner b/systemtests/tests/gfapi-fd/testrunner
index 3e14f8ff6..a48f28f6e 100755
--- a/systemtests/tests/gfapi-fd/testrunner
+++ b/systemtests/tests/gfapi-fd/testrunner
@@ -35,7 +35,7 @@ while "${SUDO}" mount | grep "${tmp}/data" >/dev/null 2>&1; do
done
}
-
+trap umount_glusterfs EXIT
#shellcheck source=../scripts/functions
. "${rscripts}"/functions
@@ -136,7 +136,6 @@ quit
END_OF_DATA_RESTORE
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
ln -s "${tmp}" "${tmp}/bareos-restores"
diff --git a/systemtests/tests/glusterfs-backend/testrunner b/systemtests/tests/glusterfs-backend/testrunner
index e92f2afb3..8145bddaf 100755
--- a/systemtests/tests/glusterfs-backend/testrunner
+++ b/systemtests/tests/glusterfs-backend/testrunner
@@ -51,7 +51,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff ${BackupDirectory}
diff --git a/systemtests/tests/list-backups/testrunner b/systemtests/tests/list-backups/testrunner
index 71981e713..83f20e96f 100755
--- a/systemtests/tests/list-backups/testrunner
+++ b/systemtests/tests/list-backups/testrunner
@@ -51,7 +51,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
echo "Checking list backups for jobtype=backup"
grep -F '1 | backup-bareos-fd | bareos-fd' "$tmp/list-backups.out"
diff --git a/systemtests/tests/multiplied-device/testrunner b/systemtests/tests/multiplied-device/testrunner
index 47af06ebe..57da694bd 100755
--- a/systemtests/tests/multiplied-device/testrunner
+++ b/systemtests/tests/multiplied-device/testrunner
@@ -85,7 +85,6 @@ quit
END_OF_DATA
run_bconsole
-stop_bareos
# rename files to be able to run the test again later
mv ./etc/bareos/bareos-dir.d/storage/fakestorage1.conf_backup ./etc/bareos/bareos-dir.d/storage/fakestorage1.conf
diff --git a/systemtests/tests/ndmp/testrunner b/systemtests/tests/ndmp/testrunner
index 3cb7dce38..8f57f9c74 100755
--- a/systemtests/tests/ndmp/testrunner
+++ b/systemtests/tests/ndmp/testrunner
@@ -165,6 +165,4 @@ cleanup_isilon
check_for_zombie_jobs storage=isilonfile client=bareos-fd
-stop_bareos
-
end_test
diff --git a/systemtests/tests/notls/testrunner b/systemtests/tests/notls/testrunner
index d9522f220..ca8b9d135 100755
--- a/systemtests/tests/notls/testrunner
+++ b/systemtests/tests/notls/testrunner
@@ -61,7 +61,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff ${BackupDirectory}
diff --git a/systemtests/tests/passive/testrunner b/systemtests/tests/passive/testrunner
index d6956ad6e..dd02b7232 100755
--- a/systemtests/tests/passive/testrunner
+++ b/systemtests/tests/passive/testrunner
@@ -51,7 +51,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff ${BackupDirectory}
diff --git a/systemtests/tests/pruning/testrunner b/systemtests/tests/pruning/testrunner
index baace395e..5e2956e1b 100755
--- a/systemtests/tests/pruning/testrunner
+++ b/systemtests/tests/pruning/testrunner
@@ -157,7 +157,6 @@ END_OF_DATA
run_bconsole
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
diff --git a/systemtests/tests/py2plug-dir/testrunner b/systemtests/tests/py2plug-dir/testrunner
index 3bd485719..323a5fe06 100755
--- a/systemtests/tests/py2plug-dir/testrunner
+++ b/systemtests/tests/py2plug-dir/testrunner
@@ -53,7 +53,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
for i in bDirEventJobStart bDirEventJobInit bDirEventJobRun bDirEventJobEnd; do
if ! grep -q "$i" ${tmp}/test-plugin1.log; then
diff --git a/systemtests/tests/py2plug-fd-libcloud/testrunner b/systemtests/tests/py2plug-fd-libcloud/testrunner
index d51d3cd04..7a24d3cac 100755
--- a/systemtests/tests/py2plug-fd-libcloud/testrunner
+++ b/systemtests/tests/py2plug-fd-libcloud/testrunner
@@ -99,7 +99,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
list=( $(find "${BackupDirectory}" -type f) )
diff --git a/systemtests/tests/py2plug-fd-local-fileset/CMakeLists.txt b/systemtests/tests/py2plug-fd-local-fileset-basic/CMakeLists.txt
index f9c516a7d..90e7ac35f 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/CMakeLists.txt
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/CMakeLists.txt
@@ -1,6 +1,6 @@
# BAREOSĀ® - Backup Archiving REcovery Open Sourced
#
-# Copyright (C) 2021-2021 Bareos GmbH & Co. KG
+# Copyright (C) 2021-2022 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
@@ -18,18 +18,23 @@
# 02110-1301, USA.
if(TARGET python-fd)
- create_systemtest(${SYSTEMTEST_PREFIX} "py2plug-fd-local-fileset")
+ create_systemtest(${SYSTEMTEST_PREFIX} "py2plug-fd-local-fileset-basic")
else()
- create_systemtest(${SYSTEMTEST_PREFIX} "py2plug-fd-local-fileset" DISABLED)
+ create_systemtest(
+ ${SYSTEMTEST_PREFIX} "py2plug-fd-local-fileset-basic" DISABLED
+ )
endif()
if(TARGET python3-fd)
- create_systemtest(${SYSTEMTEST_PREFIX} "py3plug-fd-local-fileset")
+ create_systemtest(${SYSTEMTEST_PREFIX} "py3plug-fd-local-fileset-basic")
# Fails with UnicodeEncodeError: 'utf-8' codec can't encode characters in
# position 133-142: surrogates not allowed
set_tests_properties(
- "${SYSTEMTEST_PREFIX}py3plug-fd-local-fileset" PROPERTIES LABELS "broken"
+ "${SYSTEMTEST_PREFIX}py3plug-fd-local-fileset-basic" PROPERTIES LABELS
+ "broken"
)
else()
- create_systemtest(${SYSTEMTEST_PREFIX} "py3plug-fd-local-fileset" DISABLED)
+ create_systemtest(
+ ${SYSTEMTEST_PREFIX} "py3plug-fd-local-fileset-basic" DISABLED
+ )
endif()
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in
index 3c3385945..3c3385945 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/catalog/MyCatalog.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in
index 59b617009..59b617009 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/client/bareos-fd.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
index 7fd6d4781..7fd6d4781 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/director/bareos-dir.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in
index c7cdc433f..c7cdc433f 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/Catalog.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/PluginTest.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/PluginTest.conf.in
index dabb88ceb..dabb88ceb 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/PluginTest.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/PluginTest.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in
index ba39719ea..ba39719ea 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/fileset/SelfTest.conf.in
diff --git a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
index 89256864d..89256864d 100644
--- a/systemtests/tests/encrypt-signature/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
index d54d7ff8e..d54d7ff8e 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/job/backup-bareos-fd.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in
index 563126477..563126477 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/jobdefs/DefaultJob.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/messages/Daemon.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/messages/Daemon.conf.in
index cf6a8cfa1..cf6a8cfa1 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/messages/Daemon.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/messages/Daemon.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/messages/Standard.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/messages/Standard.conf.in
index b3556ba8c..b3556ba8c 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/messages/Standard.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/messages/Standard.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Differential.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Differential.conf
index 25ce24821..25ce24821 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Differential.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Differential.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Full.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Full.conf
index 867fc66b4..867fc66b4 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Full.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Full.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Incremental.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Incremental.conf
index f4dbbab66..f4dbbab66 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Incremental.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Incremental.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Scratch.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Scratch.conf
index 3a489b198..3a489b198 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/pool/Scratch.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/pool/Scratch.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/profile/operator.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/profile/operator.conf
index 6edd0166d..6edd0166d 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/profile/operator.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/profile/operator.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/storage/File.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/storage/File.conf.in
index a2622f719..a2622f719 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/storage/File.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-dir.d/storage/File.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/client/myself.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/client/myself.conf.in
index dbcd1a398..dbcd1a398 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/client/myself.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/client/myself.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in
index c8dc7085a..c8dc7085a 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/director/bareos-dir.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/messages/Standard.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/messages/Standard.conf
index 97788e005..97788e005 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-fd.d/messages/Standard.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-fd.d/messages/Standard.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/device/FileStorage.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/device/FileStorage.conf
index 11a639bc6..11a639bc6 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/device/FileStorage.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/device/FileStorage.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in
index deef3360c..deef3360c 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/director/bareos-dir.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/messages/Standard.conf b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/messages/Standard.conf
index 468348e62..468348e62 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/messages/Standard.conf
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/messages/Standard.conf
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
index c10462de6..c10462de6 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bareos-sd.d/storage/bareos-sd.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bconsole.conf.in b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bconsole.conf.in
index 50b647c1d..50b647c1d 100644
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bconsole.conf.in
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/etc/bareos/bconsole.conf.in
diff --git a/systemtests/tests/py2plug-fd-local-fileset/python-modules/BareosFdPluginLocalFileset.py b/systemtests/tests/py2plug-fd-local-fileset-basic/python-modules/BareosFdPluginLocalFileset.py
index f3669bab5..f3669bab5 120000
--- a/systemtests/tests/py2plug-fd-local-fileset/python-modules/BareosFdPluginLocalFileset.py
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/python-modules/BareosFdPluginLocalFileset.py
diff --git a/systemtests/tests/py2plug-fd-local-fileset/python-modules/bareos-fd-local-fileset.py b/systemtests/tests/py2plug-fd-local-fileset-basic/python-modules/bareos-fd-local-fileset.py
index a0e0c3e70..a0e0c3e70 120000
--- a/systemtests/tests/py2plug-fd-local-fileset/python-modules/bareos-fd-local-fileset.py
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/python-modules/bareos-fd-local-fileset.py
diff --git a/systemtests/tests/py2plug-fd-local-fileset/testrunner b/systemtests/tests/py2plug-fd-local-fileset-basic/testrunner
index 67c6f19e6..0c25ff013 100755
--- a/systemtests/tests/py2plug-fd-local-fileset/testrunner
+++ b/systemtests/tests/py2plug-fd-local-fileset-basic/testrunner
@@ -26,9 +26,6 @@ JobName=backup-bareos-fd
"${rscripts}"/cleanup
"${rscripts}"/setup
-
-
-
# Fill ${BackupDirectory} with data.
setup_data
@@ -65,7 +62,6 @@ fi
check_for_zombie_jobs storage=File
stop_bareos
-
cat <<END_OF_DATA >$tmp/bconcmds
@#
@# now do a restore
@@ -79,7 +75,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff ${BackupDirectory}
diff --git a/systemtests/tests/py2plug-fd-local-fileset-restoreobject/testrunner b/systemtests/tests/py2plug-fd-local-fileset-restoreobject/testrunner
index 8d73dd9fe..3d2ebdea1 100755
--- a/systemtests/tests/py2plug-fd-local-fileset-restoreobject/testrunner
+++ b/systemtests/tests/py2plug-fd-local-fileset-restoreobject/testrunner
@@ -26,9 +26,6 @@ JobName=backup-bareos-fd
"${rscripts}"/cleanup
"${rscripts}"/setup
-
-
-
# Fill ${BackupDirectory} with data.
setup_data
@@ -53,7 +50,6 @@ messages
@# now do a restore
@#
@$out $tmp/log2.out
-wait
restore client=bareos-fd fileset=PluginTest where=$tmp/bareos-restores select all done yes
status client=bareos-fd
wait
@@ -62,7 +58,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
list=( $(find "${BackupDirectory}" -type f) )
diff --git a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in b/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
deleted file mode 100644
index 89256864d..000000000
--- a/systemtests/tests/py2plug-fd-local-fileset/etc/bareos/bareos-dir.d/job/RestoreFiles.conf.in
+++ /dev/null
@@ -1,11 +0,0 @@
-Job {
- Name = "RestoreFiles"
- Description = "Standard Restore template. Only one such job is needed for all standard Jobs/Clients/Storage ..."
- Type = Restore
- Client = bareos-fd
- FileSet = SelfTest
- Storage = File
- Pool = Incremental
- Messages = Standard
- Where = @tmp@/bareos-restores
-}
diff --git a/systemtests/tests/py2plug-fd-mariabackup/testrunner b/systemtests/tests/py2plug-fd-mariabackup/testrunner
index 0a50cc36d..2784de642 100755
--- a/systemtests/tests/py2plug-fd-mariabackup/testrunner
+++ b/systemtests/tests/py2plug-fd-mariabackup/testrunner
@@ -115,10 +115,9 @@ if ! echo "SELECT * from test " | $MYSQL_CLIENT "${mariabackup_test_db}" | grep
estat=3
fi
-mysql_server_stop
-
check_for_zombie_jobs storage=File
-stop_bareos
+
+mysql_server_stop
check_two_logs
diff --git a/systemtests/tests/py2plug-fd-ovirt/testrunner.in b/systemtests/tests/py2plug-fd-ovirt/testrunner.in
index 964f41b7d..9e099a135 100755
--- a/systemtests/tests/py2plug-fd-ovirt/testrunner.in
+++ b/systemtests/tests/py2plug-fd-ovirt/testrunner.in
@@ -50,7 +50,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
diff --git a/systemtests/tests/py2plug-fd-percona-xtrabackup/testrunner b/systemtests/tests/py2plug-fd-percona-xtrabackup/testrunner
index 54023187c..2f79ffa45 100755
--- a/systemtests/tests/py2plug-fd-percona-xtrabackup/testrunner
+++ b/systemtests/tests/py2plug-fd-percona-xtrabackup/testrunner
@@ -113,10 +113,10 @@ if ! echo "SELECT * from test " | $MYSQL_CLIENT "${xtrabackup_test_db}" | grep "
estat=3
fi
-mysql_server_stop
check_for_zombie_jobs storage=File
-stop_bareos
+
+mysql_server_stop
check_two_logs
diff --git a/systemtests/tests/py2plug-fd-vmware/testrunner b/systemtests/tests/py2plug-fd-vmware/testrunner
index 06b257278..f80846a69 100755
--- a/systemtests/tests/py2plug-fd-vmware/testrunner
+++ b/systemtests/tests/py2plug-fd-vmware/testrunner
@@ -65,7 +65,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
diff --git a/systemtests/tests/py2plug-sd/testrunner b/systemtests/tests/py2plug-sd/testrunner
index 07b2cc361..33416aeca 100755
--- a/systemtests/tests/py2plug-sd/testrunner
+++ b/systemtests/tests/py2plug-sd/testrunner
@@ -52,7 +52,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
events=(bsdEventJobStart
bsdEventDeviceReserve
diff --git a/systemtests/tests/py3plug-fd-local-fileset b/systemtests/tests/py3plug-fd-local-fileset
deleted file mode 120000
index 616bb8019..000000000
--- a/systemtests/tests/py3plug-fd-local-fileset
+++ /dev/null
@@ -1 +0,0 @@
-py2plug-fd-local-fileset \ No newline at end of file
diff --git a/systemtests/tests/py3plug-fd-local-fileset-basic b/systemtests/tests/py3plug-fd-local-fileset-basic
new file mode 120000
index 000000000..5bdd8cc87
--- /dev/null
+++ b/systemtests/tests/py3plug-fd-local-fileset-basic
@@ -0,0 +1 @@
+py2plug-fd-local-fileset-basic \ No newline at end of file
diff --git a/systemtests/tests/scheduler-backup/etc/bareos/bareos-dir.d/schedule/schedule.conf b/systemtests/tests/scheduler-backup/etc/bareos/bareos-dir.d/schedule/schedule.conf
deleted file mode 100644
index 240185e33..000000000
--- a/systemtests/tests/scheduler-backup/etc/bareos/bareos-dir.d/schedule/schedule.conf
+++ /dev/null
@@ -1,63 +0,0 @@
-Schedule {
- Name = "TestCycle"
- Run = Level=Full hourly at 0:00
- Run = Level=Full hourly at 0:01
- Run = Level=Full hourly at 0:02
- Run = Level=Full hourly at 0:03
- Run = Level=Full hourly at 0:04
- Run = Level=Full hourly at 0:05
- Run = Level=Full hourly at 0:06
- Run = Level=Full hourly at 0:07
- Run = Level=Full hourly at 0:08
- Run = Level=Full hourly at 0:09
- Run = Level=Full hourly at 0:10
- Run = Level=Full hourly at 0:11
- Run = Level=Full hourly at 0:12
- Run = Level=Full hourly at 0:13
- Run = Level=Full hourly at 0:14
- Run = Level=Full hourly at 0:15
- Run = Level=Full hourly at 0:16
- Run = Level=Full hourly at 0:17
- Run = Level=Full hourly at 0:18
- Run = Level=Full hourly at 0:19
- Run = Level=Full hourly at 0:20
- Run = Level=Full hourly at 0:21
- Run = Level=Full hourly at 0:22
- Run = Level=Full hourly at 0:23
- Run = Level=Full hourly at 0:24
- Run = Level=Full hourly at 0:25
- Run = Level=Full hourly at 0:26
- Run = Level=Full hourly at 0:27
- Run = Level=Full hourly at 0:28
- Run = Level=Full hourly at 0:29
- Run = Level=Full hourly at 0:30
- Run = Level=Full hourly at 0:31
- Run = Level=Full hourly at 0:32
- Run = Level=Full hourly at 0:33
- Run = Level=Full hourly at 0:34
- Run = Level=Full hourly at 0:35
- Run = Level=Full hourly at 0:36
- Run = Level=Full hourly at 0:37
- Run = Level=Full hourly at 0:38
- Run = Level=Full hourly at 0:39
- Run = Level=Full hourly at 0:40
- Run = Level=Full hourly at 0:41
- Run = Level=Full hourly at 0:42
- Run = Level=Full hourly at 0:43
- Run = Level=Full hourly at 0:44
- Run = Level=Full hourly at 0:45
- Run = Level=Full hourly at 0:46
- Run = Level=Full hourly at 0:47
- Run = Level=Full hourly at 0:48
- Run = Level=Full hourly at 0:49
- Run = Level=Full hourly at 0:50
- Run = Level=Full hourly at 0:51
- Run = Level=Full hourly at 0:52
- Run = Level=Full hourly at 0:53
- Run = Level=Full hourly at 0:54
- Run = Level=Full hourly at 0:55
- Run = Level=Full hourly at 0:56
- Run = Level=Full hourly at 0:57
- Run = Level=Full hourly at 0:58
- Run = Level=Full hourly at 0:59
-}
diff --git a/systemtests/tests/scheduler-backup/test-setup b/systemtests/tests/scheduler-backup/test-setup
index 3b467ba11..30231d4c2 100755
--- a/systemtests/tests/scheduler-backup/test-setup
+++ b/systemtests/tests/scheduler-backup/test-setup
@@ -2,7 +2,7 @@
# BAREOSĀ® - Backup Archiving REcovery Open Sourced
#
-# Copyright (C) 2021-2021 Bareos GmbH & Co. KG
+# Copyright (C) 2021-2022 Bareos GmbH & Co. KG
#
# This program is Free Software; you can redistribute it and/or
# modify it under the terms of version three of the GNU Affero General Public
@@ -34,6 +34,24 @@ set -u
# Fill ${BackupDirectory} with data.
setup_data
+
+# Setup scheduler configuration to run at current time
+if [ $(date +"%S") -ge 50 ]; then
+ sleep 11
+ # to avoid case when we set a scheduled time at for example 13:01 and
+ # before the setup is finished, it becomes 13:02 and schedule doesn't
+ # start. So we give the test extra time to go to the next minute.
+fi
+
+currenttime=$(date +"%H:%M")
+
+[[ -d "${conf}/bareos-dir.d/schedule" ]] || mkdir "${conf}/bareos-dir.d/schedule"
+
+echo "Schedule {
+ Name = \"TestCycle\"
+ Run = Level=Full daily at $currenttime
+}" > "$conf"/bareos-dir.d/schedule/schedule.conf
+
bin/bareos start
# make sure, director is up and running.
diff --git a/systemtests/tests/scheduler-backup/testrunner-scheduler-backup b/systemtests/tests/scheduler-backup/testrunner-scheduler-backup
index 4f23ee3dc..e68285e5a 100755
--- a/systemtests/tests/scheduler-backup/testrunner-scheduler-backup
+++ b/systemtests/tests/scheduler-backup/testrunner-scheduler-backup
@@ -34,8 +34,7 @@ messages
@#
@$out $tmp/log2.out
wait
-restore client=bareos-fd fileset=SelfTest where=$tmp/bareos-restores select all done
-yes
+restore client=bareos-fd fileset=SelfTest where=$tmp/bareos-restores select all done yes
wait
messages
quit
diff --git a/systemtests/tests/scheduler-backup/testrunner-scheduler-status-copy-job b/systemtests/tests/scheduler-backup/testrunner-scheduler-status-copy-job
index 15f9bd790..d689dab2c 100755
--- a/systemtests/tests/scheduler-backup/testrunner-scheduler-status-copy-job
+++ b/systemtests/tests/scheduler-backup/testrunner-scheduler-status-copy-job
@@ -19,13 +19,16 @@ export TestName
start_test
+disablelog="$tmp"/disablelog.out
+statuslog="$tmp"/statuslog.out
+
cat <<END_OF_DATA >$tmp/bconcmds
messages
-@$out $tmp/log3.out w
+@$out $disablelog
enable client=bareos-fd
status scheduler job=copy
-@$out $tmp/log4.out w
+@$out $statuslog
disable client=bareos-fd
status scheduler job=copy
wait
@@ -36,14 +39,14 @@ END_OF_DATA
run_bconsole
#check that `status scheduler job=...` returns scheduled copy jobs
-if ! grep "TestCycle Level=Full" "$tmp"/log3.out; then
- echo "No scheduled job was found in $tmp/log3.out, which should contain all scheduled jobs" >&2
+if ! grep "TestCycle Level=Full" "$disablelog"; then
+ echo "No scheduled jobs were found in $disablelog, which should contain all scheduled jobs" >&2
estat=1
fi
#check that `status scheduler job=...` returns nothing when we disable the client
-if grep "TestCycle Level=Full" "$tmp"/log4.out; then
- echo "a scheduled job was listed in $tmp/log4.out, which shouldn't happen" >&2
+if grep "TestCycle Level=Full" "$statuslog"; then
+ echo "a scheduled job was listed in $statuslog, which shouldn't happen" >&2
estat=1
fi
diff --git a/systemtests/tests/spool/testrunner b/systemtests/tests/spool/testrunner
index 6d4de716a..63153c833 100755
--- a/systemtests/tests/spool/testrunner
+++ b/systemtests/tests/spool/testrunner
@@ -52,7 +52,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff ${BackupDirectory}
diff --git a/systemtests/tests/truncate-command/testrunner b/systemtests/tests/truncate-command/testrunner
index 3255543e8..d6de21df0 100755
--- a/systemtests/tests/truncate-command/testrunner
+++ b/systemtests/tests/truncate-command/testrunner
@@ -70,9 +70,6 @@ run_bconsole ${tmp}/bconcmds2
# verify that all are terminated
check_for_zombie_jobs storage=File1 client=${Client}
-# stop bareos
-stop_bareos
-
# check tmp/log1.out and tmp/log2.out for errors
check_two_logs
diff --git a/systemtests/tests/virtualfull-bscan/testrunner b/systemtests/tests/virtualfull-bscan/testrunner
index 995322715..2564a9e80 100755
--- a/systemtests/tests/virtualfull-bscan/testrunner
+++ b/systemtests/tests/virtualfull-bscan/testrunner
@@ -128,7 +128,6 @@ END_OF_DATA
run_bconsole "$tmp/bconcmds2"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs
check_restore_diff "${BackupDirectory}"
diff --git a/systemtests/tests/virtualfull/testrunner b/systemtests/tests/virtualfull/testrunner
index 98ea747d7..73adbf6fb 100755
--- a/systemtests/tests/virtualfull/testrunner
+++ b/systemtests/tests/virtualfull/testrunner
@@ -119,7 +119,6 @@ END_OF_DATA
run_bconsole "$tmp/bconcmds3"
check_for_zombie_jobs storage=File
check_two_logs
-stop_bareos
if ! grep -q "Consolidating JobIds 1,2 containing 74 files" "$tmp/log1.out"; then
echo "Consolidation message was not emitted" >&2
diff --git a/systemtests/tests/xattr/testrunner b/systemtests/tests/xattr/testrunner
index 88b7a2254..1387ca19f 100755
--- a/systemtests/tests/xattr/testrunner
+++ b/systemtests/tests/xattr/testrunner
@@ -62,7 +62,6 @@ END_OF_DATA
run_bareos "$@"
check_for_zombie_jobs storage=File
-stop_bareos
check_two_logs