From: Eric Bollengier Date: Wed, 2 Sep 2020 13:28:38 +0000 (+0200) Subject: BEE Backport regress/tests/messages-reload-test X-Git-Tag: Release-11.3.2~1196 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=849141515ea6c0fc5491b48debcdec4428e8940e;p=thirdparty%2Fbacula.git BEE Backport regress/tests/messages-reload-test This commit is the result of the squash of the following main commits: Author: Eric Bollengier Date: Tue Jul 21 10:28:13 2020 +0200 regress: Add copyright to regress scripts Author: Kern Sibbald Date: Tue Oct 23 18:52:29 2012 +0200 Drop previous regression test output Author: Eric Bollengier Date: Tue Feb 28 09:38:18 2012 +0100 regress: Add simple regress tests for the reload command --- diff --git a/regress/tests/messages-reload-test b/regress/tests/messages-reload-test new file mode 100755 index 0000000000..1ca9cb2e64 --- /dev/null +++ b/regress/tests/messages-reload-test @@ -0,0 +1,91 @@ +#!/bin/sh +# +# Copyright (C) 2000-2020 Kern Sibbald +# License: BSD 2-Clause; see file LICENSE-FOSS +# +# +TestName="reload-test" +. scripts/functions +JobName=reload + +scripts/cleanup +scripts/copy-confs + +# +# Zap out any schedule in default conf file so that +# it doesn't start during our test +# +outf="$tmp/sed_tmp" +echo "s% Schedule =%# Schedule =%g" >${outf} +cp $scripts/bacula-dir.conf $tmp/1 +sed -f ${outf} $tmp/1 >$scripts/bacula-dir.conf + +# create a bad bconsole configuration file +sed 's/Password = "../Password = "/' $conf/bconsole.conf > $conf/bconsole.conf.new + +start_test + +do_bad_connect() +{ + for i in `seq 1 50`; do + $bin/bconsole -c $conf/bconsole.conf.new + done +} + +do_reload() +{ + cat < $tmp/2 +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +reload +EOF + for i in `seq 1 1000`; do + run_bconsole $tmp/2 + done +} + +cat <$tmp/bconcmds +@output /dev/null +messages +@$out $tmp/log1.out +label volume=TestVolume001 storage=File pool=File +run job=BackupClient1 yes +quit +END_OF_DATA + +run_bacula + +do_bad_connect & + +do_reload & + +wait +wait + +stop_bacula +end_test