]> git.sur5r.net Git - bacula/bacula/commitdiff
regress: more work on remote-fd test
authorEric Bollengier <eric@eb.homelinux.org>
Mon, 28 Feb 2011 15:53:43 +0000 (16:53 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Thu, 3 Mar 2011 07:59:02 +0000 (08:59 +0100)
regress/scripts/functions.pm
regress/tests/remote-fd-test

index 28e01215eff3f7382b19325e1da469ebf5108958..a9774a5af1a277065aac5e538e049517e76f8a9a 100644 (file)
@@ -33,7 +33,6 @@ use strict;
 =cut
 
 package scripts::functions;
-use File::Copy;
 # Export all functions needed to be used by a simple 
 # perl -Mscripts::functions -e '' script
 use Exporter;
@@ -625,6 +624,10 @@ Messages {
     # create a hardlink
     link("test.sh", "link-test.sh");
 
+    # create long filename
+    mkdir("b" x 255) or print "can't create long dir $!\n";
+    copy("test.sh", ("b" x 255) . '/' . ("a" x 255)) or print "can't create long dir $!\n";
+
     # play with some symlinks
     symlink("test.sh", "sym-test.sh");
     symlink("$REMOTE_FILE/save/test.sh", "sym-abs-test.sh");
index 31b3033431dde63b46fd85441c476d9bfebff249..f99703c59a9ee4a89a221b86bd106eba0e15eef4 100755 (executable)
@@ -40,18 +40,19 @@ fi
 $bperl -e remote_stop
 $bperl -e remote_init
 $bperl -e remote_config
-
-$bperl -e "add_attribute('$conf/bacula-dir.conf', 'clientrunbeforejob', '$REMOTE_FILE/save/test.sh', 'Job', 'CompressedTest')"
-$bperl -e "add_attribute('$conf/bacula-dir.conf', 'accurate', 'yes', 'Job', 'AccurateTest')"
-$bperl -e "add_attribute('$conf/bacula-dir.conf', 'address', '$REMOTE_ADDR', 'Client')"
-$bperl -e "add_attribute('$conf/bacula-dir.conf', 'password', '$REMOTE_PASSWORD', 'Client')"
-$bperl -e "add_attribute('$conf/bacula-dir.conf', 'address', '$REMOTE_STORE_ADDR', 'Storage')"
+cfg=$conf/bacula-dir.conf
+$bperl -e "add_attribute('$cfg', 'clientrunbeforejob', '$REMOTE_FILE/save/test.sh', 'Job', 'CompressedTest')"
+$bperl -e "add_attribute('$cfg', 'accurate', 'yes', 'Job', 'AccurateTest')"
+$bperl -e "add_attribute('$cfg', 'address', '$REMOTE_ADDR', 'Client')"
+$bperl -e "add_attribute('$cfg', 'password', '$REMOTE_PASSWORD', 'Client')"
+$bperl -e "add_attribute('$cfg', 'address', '$REMOTE_STORE_ADDR', 'Storage')"
 
 cat <<END_OF_DATA >${cwd}/tmp/bconcmds
 @output
 messages
-@$out ${cwd}/tmp/log1.out
+@$out ${cwd}/tmp/log4.out
 status client
+@$out ${cwd}/tmp/log1.out
 label storage=File volume=TestVolume001
 run job=$JobName storage=File yes
 wait
@@ -91,6 +92,14 @@ stop_bacula
 
 check_two_logs
 
+version=`$bin/bacula-dir -? | awk '/Version:/ { print $2 }'`
+version_fd=`awk '/Version:/ { print $3 }' $tmp/log4.out`
+if [ "$version" != "$version_fd" ]; then
+    print_debug "ERROR: client version doesn't match $version ($version_fd)"
+    estat=1
+fi
+
 grep 'this is a script' $tmp/log3.out > /dev/null
 if [ $? != 0 ]; then
     print_debug "ERROR: Can't find runscript output"