libfreemkv 0.31.4: prune 144 vacuous tests (keep spec-grounded subset)

This commit is contained in:
Matthew Jackson
2026-06-08 07:28:55 -07:00
parent d181362460
commit f79c2a0aa9
51 changed files with 7 additions and 2142 deletions
-44
View File
@@ -810,22 +810,6 @@ mod parse_sense_tests {
assert_eq!(d.ascq, 0x05, "n=14 reaches ASCQ at offset 13");
}
#[test]
fn sb_len_wr_clamped_to_slice_len() {
// Doc: n = min(sb_len_wr, sense.len()). A caller claiming 200
// bytes written into a 14-byte slice must not read out of bounds;
// the effective n is the slice length.
let mut s = [0u8; 14];
s[0] = 0x70;
s[2] = 0x03;
s[12] = 0x11;
s[13] = 0x05;
let d = parse_sense(&s, 200);
assert_eq!(d.sense_key, 3);
assert_eq!(d.asc, 0x11);
assert_eq!(d.ascq, 0x05);
}
#[test]
fn n_exactly_three_decodes_key_only() {
// n==3 is the minimum that passes the n<3 early-return. For fixed
@@ -900,34 +884,6 @@ mod scsi_sense_predicate_tests {
}
}
#[test]
fn hardware_error_is_not_marginal() {
// HARDWARE ERROR (4) is explicitly non-recoverable per doc.
assert!(!s(SENSE_KEY_HARDWARE_ERROR).is_marginal());
assert!(s(SENSE_KEY_HARDWARE_ERROR).is_hardware_error());
}
#[test]
fn data_protect_not_marginal() {
// DATA PROTECT (7) = AACS/region/write-protect; retry won't help.
assert!(!s(SENSE_KEY_DATA_PROTECT).is_marginal());
assert!(s(SENSE_KEY_DATA_PROTECT).is_data_protect());
}
#[test]
fn illegal_request_not_marginal() {
// ILLEGAL REQUEST (5) = bad CDB; not marginal.
assert!(!s(SENSE_KEY_ILLEGAL_REQUEST).is_marginal());
assert!(s(SENSE_KEY_ILLEGAL_REQUEST).is_illegal_request());
}
#[test]
fn unit_attention_not_marginal() {
// UNIT ATTENTION (6) = state change; caller rescans, not retries.
assert!(!s(SENSE_KEY_UNIT_ATTENTION).is_marginal());
assert!(s(SENSE_KEY_UNIT_ATTENTION).is_unit_attention());
}
#[test]
fn each_specific_predicate_is_exclusive() {
// Each is_* predicate matches exactly its one key and no other.