Imported Upstream version 3.3.1
[debian/amanda] / installcheck / Amanda_Changer_ndmp.pl
index 2219a2cc5f534bc87abb92c8a79b3652a4901792..209a60e70c7785d994b1bc140c54049da0fc36f9 100644 (file)
@@ -359,19 +359,24 @@ sub test_changer {
        check_inventory($chg, $mtx_config->{'barcodes'} > 0, $steps->{'load_slot_1'}, [
            { slot => 1, state => Amanda::Changer::SLOT_EMPTY,
              import_export => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 2, state => Amanda::Changer::SLOT_EMPTY,
              import_export => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 3, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG00XX', current => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 4, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG01XX',
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 5, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG02XX',
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
        ], "$pfx: inventory is correct on start-up");
     };
 
@@ -450,20 +455,27 @@ sub test_changer {
        check_inventory($chg, $mtx_config->{'barcodes'} > 0, $steps->{'load_slot_3'}, [
            { slot => 1, state => Amanda::Changer::SLOT_EMPTY,
              import_export => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 2, state => Amanda::Changer::SLOT_EMPTY,
              import_export => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 3, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG00XX', reserved => 1, loaded_in => 0,
              current => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
+             device_error => undef,
+             f_type => undef, label => undef },
            { slot => 4, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG01XX', reserved => 1, loaded_in => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => $DEVICE_STATUS_VOLUME_UNLABELED,
+             device_error => undef,
+             f_type => undef, label => undef },
            { slot => 5, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG02XX',
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
        ], "$pfx: inventory is updated when slots are loaded");
     };
 
@@ -552,22 +564,25 @@ sub test_changer {
        check_inventory($chg, $mtx_config->{'barcodes'} > 0, $steps->{'check_state_after_release1'}, [
            { slot => 1, state => Amanda::Changer::SLOT_EMPTY,
              import_export => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 2, state => Amanda::Changer::SLOT_EMPTY,
              import_export => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 3, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG00XX', reserved => 1, loaded_in => 0,
              current => 1,
-             device_status => $DEVICE_STATUS_SUCCESS,
+             device_status => $DEVICE_STATUS_SUCCESS, device_error => undef,
              f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-1' },
            { slot => 4, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG01XX', loaded_in => 1,
-             device_status => $DEVICE_STATUS_SUCCESS,
+             device_status => $DEVICE_STATUS_SUCCESS, device_error => undef,
              f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-2' },
            { slot => 5, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG02XX',
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
        ], "$pfx: inventory is still up to date");
     };
 
@@ -650,22 +665,24 @@ sub test_changer {
        check_inventory($chg, $mtx_config->{'barcodes'} > 0, $steps->{'release2'}, [
            { slot => 1, state => Amanda::Changer::SLOT_EMPTY,
              import_export => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 2, state => Amanda::Changer::SLOT_EMPTY,
              import_export => 1,
-             device_status => undef, f_type => undef, label => undef },
+             device_status => undef, device_error => undef,
+             f_type => undef, label => undef },
            { slot => 3, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG00XX', reserved => 1, loaded_in => 0,
-             device_status => $DEVICE_STATUS_SUCCESS,
+             device_status => $DEVICE_STATUS_SUCCESS, device_error => undef,
              f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-1' },
            { slot => 4, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG01XX',
-             device_status => $DEVICE_STATUS_SUCCESS,
+             device_status => $DEVICE_STATUS_SUCCESS, device_error => undef,
              f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-2' },
            { slot => 5, state => Amanda::Changer::SLOT_FULL,
              barcode => 'PTAG02XX', reserved => 1, loaded_in => 1,
              current => 1,
-             device_status => $DEVICE_STATUS_SUCCESS,
+             device_status => $DEVICE_STATUS_SUCCESS, device_error => undef,
              f_type => $Amanda::Header::F_TAPESTART, label => 'TAPE-4' },
        ], "$pfx: inventory is up to date after more labelings");
     };