#!/bin/sh # # Copyright (C) 2000-2017 Kern Sibbald # License: BSD 2-Clause; see file LICENSE-FOSS # # Test truncate command in // # # TestName="truncate-concurrent-test" JobName=FIFOTest . scripts/functions cwd=`pwd` scripts/cleanup scripts/copy-test-confs echo $src > $tmp/file-list $bperl -e "add_attribute('$conf/bacula-dir.conf', 'MaximumVolumeBytes', '2MB', 'Pool')" $bperl -e "add_attribute('$conf/bacula-dir.conf', 'ActionOnPurge', 'Truncate', 'Pool')" $bperl -e "add_attribute('$conf/bacula-dir.conf', 'MaximumConsoleConnections', 100, 'Director')" $bperl -e "set_global_maximum_concurrent_jobs(100)" start_test cat >tmp/bconcmds <> $tmp/purgecmd echo "truncate volume=Vol00$i$j pool=Default storage=File" > $tmp/bconcmds-$i$j done done run_bconsole $tmp/purgecmd for i in $tmp/bconcmds-* do run_bconsole $i >> $tmp/truncate.log & done wait grep "Cannot free Volume" $tmp/truncate.log > /dev/null if [ $? -eq 0 ]; then print_debug "WARNING: Should not find problems with 'Cannot free volume' in $tmp/truncate.log" # estat=1 fi end_test