v0.17.3: fix scsi_recovery.rs Linux compile (missing Duration import)
tests/scsi_recovery.rs: - Add `use std::time::Duration` inside both `#[cfg(target_os = "linux")]` blocks. Locally on macOS the linux blocks are cfg-out so the missing import was invisible to precommit on macOS. - Bug pre-dated this branch but only surfaced when v0.17.2 release CI ran the test compile on Linux. Cargo.toml: 0.17.2 -> 0.17.3.
This commit is contained in:
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "libfreemkv"
|
name = "libfreemkv"
|
||||||
version = "0.17.2"
|
version = "0.17.3"
|
||||||
edition = "2024"
|
edition = "2024"
|
||||||
rust-version = "1.86"
|
rust-version = "1.86"
|
||||||
license = "AGPL-3.0-only"
|
license = "AGPL-3.0-only"
|
||||||
|
|||||||
@@ -24,6 +24,7 @@ fn test_sgio_transport_timeout_does_not_kill_transport() {
|
|||||||
use libfreemkv::scsi::{DataDirection, SCSI_STATUS_TRANSPORT_FAILURE};
|
use libfreemkv::scsi::{DataDirection, SCSI_STATUS_TRANSPORT_FAILURE};
|
||||||
use std::sync::Arc;
|
use std::sync::Arc;
|
||||||
use std::sync::atomic::{AtomicI32, Ordering};
|
use std::sync::atomic::{AtomicI32, Ordering};
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
let mut transport = SgIoTransport::open(_path).expect("open device");
|
let mut transport = SgIoTransport::open(_path).expect("open device");
|
||||||
let fd_before = transport.fd;
|
let fd_before = transport.fd;
|
||||||
@@ -93,6 +94,8 @@ fn test_drive_read_per_cdb_timeout_bounds_call() {
|
|||||||
|
|
||||||
#[cfg(target_os = "linux")]
|
#[cfg(target_os = "linux")]
|
||||||
{
|
{
|
||||||
|
use std::time::Duration;
|
||||||
|
|
||||||
let mut drive = libfreemkv::Drive::open(_path).expect("open drive");
|
let mut drive = libfreemkv::Drive::open(_path).expect("open drive");
|
||||||
let timeout_ms: u32 = 5_000;
|
let timeout_ms: u32 = 5_000;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user