Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ let status = nodes.get_by_path("core0.thread.arch_state.mca.bank3.status").unwra
assert_eq!(status.kind, NodeType::Field { value: 0xbe000000e1840400 });

// Get the instruction pointer of the first core.
let status = nodes.get_by_path("core0.thread.arch_state.lip").unwrap();
assert_eq!(status.kind, NodeType::Field { value: 0x6f9c2520 });
let lip = nodes.get_by_path("core0.thread.arch_state.lip").unwrap();
assert_eq!(lip.kind, NodeType::Field { value: 0xfffff80577036530 });
```

## Development
Expand Down
4 changes: 2 additions & 2 deletions lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,8 @@
//! assert_eq!(status.kind, NodeType::Field { value: 0xbe000000e1840400 });
//!
//! // Get the instruction pointer of the first core.
//! let status = nodes.get_by_path("core0.thread.arch_state.lip").unwrap();
//! assert_eq!(status.kind, NodeType::Field { value: 0x6f9c2520 });
//! let lip = nodes.get_by_path("core0.thread.arch_state.lip").unwrap();
//! assert_eq!(lip.kind, NodeType::Field { value: 0xfffff80577036530 });
//! ```
//!
//! ## Default Features
Expand Down
38 changes: 38 additions & 0 deletions lib/tests/core.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
// Copyright (C) 2025 Intel Corporation
// SPDX-License-Identifier: MIT

use intel_crashlog::prelude::*;

#[test]
fn lnc_three_strike_timeout() {
let data = std::fs::read("tests/samples/three_strike_timeout.crashlog").unwrap();
let crashlog = CrashLog::from_slice(&data).unwrap();
let mut cm = CollateralManager::embedded_tree().unwrap();
let nodes = crashlog.decode(&mut cm);

let status = nodes
.get_by_path("core0.thread.arch_state.mca.bank3.status")
.unwrap();
assert_eq!(
status.kind,
NodeType::Field {
value: 0xbe000000e1840400
}
);

let lip = nodes.get_by_path("core0.thread.arch_state.lip").unwrap();
assert_eq!(
lip.kind,
NodeType::Field {
value: 0xfffff80577036530
}
);

let entry = nodes.get_by_path("core0.sq.entry0").unwrap();
assert_eq!(
entry.kind,
NodeType::Field {
value: 0x47bcc051082
}
);
}
Binary file modified lib/tests/samples/three_strike_timeout.crashlog
Binary file not shown.