]> git.sur5r.net Git - bacula/bacula/commitdiff
Backport from BEE
authorKern Sibbald <kern@sibbald.com>
Thu, 27 Mar 2014 17:59:33 +0000 (18:59 +0100)
committerKern Sibbald <kern@sibbald.com>
Thu, 27 Mar 2014 17:59:33 +0000 (18:59 +0100)
30 files changed:
regress/DartTestfile.txt.in
regress/all-disk-tests
regress/scripts/bacula-dir-migration.conf.in
regress/scripts/check_for_zombie_jobs
regress/scripts/cleanup
regress/scripts/create_sed
regress/scripts/diff.pl
regress/scripts/functions
regress/scripts/regress-config [deleted file]
regress/scripts/regress-config.in
regress/tests/accurate-test
regress/tests/copy-job-test
regress/tests/copy-upgrade-test
regress/tests/copy-volume-test
regress/tests/differential-test
regress/tests/estimate-test
regress/tests/fileregexp-test
regress/tests/migration-job-purge-test
regress/tests/migration-job-test
regress/tests/migration-jobspan-test
regress/tests/migration-occupancy-test
regress/tests/migration-time-test
regress/tests/migration-volume-test
regress/tests/prune-config-test
regress/tests/prune-copy-test
regress/tests/prune-migration-test
regress/tests/prune-test
regress/tests/source-addr-test
regress/tests/stats-test
regress/tests/tls-duplicate-job-test

index 3860bdf3a3db915478bdec7a118d20324631ed11..7cef35f5672e24856f57253806d8065e04daec2a 100644 (file)
@@ -52,7 +52,7 @@ ADD_TEST(disk:migration-time-test "@regressdir@/tests/migration-time-test")
 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")
