disc, aacs: key files before the handshake; one whole-disc reader

Scan reads UDF and the AACS files before the drive handshake and records
a missing DVD /AACS key file instead of failing. Decryption needs an
explicit AACS unit base and refuses off-grid units; an all-broken
host-cert list is its own error (E7033). Every whole-disc and image to
ISO copy goes through one shared reader that refuses an unkeyable file
up front (E7032). HD DVD XPL tick and timecode fixes; CI action bumps.
This commit is contained in:
Matthew Jackson
2026-09-27 20:17:01 -07:00
parent 503a80884e
commit 18982a7c0e
25 changed files with 3128 additions and 777 deletions
+15 -21
View File
@@ -1,36 +1,30 @@
//! Drive-level timeout bound on a real device. The SgIoTransport fd-recovery
//! test lives beside the transport (its fields are private) in
//! `src/scsi/linux.rs`. Requires a real /dev/sg* device, hence #[ignore].
//! Linux-only at the crate level: elsewhere it would report a pass having run nothing.
#![cfg(target_os = "linux")]
use std::path::Path;
use std::time::Duration;
#[test]
#[ignore]
fn test_drive_read_per_cdb_timeout_bounds_call() {
let device = "/dev/sg2";
let device = std::env::var("FREEMKV_TEST_SG_DEVICE").unwrap_or(device.to_string());
let _path = Path::new(&device);
let path = Path::new(&device);
#[cfg(target_os = "linux")]
{
use std::time::Duration;
let mut drive = libfreemkv::Drive::open(path).expect("open drive");
let timeout_ms: u32 = 5_000;
let mut drive = libfreemkv::Drive::open(_path).expect("open drive");
let timeout_ms: u32 = 5_000;
let start = std::time::Instant::now();
let _ = drive.read(0, 1, &mut [0u8; 2048], false);
let elapsed = start.elapsed();
let start = std::time::Instant::now();
let _ = drive.read(0, 1, &mut [0u8; 2048], false);
let elapsed = start.elapsed();
let overhead = Duration::from_millis(500);
assert!(
elapsed < Duration::from_millis(timeout_ms as u64) + overhead,
"Drive::read should return within timeout_ms + overhead, took {:?}",
elapsed
);
}
#[cfg(not(target_os = "linux"))]
{
eprintln!("SKIP: test requires Linux / SgIoTransport");
}
let overhead = Duration::from_millis(500);
assert!(
elapsed < Duration::from_millis(timeout_ms as u64) + overhead,
"Drive::read should return within timeout_ms + overhead, took {:?}",
elapsed
);
}