fix(import): подтвердить обязательные гарантии второго эпика
This commit is contained in:
1 parent
31f6f00d3b
commit
ad23cd9a46
33 files changed
+3328
-18
No files matched your search
@@ -30,6 +30,18 @@ pub enum FaultAction {
|
||||
Hold,
|
||||
}
|
||||
|
||||
/// Terminates a debug test process at an explicitly armed transaction boundary.
|
||||
/// Release builds contain neither this hook nor its callers. The checkpoint
|
||||
/// is in-memory only; a request or environment variable cannot arm it.
|
||||
#[cfg(debug_assertions)]
|
||||
pub fn crash_if_checkpointed(stage: &str) {
|
||||
if action(stage) == Some(FaultAction::Exit) {
|
||||
// Deliberately skip destructors/atexit, as a lost process would. Test
|
||||
// containers belong to the parent process, not this child.
|
||||
unsafe { libc::_exit(86) }
|
||||
}
|
||||
}
|
||||
|
||||
struct State {
|
||||
checkpoint: Option<(String, FaultAction, usize)>,
|
||||
hits: BTreeMap<String, usize>,
|
||||
|
||||
Reference in new issue
Block a user