]> git.ipfire.org Git - thirdparty/bacula.git/commitdiff
Add new manual test
authorKern Sibbald <kern@sibbald.com>
Sat, 18 Aug 2018 05:21:29 +0000 (07:21 +0200)
committerKern Sibbald <kern@sibbald.com>
Sat, 18 Aug 2018 05:22:04 +0000 (07:22 +0200)
regress/scripts/blast-port-8102 [new file with mode: 0755]
regress/tests/blast-port-test [new file with mode: 0755]

diff --git a/regress/scripts/blast-port-8102 b/regress/scripts/blast-port-8102
new file mode 100755 (executable)
index 0000000..c0e3ebc
--- /dev/null
@@ -0,0 +1,102 @@
+#!/bin/sh
+dd if=/dev/urandom bs=512 | telnet localhost 8103 
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
+dd if=/dev/urandom bs=512 | telnet localhost 8103
diff --git a/regress/tests/blast-port-test b/regress/tests/blast-port-test
new file mode 100755 (executable)
index 0000000..a50406f
--- /dev/null
@@ -0,0 +1,123 @@
+#!/bin/sh
+#
+# Copyright (C) 2000-2018 Kern Sibbald
+# License: BSD 2-Clause; see file LICENSE-FOSS
+#
+# Run a simple backup of the Bacula build directory
+#   then restore it while at the same time
+#   blasting the FD port with bad data.
+#
+#   Note: when running this test, you must manually
+#    run <regress>/scripts/blast-port-8102 in another
+#    shell
+#
+TestName="blast-port-test"
+JobName=backup
+. scripts/functions
+
+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
+
+change_jobname BackupClient1 $JobName
+start_test
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out /dev/null
+messages
+@$out $tmp/log1.out
+setdebug level=4 storage=File1
+label volume=TestVolume001 storage=File1 pool=File slot=1 drive=0
+show job=$JobName
+show jobs
+run job=$JobName yes
+status storage=File1
+status storage=File1
+status storage=File1
+status storage=File1
+status storage=File1
+status storage=File1
+quit
+END_OF_DATA
+
+run_bacula
+
+sleep 1
+#$rscripts/blast-port-8102 &
+
+# Continuation of above commands
+cat <<END_OF_DATA >$tmp/bconcmds
+status storage=File1
+status storage=File1
+status storage=File1
+status storage=File1
+status storage=File1
+@sleep 1
+status storage=File1
+status storage=File1
+status storage=File1
+status storage=File1
+status storage=File1
+wait
+messages
+@# 
+@# now do a restore
+@#
+@$out $tmp/log2.out  
+setdebug level=4 storage=File1
+restore where=$tmp/bacula-restores select all done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+run_bconsole
+check_for_zombie_jobs storage=File1
+sleep 30
+stop_bacula
+
+cat <<END_OF_DATA >$tmp/bconcmds
+@$out /dev/null
+messages
+@$out $tmp/log1.out
+setdebug level=4 storage=File1
+run job=$JobName yes
+wait
+messages
+@# 
+@# now do a restore
+@#
+@$out $tmp/log2.out  
+#setbandwidth client=$CLIENT limit=100
+setdebug level=4 storage=File1
+restore where=$tmp/bacula-restores select all done
+yes
+wait
+messages
+quit
+END_OF_DATA
+
+#
+# Now do a second backup after making a few changes
+#
+touch ${cwd}/build/src/dird/*.o
+echo "test test" > ${cwd}/build/src/dird/xxx
+#
+
+run_bacula
+check_for_zombie_jobs storage=File1
+sleep 30
+stop_bacula
+
+check_two_logs
+check_restore_diff
+end_test