dev->VolCatInfo.VolCatReads = 1;
}
Dmsg1(150, "dir_update_vol_info. Set Append vol=%s\n", dcr->VolumeName);
+ dev->VolCatInfo.VolFirstWritten = time(NULL);
bstrncpy(dev->VolCatInfo.VolCatStatus, "Append", sizeof(dev->VolCatInfo.VolCatStatus));
dev->setVolCatName(dcr->VolumeName);
if (!dir_update_volume_info(dcr, true, true)) { /* indicate doing relabel */
--- /dev/null
+#!/bin/sh
+#
+# Run four jobs at the same time, with four Volumes, but set
+# Maximum Job Volumes = 1 on each of the Volumes. Note,
+# Volume 2 will probably have two jobs on it. Something to
+# be fixed in a later version.
+#
+TestName="maxuseduration-test"
+JobName=maxuseduration
+. scripts/functions
+
+scripts/cleanup
+scripts/copy-test-confs
+echo "${cwd}/build" >${cwd}/tmp/file-list
+
+change_jobname NightlySave $JobName
+start_test
+
+cat <<END_OF_DATA >${cwd}/tmp/bconcmds
+@$out /dev/null
+messages
+@$out ${cwd}/tmp/log1.out
+label storage=File1 volume=TestVolume001
+update Volume=TestVolume001
+3
+20
+1
+3
+18
+llist volume=TestVolume001
+@#setdebug level=100 Storage=File1
+run job=$JobName level=Full Storage=File1 yes
+@sleep 30
+update Volume=TestVolume001
+1
+1
+18
+mount storage=File1
+wait
+llist volume=TestVolume001
+messages
+quit
+END_OF_DATA
+
+run_bacula
+check_for_zombie_jobs storage=File1
+stop_bacula
+
+grep "Max configured use duration" ${cwd}/tmp/log1.out
+if [ $? -eq 0 ] ; then
+ echo "Error: max configured use duration exceeded"
+ estat=1
+fi
+end_test