1#!/bin/sh 2# 3# Test the fill command in btape 4# 5TestName="btape-fill-full-tape" 6JobName=btape-fill 7. scripts/functions 8 9require_tape_drive 10 11scripts/copy-btape-confs 12scripts/cleanup-tape 13 14change_jobname $JobName 15start_test 16 17# 18# Increase block size to 262144 19# 20cp ${cwd}/bin/bareos-sd.conf ${cwd}/tmp/1 21sed -e 's%64512%262144%' ${cwd}/tmp/1 >${cwd}/bin/bareos-sd.conf 22 23 24if test "$debug" -eq 1 ; then 25 $bin/btape -c bin/bareos-sd.conf Drive-0 <<END_OF_DATA | tee ${cwd}/tmp/log1.out 26fill 27s 28 29quit 30END_OF_DATA 31else 32 $bin/btape -c bin/bareos-sd.conf Drive-0 <<END_OF_DATA >${cwd}/tmp/log1.out 2>&1 33fill 34s 35 36quit 37END_OF_DATA 38fi 39 40grep "^The last block on the tape matches\. Test succeeded\." ${cwd}/tmp/log1.out >/dev/null 2>&1 41if [ $? != 0 ] ; then 42 echo " " 43 echo " " 44 echo " !!!!! btape fill test failed!!! !!!!! " 45 echo " !!!!! btape fill test failed!!! !!!!! " >>test.out 46 echo " " 47else 48 echo " ===== btape fill test OK ===== " 49 echo " ===== btape fill test OK ===== " >>test.out 50# scripts/cleanup 51fi 52