{ "milestone": "K2150", "slug": "shutdown-el0-storage", "feature": "shutdown_io.flush", "crate": "os-shutdown-io", "test": "flush", "contract": "kernel/SHUTDOWN_IO_FLUSH_CONTRACT.md", "tests": 4, "minimumMutants": 20, "mutants": [ { "name": "allow-unquiesced-coordinator", "file": "flush.rs", "before": "if !quiesced {\n return Err(Error::NotQuiesced);\n }", "after": "", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "allow-duplicate-data-flush", "file": "flush.rs", "before": "if self.phase != Phase::Idle {", "after": "if false {", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "allow-zero-data-blocks", "file": "flush.rs", "before": "if blocks == 0 || digest == 0 {\n self.rejected += 1;\n return Err(Error::InvalidFlush);\n }\n self.data_blocks = blocks;", "after": "if digest == 0 {\n self.rejected += 1;\n return Err(Error::InvalidFlush);\n }\n self.data_blocks = blocks;", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "allow-zero-data-digest", "file": "flush.rs", "before": "if blocks == 0 || digest == 0 {\n self.rejected += 1;\n return Err(Error::InvalidFlush);\n }\n self.data_blocks = blocks;", "after": "if blocks == 0 {\n self.rejected += 1;\n return Err(Error::InvalidFlush);\n }\n self.data_blocks = blocks;", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "skip-data-stage-bit", "file": "flush.rs", "before": "self.flushed_stages |= 1;", "after": "", "test": "os_shutdown_io_flush_positive", "count": 1 }, { "name": "allow-out-of-order-metadata-flush", "file": "flush.rs", "before": "if self.phase != Phase::DataFlushed {", "after": "if false {", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "allow-zero-metadata-blocks", "file": "flush.rs", "before": "if blocks == 0 || digest == 0 {\n self.rejected += 1;\n return Err(Error::InvalidFlush);\n }\n self.metadata_blocks = blocks;", "after": "if digest == 0 {\n self.rejected += 1;\n return Err(Error::InvalidFlush);\n }\n self.metadata_blocks = blocks;", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "allow-zero-metadata-digest", "file": "flush.rs", "before": "if blocks == 0 || digest == 0 {\n self.rejected += 1;\n return Err(Error::InvalidFlush);\n }\n self.metadata_blocks = blocks;", "after": "if blocks == 0 {\n self.rejected += 1;\n return Err(Error::InvalidFlush);\n }\n self.metadata_blocks = blocks;", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "skip-metadata-stage-bit", "file": "flush.rs", "before": "self.flushed_stages |= 2;", "after": "", "test": "os_shutdown_io_flush_positive", "count": 1 }, { "name": "allow-out-of-order-journal-flush", "file": "flush.rs", "before": "if self.phase != Phase::MetadataFlushed {", "after": "if false {", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "allow-zero-journal-seq", "file": "flush.rs", "before": "if seq == 0 || digest == 0 {", "after": "if digest == 0 {", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "allow-zero-journal-digest", "file": "flush.rs", "before": "if seq == 0 || digest == 0 {", "after": "if seq == 0 {", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "skip-journal-stage-bit", "file": "flush.rs", "before": "self.flushed_stages |= 4;", "after": "", "test": "os_shutdown_io_flush_positive", "count": 1 }, { "name": "allow-none-stage-fault", "file": "flush.rs", "before": "if stage == Stage::None || fault == Fault::None || self.clean_granted {", "after": "if fault == Fault::None || self.clean_granted {", "test": "os_shutdown_io_flush_invalid_fault_inputs", "count": 1 }, { "name": "allow-none-fault-kind", "file": "flush.rs", "before": "if stage == Stage::None || fault == Fault::None || self.clean_granted {", "after": "if stage == Stage::None || self.clean_granted {", "test": "os_shutdown_io_flush_invalid_fault_inputs", "count": 1 }, { "name": "allow-fault-after-clean-granted", "file": "flush.rs", "before": "if stage == Stage::None || fault == Fault::None || self.clean_granted {", "after": "if stage == Stage::None || fault == Fault::None {", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "wrong-eio-errno", "file": "flush.rs", "before": "self.fault_errno = EIO;", "after": "self.fault_errno = ETIMEDOUT;", "test": "os_shutdown_io_flush_negative", "count": 1 }, { "name": "wrong-timeout-errno", "file": "flush.rs", "before": "self.fault_errno = ETIMEDOUT;", "after": "self.fault_errno = EIO;", "test": "os_shutdown_io_flush_negative", "count": 1 }, { "name": "allow-process-quit-as-flush", "file": "flush.rs", "before": "if process_quit_only {\n self.rejected += 1;\n return Err(Error::ProcessQuitNotFlush);\n }", "after": "", "test": "os_shutdown_io_flush_order_and_process_quit_separation", "count": 1 }, { "name": "skip-clean-granted-flag", "file": "flush.rs", "before": "self.clean_granted = true;", "after": "", "test": "os_shutdown_io_flush_positive", "count": 1 } ], "integration": { "base": "reports/os-implementation/K2145-feature-readiness.json", "module": "k2150_shutdown_el0_storage", "experiment": { "from": "scripts/os-acceptance/features/k2150-shutdown-el0-storage-v2.rs", "to": "k2150-shutdown-el0-storage.rs" }, "runtime": [ { "from": "os-shutdown-io/src/flush.rs", "module": "shutdown_io_flush" }, { "from": "os-shutdown-io/src/flush_io.rs", "module": "shutdown_io_flush_io" }, { "from": "os-shutdown-io/src/flush_session.rs", "module": "shutdown_io_flush_session" } ], "programs": [ "k2150-storage-worker", "k2150-storage-pid1" ], "captures": [ "OS_K2150_EVIDENCE", "OS_K2150_EL0_EVIDENCE" ], "checker": "scripts/os-acceptance/features/k2150-el0-storage-check.mjs", "extraSources": [ { "from": "scripts/os-acceptance/features/k2150-virtio-flush.rs", "to": "k2150-virtio-flush.rs" }, { "from": "scripts/os-acceptance/features/k2150-capture-protocol.rs", "to": "k2150-capture-protocol.rs" } ], "crateAliases": [ { "from": "runtime::shutdown_io_flush", "as": "flush" }, { "from": "runtime::shutdown_io_quiesce", "as": "quiesce" }, { "from": "runtime::shutdown_io_flush_io", "as": "flush_io" } ] }, "localScope": "native-storage-and-el0-session-source-bound-tests", "guestScope": "Actual EL0 PID1 invokes a kernel-owned ordered Data/Metadata/Journal storage transaction. An unauthorized worker, early clean claim, bare process quit and repeat attempt are refused. Real backend EIO and delayed FLUSH completion withhold the clean receipt. Actual DMA and SVC frames are captured; all eighteen profiles require three cases. No product release claim.", "captureProtocol": { "version": 2, "transport": "pl011-stage-token", "snapshot": "running-pmemsave-double-read", "liveBlockPauseAllowed": false } }