From: Kern Sibbald Date: Wed, 2 Sep 2020 13:33:41 +0000 (+0200) Subject: BEE Backport regress/tests/short-auto-label-test X-Git-Tag: Release-11.3.2~1163 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5233a45ff2b1eea04af27c5fdd9f6201883dab5d;p=thirdparty%2Fbacula.git BEE Backport regress/tests/short-auto-label-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 Aug 30 14:11:46 2016 +0200 regress: add new short developers test --- diff --git a/regress/tests/short-auto-label-test b/regress/tests/short-auto-label-test new file mode 100755 index 0000000000..7d5f5d5fdc --- /dev/null +++ b/regress/tests/short-auto-label-test @@ -0,0 +1,72 @@ +#!/bin/sh +# +# Copyright (C) 2000-2020 Kern Sibbald +# License: BSD 2-Clause; see file LICENSE-FOSS +# +# Short elementary Volume span test case for debugging. +# Here we create at least two volumes and the data spans the volume. +# + +TestName="short-auto-label-test" +JobName=AutoLabel +. scripts/functions + +copy_test_confs + +file="config.status" +echo "${cwd}/build/$file" >${cwd}/tmp/file-list + +cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1 +sed "s%# Simple Label Format% Label Format%" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf +cp ${cwd}/bin/bacula-dir.conf ${cwd}/tmp/1 +sed "s%# Maximum Volume Bytes = .*$% Maximum Volume Bytes = 65000%g" ${cwd}/tmp/1 >${cwd}/bin/bacula-dir.conf + +change_jobname Simple $JobName +start_test + +cat <${cwd}/tmp/bconcmds +@$out /dev/null +messages +@$out ${cwd}/tmp/log1.out +status all +list pools +messages +@#setdebug level=110 storage=File +run job=$JobName level=Full storage=File yes +wait +list volumes +sql +select * from JobMedia; + +@exec "sh -c 'ls -l ${cwd}/tmp/Backup*'" +messages +@# +@# now do a restore +@# +@$out ${cwd}/tmp/log2.out +setdebug level=500 storage=File +restore where=${cwd}/tmp/bacula-restores select storage=File +unmark * +mark * +pwd +done +yes +wait +messages +quit +END_OF_SCRIPT + +ls -l tmp/Backup* + +run_bacula +check_for_zombie_jobs storage=File +stop_bacula + +check_two_logs +# Check single file +diff -ur ${cwd}/build/$file ${tmp}/bacula-restores${src} +if test $? -ne 0; then + dstat=1 +fi +#check_restore_diff +end_test