ADD_TEST(disk:migration-volume-test "@regressdir@/tests/migration-volume-test")
ADD_TEST(disk:multi-storage-test "@regressdir@/tests/multi-storage-test")
ADD_TEST(disk:prune-test "@regressdir@/tests/prune-test")
-ADD_TEST(disk:prune-config-test "@regressdir@/tests/prune-config-test")
+#ADD_TEST(disk:prune-config-test "@regressdir@/tests/prune-config-test")
ADD_TEST(disk:prune-migration-test "@regressdir@/tests/prune-migration-test")
ADD_TEST(disk:prune-copy-test "@regressdir@/tests/prune-copy-test")
ADD_TEST(disk:prune-base-job-test "@regressdir@/tests/prune-base-job-test")
./run tests/multi-storage-test
# Disabled because certain pruning turned off
#./run tests/prune-test
-./run tests/prune-config-test
+# Disabled because Cartika fix breaks it
+#./run tests/prune-config-test
./run tests/prune-migration-test
./run tests/prune-copy-test
./run tests/prune-base-job-test
# Prefer Mounted Volumes = no
}
+Job {
+ Name = "Save"
+ Type = Backup
+ Client=@hostname@-fd
+ FileSet="Full Set"
+ Storage = File
+ Messages = Standard
+ Pool = Default
+ Write Bootstrap = "@working_dir@/Save.bsr"
+ Maximum Concurrent Jobs = 4
+}
+
Job {
Name = "migrate-job"
Type = Migrate
zstat=1
exit 1
fi
+grep " READ " ${tmp}/sd.out 2>&1 >/dev/null
+if [ $? = 0 ]; then
+ echo " "
+ echo " !!!! Zombie \"Read\" Jobs in Storage daemon !!!!"
+ echo " !!!! Zombie \"Read\" Jobs in Storage daemon !!!!" >>test.out
+ cat ${tmp}/sd.out
+ echo " "
+ zstat=1
+ exit 1
+fi
grep "ERROR" ${tmp}/log*.out 2>&1 >/dev/null
if [ $? = 0 ] ; then
echo " "
rm -rf ${working}/log ${tmp}/TEST-*
rm -rf ${working}/log ${tmp}/Backup-*
rm -rf ${working}/*.bsr ${working}/log*.sd
-rm -rf ${working}/*.trace ${working}/*.traceback ${working}/*.bactrace
+rm -rf ${working}/*.trace ${working}/*.traceback ${working}/*.lockdump
+rm -rf ${working}/@*
rm -rf ${tmp}disk-changer
rm -f ${cwd}/bin/plugins/test-plugin-fd.so
find . -name "gigaslam.gif" -exec rm -f {} \;
# set ports and other default parameters
BASEPORT=${BASEPORT:-8101}
AUTOCHANGER_SCRIPT=${AUTOCHANGER_SCRIPT:-mtx-changer}
+REMOTE_HOST_ADDR=${REMOTE_HOST_ADDR:-localhost}
+REMOTE_HOST_NAME=${REMOTE_HOST_NAME:-localhost}
LIBDBI=${LIBDBI:-}
libdbi=${LIBDBI}
srcdir=${BACULA_SOURCE}
os=${os}-`./scripts/get-os`
fi
dbengine=`echo ${WHICHDB} | sed -e 's/--with-//' -e 's/=.*//'`
-bversion=`sed -n -e 's/^.*VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
-bdate=`sed -n -e 's/^.*LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+bversion=`sed -n -e 's/^#define VERSION.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
+bdate=`sed -n -e 's/^#define LSMDATE.*"\(.*\)"$/\1/p' ${srcdir}/src/version.h`
builddir="${src}"
# Create sed command script
-echo "s%@sbindir@%${bin}%g" >${out}
+echo "s%@remotehostaddr@%${REMOTE_HOST_ADDR}%g" >${out}
+echo "s%@remotedirname@%${REMOTE_DIR_NAME}%g" >>${out}
+echo "s%@sbindir@%${bin}%g" >>${out}
echo "s%@scriptdir@%${scripts}%g" >>${out}
echo "s%@working_dir@%${working}%g" >>${out}
echo "s%@piddir@%${working}%g" >>${out}
echo "s%@subsysdir@%${working}%g" >>${out}
echo "s%@job_email@%${EMAIL}%g" >>${out}
echo "s%@tape_drive@%${TAPE_DRIVE}%g" >>${out}
+echo "s%@tape_control@%${TAPE_CONTROL}%g" >>${out}
echo "s%@autochanger@%${AUTOCHANGER}%g" >>${out}
echo "s%@changer_script@%${AUTOCHANGER_SCRIPT}%g" >>${out}
echo "s%@tmpdir@%${tmp}%g" >>${out}
echo "s%@hostname@%${HOST}%g" >>${out}
echo "s%@changer_path@%${AUTOCHANGER_PATH}%g" >>${out}
echo "s%@tape_drive1@%${TAPE_DRIVE1}%g" >>${out}
+echo "s%@tape_control1@%${TAPE_CONTROL1}%g" >>${out}
echo "s%@smtp_host@%${SMTP_HOST}%g" >>${out}
echo "s%@disk_drive@%${tmp}/disk-changer%g" >>${out}
echo "s%@hostname@%${hostname}%g" >>${out}
my @exclude;
my $hash;
my $ret=0;
+my $notop=0;
GetOptions("src=s" => \$src, # source directory
"dst=s" => \$dst, # dest directory
"wattr" => \$wattr, # windows attributes
"mtime-dir" => \$mtimedir, # check mtime on directories
"exclude=s@" => \@exclude, # exclude some files
+ "notop" => \$notop, # Exclude top directory
"help" => \$help,
) or pod2usage(-verbose => 1,
-exitval => 1);
chdir($src) or die "ERROR: Can't access to $src";
$hash = \%src_attr;
+
find(\&wanted_src, '.');
if ($wattr) {
foreach my $f (keys %src_attr)
{
+ if ($notop && $f eq '.') {
+ delete $src_attr{$f};
+ delete $dst_attr{$f};
+ next;
+ }
+
if (!defined $dst_attr{$f}) {
$ret++;
print "diff.pl ERROR: Can't find $f in dst\n";
($val1, $val2) =
(map { strftime('%F %T', localtime($_)) } ($val1, $val2));
}
+ if ($k =~ /mode/) {
+ ($val1, $val2) =
+ (map { sprintf('%o', $_) } ($val1, $val2));
+ }
print "diff.pl ERROR: src and dst $f2 differ on $k ($val1 != $val2)\n";
}
delete $attr{$k};
start_test()
{
check_encoding
+ rm -rf ${working}/@*
# Turn off email
outf="${tmp}/sed_tmp"
echo "s% mail =%# mail = %g" >${outf}
echo "s% operator =%# operator =%g" >>${outf}
cp ${conf}/bacula-dir.conf ${tmp}/1
sed -f ${outf} ${tmp}/1 > ${conf}/bacula-dir.conf
+ if [ x$FORCE_SDCALLS = xyes ]; then
+ $bperl -e 'add_attribute("$conf/bacula-dir.conf", "SD Calls Client", "yes", "Client")'
+ fi
+ ./test_starttime
echo " "
echo " "
echo " === Starting $TestName at `date +%R:%S` ==="
check_duration()
{
LOG=$1
- TIME=$2
+ $2
OP=${3-gt}
get_duration $LOG
print_debug "Found database encoding error"
bstat=2
fi
+ grep "Orphaned buffer" ${tmp}/log1.out ${tmp}/log2.out
+ if test $? -eq 0; then
+ estat=1
+ fi
}
check_restore_diff()
{
if test "$debug" -eq 1 ; then
- $rscripts/diff.pl -s ${src} -d ${tmp}/bacula-restores${src}
+ $rscripts/diff.pl -notop -s ${src} -d ${tmp}/bacula-restores${src} 2>&1 >/tmp/d$$
+ if test $? -ne 0; then
+ dstat=1
+ cat /tmp/d$$
+ ls -Rl ${src}
+ ls -Rl ${tmp}/bacula-restores${src}
+ fi
+ rm -f /tmp/d$$
diff -ur ${src} ${tmp}/bacula-restores${src}
else
+ $rscripts/diff.pl -notop -s ${src} -d ${tmp}/bacula-restores${src} 2>&1 >/dev/null
+ if test $? -ne 0; then
+ dstat=1
+ fi
diff -ur ${src} ${tmp}/bacula-restores${src} 2>&1 >/dev/null
fi
- dstat=$?
+ if test $? -ne 0; then
+ dstat=1
+ fi
}
check_restore_bin_diff()
{
if test "$debug" -eq 1 ; then
- $rscripts/diff.pl -s ${bin} -d ${tmp}/bacula-restores${bin}
+ $rscripts/diff.pl -notop -s ${bin} -d ${tmp}/bacula-restores${bin} 2>&1 >/tmp/d$$
+ if test $? -ne 0; then
+ dstat=1
+ cat /tmp/d$$
+ ls -Rl ${src}
+ ls -Rl ${tmp}/bacula-restores${src}
+ fi
+ rm -f /tmp/d$$
diff -ur ${bin} ${tmp}/bacula-restores${bin}
else
+ $rscripts/diff.pl -notop -s ${bin} -d ${tmp}/bacula-restores${bin} 2>&1 >/dev/null
+ if test $? -ne 0; then
+ dstat=1
+ fi
diff -ur ${bin} ${tmp}/bacula-restores${bin} 2>&1 >/dev/null
fi
- dstat=$?
+ if test $? -ne 0; then
+ dstat=1
+ fi
}
check_restore_tmp_build_diff()
{
if test "$debug" -eq 1 ; then
- $rscripts/diff.pl -s ${tmpsrc} -d ${tmp}/bacula-restores${tmpsrc}
+ $rscripts/diff.pl -notop -s ${tmpsrc} -d ${tmp}/bacula-restores${tmpsrc} 2>&1 >/tmp/d$$
+ if test $? -ne 0; then
+ dstat=1
+ cat /tmp/d$$
+ ls -Rl ${src}
+ ls -Rl ${tmp}/bacula-restores${src}
+ fi
+ rm -f /tmp/d$$
diff -ur ${tmpsrc} ${tmp}/bacula-restores${tmpsrc}
else
+ $rscripts/diff.pl -notop -s ${tmpsrc} -d ${tmp}/bacula-restores${tmpsrc} 2>&1 >/dev/null
+ if test $? -ne 0; then
+ dstat=1
+ fi
diff -ur ${tmpsrc} ${tmp}/bacula-restores${tmpsrc} 2>&1 >/dev/null
fi
- dstat=$?
+ if test $? -ne 0; then
+ dstat=1
+ fi
}
# bstat is backup error
if [ x$notracedump != xyes ]; then
cat ${working}/bacula.*.traceback 2>/dev/null
cp -f ${working}/bacula.*.traceback ${dumps} 2>/dev/null
- cat ${working}/*.bactrace 2>/dev/null
- cp -f ${working}/*.bactrace ${dumps} 2>/dev/null
+ cat ${working}/*.lockdump 2>/dev/null
+ cp -f ${working}/*.lockdump ${dumps} 2>/dev/null
fi
if [ -f $tmp/err.log ]; then
cat $tmp/err.log
fi
+ d=`./test_duration`
+ t=`date +%R:%S`
if [ $estat != 0 ] ; then
echo " "
- echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! "
- echo " Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat"
- echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! " >>test.out
- echo " Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out
+ echo " !!!!! $TestName failed!!! $t $d !!!!! "
+ echo " Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat"
+ echo " " >>test.out
+ echo " !!!!! $TestName failed!!! $t $d !!!!! " >>test.out
+ echo " Status: estat=$estat zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out
echo " "
exit 1
fi
if [ $zstat != 0 ] ; then
echo " "
- echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! "
- echo " Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat"
- echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! " >>test.out
- echo " Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out
+ echo " !!!!! $TestName failed!!! $t $d !!!!! "
+ echo " Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat"
+ echo " " >>test.out
+ echo " !!!!! $TestName failed!!! $t $d !!!!! " >>test.out
+ echo " Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out
echo " "
exit 1
fi
if [ $dstat != 0 -o $bstat != 0 -o $rstat != 0 ] ; then
echo " "
- echo " "
- echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! "
- echo " Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat"
- echo " !!!!! $TestName failed!!! `date +%R:%S` !!!!! " >>test.out
- echo " Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out
+ echo " !!!!! $TestName failed!!! $t $d !!!!! "
+ echo " Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat"
+ echo " " >>test.out
+ echo " !!!!! $TestName failed!!! $t %d !!!!! " >>test.out
+ echo " Status: zombie=$zstat backup=$bstat restore=$rstat diff=$dstat" >>test.out
if [ $bstat != 0 -o $rstat != 0 ] ; then
- echo " !!!!! Bad termination status !!!!! "
- echo " !!!!! Bad termination status !!!!! " >>test.out
+ echo " !!! Bad termination status !!! "
+ echo " !!! Bad termination status !!! " >>test.out
else
- echo " !!!!! Restored files differ !!!!! "
- echo " !!!!! Restored files differ !!!!! " >>test.out
+ echo " !!! Restored files differ !!! "
+ echo " !!! Restored files differ !!! " >>test.out
fi
- echo " Status: backup=$bstat restore=$rstat diff=$dstat"
- echo " Status: backup=$bstat restore=$rstat diff=$dstat" >>test.out
- echo " Test owner of $SITE_NAME is $EMAIL"
- echo " Test owner of $SITE_NAME is $EMAIL" >>test.out
+ echo " Status: backup=$bstat restore=$rstat diff=$dstat"
+ echo " Status: backup=$bstat restore=$rstat diff=$dstat" >>test.out
+ echo " Test owner of $SITE_NAME is $EMAIL"
+ echo " Test owner of $SITE_NAME is $EMAIL" >>test.out
+ echo " " >>test.out
echo " "
exit 1
else
- echo " ===== $TestName OK `date +%R:%S` ===== "
- echo " ===== $TestName OK `date +%R:%S` ===== " >>test.out
+ echo " ===== $TestName OK $t $d ===== "
+ echo " ===== $TestName OK $t $d ===== " >>test.out
if test "$debug" -eq 0 ; then
${rscripts}/cleanup
fi
${rscripts}/cleanup
}
-disable_pluguins()
+disable_plugins()
{
for i in ${conf}/bacula-fd.conf; do
sed 's/Plugin/#Plugin/' $i > $tmp/1
done
}
-update_win32()
-{
- if [ -d $cwd/build/src/win32/release32 \
- -a -d $cwd/build/src/win32/release64 ] \
- || [ -d $cwd/release32 -a -d $cwd/release64 ]
- then
- echo -ne "Try to upgrade the FileDaemon:\t"
- wget -qO - "$WIN32_ADDR:8091/install"
- fi
-}
-
debug_wait()
{
if test "x${REGRESS_WAIT}" = "x1"; then
+++ /dev/null
-#!/bin/sh
-#
-# This is the configuration script for regression testing
-#
-
-. ${1}/config
-if test "x" = "x"; then
- PASSWD=
-else
- PASSWD="--with-db-password="
-fi
-
-if [ -z "${CFLAGS}" ]; then
- CFLAGS="-g -O2 -Wall"
- export CFLAGS
-fi
-
-./configure \
- --sbindir=${1}/bin \
- --libdir=${1}/bin \
- --sysconfdir=${1}/bin \
- --mandir=${1}/bin \
- --docdir=${1}/bin/html \
- --htmldir=${1}/bin/html \
- --with-pid-dir=${1}/working \
- --with-subsys-dir=${1}/working \
- --with-plugindir=${1}/bin/plugins \
- --enable-smartalloc \
- --enable-lockmgr \
- --disable-readline \
- --with-working-dir=${1}/working \
- --with-archivedir=${1}/tmp \
- --with-dump-email=${EMAIL} \
- --with-job-email=${EMAIL} \
- --with-smtp-host=${SMTP_HOST} \
- --with-db-name=regress \
- --with-db-user=regress \
- ${PASSWD} \
- ${OPENSSL} \
- ${TCPWRAPPERS} \
- ${WHICHDB} \
- --with-baseport=${BASEPORT}
-
-LD_LIBRARY_PATH=${1}/bin:${LD_LIBRARY_PATH}
-export LD_LIBRARY_PATH
-
-exit 0
--with-pid-dir=${1}/working \
--with-subsys-dir=${1}/working \
--with-plugindir=${1}/bin/plugins \
+ --with-logdir=${1}/working \
--enable-smartalloc \
--enable-lockmgr \
--disable-readline \
check_two_logs
check_restore_diff
-rm -rf ${cwd}/tmp/bacula-restores ${cwd}/build/accurate/bacula-restores
+rm -rf ${cwd}/tmp/bacula-restores
################################################################
p Check with bscan
check_two_logs
check_restore_diff
-rm -rf ${cwd}/tmp/bacula-restores
+rm -rf ${cwd}/tmp/bacula-restores ${cwd}/build/accurate/bacula-restores
################################################################
p Now do a test with other attributes: owner, gid, rights
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
@# setdebug level=100 storage=File
@#
@$out ${cwd}/tmp/log2.out
list volumes
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
+@#setdebug level=15 director
+@#setdebug level=150 storage=DiskChanger
+@# Note, here we are restoring from the original backup,
+@# so if you specify storage=DiskChanger the restore will fail
+restore where=${cwd}/tmp/bacula-restores select
unmark *
mark *
done
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
@# setdebug level=100 storage=File
@#
@$out ${cwd}/tmp/log2.out
list volumes
-restore copies where=${cwd}/tmp/bacula-restores select storage=DiskChanger
+@# Note, here we are restoring from the original backup,
+@# so if you specify storage=DiskChanger the restore will fail
+restore copies where=${cwd}/tmp/bacula-restores select
unmark *
mark *
done
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
+setdebug level=50 storage=DiskChanger
label storage=File volume=FileVolume001 Pool=Default
label storage=File volume=FileVolume002 Pool=Scratch
update Volume=FileVolume001 MaxVolBytes=3000000 pool=Default
@# Use File instead of DiskChanger
@# Files are there
@############################################################
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
+@# Note, here we are restoring from the original backup,
+@# so if you specify storage=DiskChanger the restore will fail
+restore where=${cwd}/tmp/bacula-restores select
unmark *
mark *
done
@# Files are there
@############################################################
@$out ${cwd}/tmp/log3.out
+setdebug level=50 storage=DiskChanger
purge volume=FileVolume001 yes
purge volume=FileVolume002 yes
-restore where=${cwd}/tmp/bacula-restores select storage=DiskChanger
+@# Note, here we are restoring from the original backup,
+@# so if you specify storage=DiskChanger the restore will fail
+restore where=${cwd}/tmp/bacula-restores select
unmark *
mark *
done
run job=$JobName yes
wait
messages
+setdebug level=50 storage=DiskChanger
restore where=${cwd}/tmp/bacula-restores select all
done
yes
start_test
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
setdebug level=100 storage=File
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
@# Force differential on the second Volume
run_bconsole
scripts/check_for_zombie_jobs storage=File
+echo "ficheriro1.txt" >${cwd}/tmp/build/ficheriro1.txt
echo "ficheriro2.txt" >${cwd}/tmp/build/ficheriro2.txt
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
run level=incremental job=$JobName yes
touch ${cwd}/build/src/test/test1 ${cwd}/build/src/test/test2
cat <<END_OF_DATA >$tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out $tmp/log1.out
-label volume=TestVolume001 storage=File pool=File
+label volume=TestVolume001 storage=File1 pool=File slot=1 drive=1
run job=$JobName yes
wait
messages
mv ${cwd}/build/src/test ${cwd}/build/po/test
cat <<END_OF_DATA >$tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out $tmp/log3.out
estimate listing job=$JobName level=incremental
run_bconsole
cat <<END_OF_DATA >$tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out $tmp/log4.out
estimate listing job=$JobName level=incremental accurate=yes
sed 's/JobDefs {/JobDefs { Accurate=yes/' $tmp/1>$scripts/bacula-dir.conf
cat <<END_OF_DATA >$tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out $tmp/log5.out
reload
run_bconsole
cat <<END_OF_DATA >$tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out $tmp/log6.out
estimate listing job=$JobName level=incremental accurate=no
dstat=2
fi
-check_for_zombie_jobs storage=File
+check_for_zombie_jobs storage=File1
stop_bacula
end_test
start_test
cat <<END_OF_DATA >${tmp}/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${tmp}/log1.out
-label volume=TestVolume001 storage=File pool=File
+label volume=TestVolume001 storage=File1 pool=File slot=1 drive=0
run job=$JobName yes
wait
messages
run_bconsole
-check_for_zombie_jobs storage=File
+check_for_zombie_jobs storage=File1
stop_bacula
#
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
setdebug level=000 storage=File
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
setdebug level=000 storage=File
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
@#setdebug level=10 dir
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
label storage=File volume=FileVolume001 Pool=Default
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
label storage=File volume=FileVolume001 Pool=Default
-#!/bin/sh
+ #!/bin/sh
#
# Run a backup of the Bacula build directory on two Volumes
# then migrate it to another device.
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
label storage=File volume=FileVolume001 Pool=Default
#!/bin/sh
#
-# This script will test prune algo
+# This script will test prune algo
#
+
+echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+echo " This test is will fail because of the workaround for the bug #5507"
+echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
+
. scripts/functions
-TestName="prune-test"
+TestName="prune-config-test"
JobName=NightlySave
scripts/cleanup
cat $tmp/1 >> $conf/bacula-dir.conf
cat <<EOF > ${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out $tmp/log1.out
label storage=File volume=TestVolume001
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
label storage=File volume=FileVolume001 Pool=Default
# Write out bconsole commands
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
-setdebug level=000 storage=File
+setdebug level=100 storage=File
label storage=File volume=FileVolume001 Pool=Default
label storage=DiskChanger volume=ChangerVolume001 slot=1 Pool=Full drive=0
label storage=DiskChanger volume=ChangerVolume002 slot=2 Pool=Full drive=0
wait
list jobs
@# should migrate two jobs
+setdebug level=150 storage=File
run job=migrate-job yes
run job=migrate-job yes
wait
$bperl -e 'add_attribute("$conf/bacula-dir.conf", "Job Retention", "1s", "Client")'
cat <<EOF > ${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out $tmp/log1.out
label storage=File volume=TestVolume001
# the interface defined by INTERFACE=
#
os=`uname`
+INTERFACE=lo
if [ $os = 'FreeBSD' ]; then
INTERFACE=bge0
IP=`ifconfig ${INTERFACE} | perl -ne '/inet (.+?) / && print $1'`
elif [ $os = 'Linux' ]; then
- INTERFACE=eth0
- IP=`ifconfig ${INTERFACE} | perl -ne '/inet addr:(.+?) / && print $1'`
+# INTERFACE=eth0
+ INTERFACE=lo
+ IP=`ifconfig ${INTERFACE} | perl -ne '/inet (addr:)?(.+?) / && print $2'`
fi
if [ "$IP" = '' ]; then
outf="tmp/sed_tmp"
echo "s/PidDirectory/DirSourceAddress=$IP; PidDirectory/g" > $outf
-echo "s/Address =/Address = 127.0.0.1 #/g" >> $outf
+echo "s/Address =/Address = \"127.0.0.1\" #/g" >> $outf
cp $scripts/bacula-dir.conf $tmp/1
sed -f ${outf} ${cwd}/tmp/1 > $scripts/bacula-dir.conf
start_test
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
-@#label volume=TestVolume001 storage=File pool=File
-@#setdebug level=100 storage=File
+@#label volume=TestVolume001 storage=File1 pool=File slot=1 drive=0
+@#setdebug level=100 storage=File1
+setbandwidth client limit=1000
run job=$JobName yes
@sleep 3
messages
sleep 5
print_debug "Detecting connections to SD sourced from ${IP}"
-netstat -tan | grep -E "127.0.0.1(.|:)$SDPORT .* ${IP}" > $tmp/log3.out
+netstat -tan | grep -E "127\.0\.0\.1(.|:)$SDPORT .* ${IP}" > $tmp/log3.out
if [ $? -ne 0 ]; then
stat=2
print_debug "Couldn't detect a connection to the SD sourced from SourceAddress ${IP}"
fi
print_debug "and connections to FD sourced from ${IP}"
-netstat -tan | grep -E "127.0.0.1(.|:)$FDPORT .* ${IP}" >> $tmp/log3.out
+netstat -tan | grep -E "127\.0\.0\.1(.|:)$FDPORT .* ${IP}" >> $tmp/log3.out
if [ $? -ne 0 ]; then
stat=2
print_debug "Couldn't detect a connection to the FD sourced from SourceAddress ${IP}"
fi
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
-messages
-@$out ${cwd}/tmp/log1.out
-label volume=TestVolume001 storage=File pool=File
-@#setdebug level=100 storage=File
+@output /dev/null
+setbandwidth client limit=1000000
wait
messages
@#
END_OF_DATA
run_bconsole
-check_for_zombie_jobs storage=File
+check_for_zombie_jobs storage=File1
stop_bacula
check_two_logs
check_restore_diff
start_test
cat <<END_OF_DATA >${cwd}/tmp/bconcmds
-@$out /dev/null
+@output /dev/null
messages
@$out ${cwd}/tmp/log1.out
-label volume=TestVolume001 storage=File pool=File
+label volume=TestVolume001 storage=File1 pool=File slot=1 drive=0
run job=$JobName yes
wait
messages
rstat=0
bstat=0
-check_for_zombie_jobs storage=File
+check_for_zombie_jobs storage=File1
stop_bacula
#!/bin/sh
#
#
-TestName="duplicate-job-test"
+TestName="tls-duplicate-job-test"
. scripts/functions
scripts/cleanup