index 51725952168f02aa400710b53c54abe7646fe5e5..517c640fe04ba74385076062c9f266bf22097576 100755 (executable)
@@ -84,7 +84,8 @@ rm -f dumps/*
 ./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
index 5e58c07dccd15d83a03b934fb5b2745816473624..91423142ee5fe563c6195bc530723b2326bd3e68 100644 (file)
@@ -41,6 +41,18 @@ Job {
 # 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
index e2c240565b090c0b1912658a3f037680cd4edbda..2b1802a2e8c8efcf5616b4ca6fc91ffa5a7dd5d7 100755 (executable)
@@ -56,6 +56,16 @@ if [ $? != 0 ] ; then
   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 " "
index c501428061b7495b673262785fb8287c57de5ad5..4f8ccbb765763aee66e624632c5debfe4c1c41d6 100755 (executable)
@@ -11,7 +11,8 @@ rm -rf ${tmp}/*
 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 {} \;
index f2ac478cc17d41355825ac8ff42d52126c81e555..3cbf690e7384d21ba84bce1075567ccf29b5a185 100755 (executable)
@@ -11,6 +11,8 @@ out="${tmp}/sed_tmp"
 # 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}
@@ -28,24 +30,28 @@ else
   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}
index bf217cd60c8886716683f4ff17a8b8a5f08570c0..7e72349c6610e17a06d4307d3c62188e06d90ea4 100755 (executable)
@@ -28,6 +28,7 @@ my %dst_attr;
 my @exclude;
 my $hash;
 my $ret=0;
+my $notop=0;
 
 GetOptions("src=s"   => \$src,        # source directory
            "dst=s"   => \$dst,        # dest directory
@@ -36,6 +37,7 @@ GetOptions("src=s"   => \$src,        # source 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);
@@ -54,6 +56,7 @@ my $dir = getcwd;
 
 chdir($src) or die "ERROR: Can't access to $src";
 $hash = \%src_attr;
+
 find(\&wanted_src, '.');
 
 if ($wattr) {    
@@ -83,6 +86,12 @@ 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";
@@ -136,6 +145,10 @@ sub compare
                 ($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};
index 28f9912bcdf870de97a7fa5088196377be04f372..af5686f7a4d21f4ed468bb3be353af97896b1a74 100644 (file)
@@ -15,12 +15,17 @@ check_encoding()
 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` ==="
@@ -150,7 +155,7 @@ get_duration()
 check_duration()
 {
    LOG=$1
-   TIME=$2
+   $2
    OP=${3-gt}
 
    get_duration $LOG
@@ -279,40 +284,83 @@ check_two_logs()
       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
@@ -326,53 +374,58 @@ end_test()
    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
@@ -391,7 +444,7 @@ copy_test_confs()
    ${rscripts}/cleanup
 }
 
-disable_pluguins()
+disable_plugins()
 {
    for i in ${conf}/bacula-fd.conf; do
       sed 's/Plugin/#Plugin/' $i > $tmp/1
@@ -399,17 +452,6 @@ disable_pluguins()
    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
diff --git a/regress/scripts/regress-config b/regress/scripts/regress-config
deleted file mode 100755 (executable)
index 1c8b3e4..0000000
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/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
index 4f0d46efc78e646604aa2c5b1170388bbbeb93bb..49a4c63b59ed0d062b19bde54ee55ec081afb5ca 100755 (executable)
@@ -25,6 +25,7 @@ fi
     --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 \
index 21ae4544c126ae27d05a52ffcab50afcd789d41e..e64f24e5fe5fd58fbe99cdf8fb1b315f79cd17e2 100755 (executable)
@@ -274,7 +274,7 @@ check_for_zombie_jobs storage=File
 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
@@ -317,7 +317,7 @@ check_for_zombie_jobs storage=File
 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
index b2aa2a3b8fd901f18c96886b6df64e1b0bc6dcaf..5e6b2f28643ed00d7d445e932ba40ddd9263bed4 100755 (executable)
@@ -29,7 +29,7 @@ start_test
 
 # 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
@@ -70,7 +70,11 @@ list jobs
 @#
 @$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
index 99d4ebfc6d807c0ff9b98d7cc7fd49b8eeccc6d8..c6b42897e7bf7eaf5c08d8cae66f7ee407b68d5d 100755 (executable)
@@ -30,7 +30,7 @@ start_test
 
 # 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
@@ -101,7 +101,9 @@ cat<<END_OF_DATA > ${cwd}/tmp/bconcmds.resto
 @#
 @$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
index 2783299f38c063a9fea2f54a028cdded6cd446b9..e6bff27345c76c9e508ab87a93a71b8577238cb8 100755 (executable)
@@ -32,9 +32,10 @@ start_test
 
 # 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
@@ -86,7 +87,9 @@ messages
 @#  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
@@ -112,9 +115,12 @@ cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @#  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
@@ -145,6 +151,7 @@ cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 run job=$JobName yes
 wait
 messages
+setdebug level=50 storage=DiskChanger
 restore where=${cwd}/tmp/bacula-restores select all
 done
 yes
index 898147dfc20b07367aa51ec3bdf31fd897c0c057..9fa6504c98f7dfa0883e9efd84736963a6412234 100755 (executable)
@@ -21,7 +21,7 @@ change_jobname CompressedTest $JobName
 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
@@ -40,7 +40,7 @@ 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
 @# Force differential on the second Volume
@@ -53,10 +53,11 @@ END_OF_DATA
 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
index b9c65caa4f670a7a7dd4b59497153ddd89c37714..8fd5e5996b526f0e06646a066acf19e4b8185d78 100755 (executable)
@@ -26,10 +26,10 @@ mkdir -p ${cwd}/build/src/test
 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
@@ -52,7 +52,7 @@ check_restore_diff
 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
@@ -63,7 +63,7 @@ END_OF_DATA
 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
@@ -77,7 +77,7 @@ cp $scripts/bacula-dir.conf $tmp/1
 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
@@ -89,7 +89,7 @@ END_OF_DATA
 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
@@ -125,7 +125,7 @@ if [ $? = 0 ]; then
     dstat=2
 fi
 
-check_for_zombie_jobs storage=File
+check_for_zombie_jobs storage=File1
 
 stop_bacula
 end_test
index ca639ec7455a844e0aec752d320026160672ff5d..7a0ed090d8b1c1abeae12fdf4143ddfc200664b5 100755 (executable)
@@ -24,10 +24,10 @@ change_jobname BackupClient1 $JobName
 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
@@ -59,7 +59,7 @@ END_OF_DATA
 
 run_bconsole
 
-check_for_zombie_jobs storage=File
+check_for_zombie_jobs storage=File1
 stop_bacula
 
 #
index 518b63c961cf17d328340d3bab6055e46fb75528..c7db6bd1bf9ece1fa62590a65516341ed25583e7 100755 (executable)
@@ -29,7 +29,7 @@ start_test
 
 # 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
index 16ca0e363c2820d075cea0f66ddc98cbb8d814c9..b9e4f28b5e7b2eac21c35c6c77d927a3471ca73f 100755 (executable)
@@ -26,7 +26,7 @@ start_test
 
 # 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
index b0024a1fc2de32987831b4cf9fef459f2dcca398..e90227ef3d3a8bc55512baef36774968c1f17a2f 100755 (executable)
@@ -31,7 +31,7 @@ start_test
 
 # 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
index fa2b53011a0faca60025eddbde74a81a42791916..d74f9f15a6ffe9a3a3522bf1d887f14be7754780 100755 (executable)
@@ -26,7 +26,7 @@ start_test
 
 # 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
index 3181e6d586280c5234f1e1ff2d3817ecfaab7e53..5a124ffa5275ec2c161b4c9f9520f116ffc3a782 100755 (executable)
@@ -26,7 +26,7 @@ start_test
 
 # 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
index dc951eaeb61c22ad3b2e397e8578b33f9bf81230..e2c19b8319ab063770e145fd3aed5af0fb1a985f 100755 (executable)
@@ -1,4 +1,4 @@
-#!/bin/sh
+                                  #!/bin/sh
 #
 # Run a backup of the Bacula build directory on two Volumes
 #   then migrate it to another device.             
@@ -28,7 +28,7 @@ start_test
 
 # 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
index e4baeeb5aae8a4c9711686f423a082380171969f..7bfd67bd0d88e33c098032240f33ddb9a999c11b 100755 (executable)
@@ -1,10 +1,15 @@
 #!/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
@@ -25,7 +30,7 @@ $bperl -e 'print get_resource("$conf/bacula-dir.conf", "Job", "NightlySave")' |
 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
index b3a6e5ae0f6ac5537966817655460e5e89b17bcd..fe0f3bc444a8f09781c02992e41cdb5e95f3f564 100755 (executable)
@@ -31,7 +31,7 @@ start_test
 
 # 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
index e2150116cb65209bfbd6a83772e18913a8b8db1c..0d9d2f41c378a78cc36519fb3ffd2f74d0fe6512 100755 (executable)
@@ -30,10 +30,10 @@ start_test
 
 # 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
@@ -45,6 +45,7 @@ run job=$JobName yes
 wait
 list jobs
 @# should migrate two jobs
+setdebug level=150 storage=File
 run job=migrate-job yes
 run job=migrate-job yes
 wait
index 308484fd25fd1811dac1b20c998bc7ccaf1fdee3..27a58b1df0c038dd14606cdb358790c8d96dcc62 100755 (executable)
@@ -19,7 +19,7 @@ $bperl -e 'add_attribute("$conf/bacula-dir.conf", "AutoPrune", "No", "Client")'
 $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
index 227007d21cf2a608720f9fea3c376f447e5a1188..800c5b813e6eb0fd1f476e5310bf2486696aa482 100755 (executable)
@@ -25,12 +25,14 @@ PATH=$PATH:/sbin:/usr/sbin
 #  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
@@ -40,7 +42,7 @@ fi
 
 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 
 
@@ -57,11 +59,12 @@ change_jobname BackupClient1 $JobName
 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
@@ -72,14 +75,14 @@ run_bacula
 
 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}"
@@ -94,11 +97,8 @@ if [ "$debug" = 1 ] ; then
 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
 @# 
@@ -113,7 +113,7 @@ quit
 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
index a7e97cf264afbf1726515445fb0999f875b141a3..51b6c3192d48cc9ae0bc70534f7ceea4f68287cd 100755 (executable)
@@ -23,10 +23,10 @@ change_jobname BackupClient1 $JobName
 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
@@ -58,7 +58,7 @@ dstat=0
 rstat=0
 bstat=0
 
-check_for_zombie_jobs storage=File
+check_for_zombie_jobs storage=File1
 stop_bacula
 
 
index 4161f8f18c006dfc42f7fec333f1ae79b204e431..3b1f9322c789b43dabf6acd46a1d36101d37cbcd 100755 (executable)
@@ -1,7 +1,7 @@
 #!/bin/sh
 #
 #
-TestName="duplicate-job-test"
+TestName="tls-duplicate-job-test"
 . scripts/functions
 
 scripts/cleanup