6285eeb6c0
Implements all 6 critical resilience fixes from phase-a-stop-dying.md: - Issue 2.9: Migrate std::sync::RwLock → parking_lot::RwLock (7 files) Prevents lock poisoning cascade on writer panic - Issue 2.2: Add install_panic_hook() to log panics via tracing Ensures panics are captured in logs/journald before process death - Issue 3.7: Add ExecStopPost to systemd service Cleans up stale FUSE mounts on service stop - Issue 2.7: Add check_stale_mount() detection on startup Auto-cleans leftover mounts from previous crashes - Issue 2.10: Integrate sd_notify for systemd lifecycle Sends READY=1 after mount, STOPPING on shutdown - Issue 2.1: Add signal handling with spawn_mount Catches SIGTERM/SIGINT for clean shutdown instead of instant death All 7 Phase A tests pass: - test_poisoned_tree_lock_returns_eio_not_panic - test_parking_lot_rwlock_survives_panic - test_panic_hook_logs_to_tracing - test_systemd_service_has_execstoppost - test_stale_mount_check_function_exists - test_sd_notify_ready_sent - test_sigterm_triggers_shutdown
42 lines
1.2 KiB
TOML
42 lines
1.2 KiB
TOML
[package]
|
|
name = "musicfs-test-utils"
|
|
version.workspace = true
|
|
edition.workspace = true
|
|
description = "Test utilities and fixtures for MusicFS resilience testing"
|
|
|
|
[dependencies]
|
|
musicfs-core = { path = "../musicfs-core" }
|
|
musicfs-origins = { path = "../musicfs-origins" }
|
|
musicfs-cas = { path = "../musicfs-cas" }
|
|
musicfs-cache = { path = "../musicfs-cache" }
|
|
|
|
async-trait.workspace = true
|
|
tokio = { workspace = true, features = ["full", "sync", "time"] }
|
|
tracing.workspace = true
|
|
thiserror.workspace = true
|
|
parking_lot.workspace = true
|
|
tempfile.workspace = true
|
|
bytes.workspace = true
|
|
|
|
# Fault injection
|
|
fail = { version = "0.5", optional = true }
|
|
rlimit = { version = "0.10", optional = true }
|
|
nix = { version = "0.29", optional = true, features = ["signal", "process"] }
|
|
|
|
# Docker/network tests
|
|
noxious-client = { version = "1.0", optional = true }
|
|
reqwest = { version = "0.11", optional = true, default-features = false, features = ["rustls-tls"] }
|
|
|
|
[features]
|
|
default = []
|
|
failpoints = ["fail/failpoints"]
|
|
process-tests = ["nix"]
|
|
resource-limits = ["rlimit"]
|
|
docker-tests = ["noxious-client", "reqwest"]
|
|
full = ["failpoints", "process-tests", "resource-limits", "docker-tests"]
|
|
|
|
[dev-dependencies]
|
|
tokio-test = "0.4"
|
|
sd-notify.workspace = true
|
|
libc.workspace = true
|