Skip to content

Commit 3dc0983

Browse files
committed
[debug commit]
Signed-off-by: Ludvig Liljenberg <4257730+ludfjig@users.noreply.github.com>
1 parent 7e440eb commit 3dc0983

File tree

3 files changed

+20
-1
lines changed

3 files changed

+20
-1
lines changed

.github/workflows/ValidatePullRequest.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ jobs:
6767
- docs-pr
6868
- build-guests
6969
strategy:
70-
fail-fast: true
70+
fail-fast: false
7171
matrix:
7272
hypervisor: [hyperv, 'hyperv-ws2025', mshv3, kvm]
7373
cpu: [amd, intel]

src/hyperlight_host/src/sandbox/uninitialized.rs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -820,6 +820,20 @@ mod tests {
820820
.expect("Should still be inside a span");
821821
assert_eq!(span_id.into_u64(), 1, "Should still be in span 1");
822822

823+
// DEBUG: Print all spans that were recorded
824+
let all_spans = subscriber.get_all_spans();
825+
println!("DEBUG: Total spans recorded: {}", all_spans.len());
826+
for (id, span) in all_spans.iter() {
827+
let name = span
828+
.get("span")
829+
.and_then(|s| s.get("attributes"))
830+
.and_then(|a| a.get("metadata"))
831+
.and_then(|m| m.get("name"))
832+
.and_then(|n| n.as_str())
833+
.unwrap_or("unknown");
834+
println!("DEBUG: Span {} = {}", id, name);
835+
}
836+
823837
// Verify span 2 was created by UninitializedSandbox::new
824838
let inner_span_meta = subscriber.get_span_metadata(2);
825839
assert_eq!(inner_span_meta.name(), "new");

src/hyperlight_testing/src/tracing_subscriber.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,11 @@ impl TracingSubscriber {
6969
EVENTS.with(|events| events.borrow().clone())
7070
}
7171

72+
/// Returns all recorded spans as a HashMap
73+
pub fn get_all_spans(&self) -> HashMap<u64, Value> {
74+
SPANS.with(|spans| spans.borrow().clone())
75+
}
76+
7277
pub fn test_trace_records<F: Fn(&HashMap<u64, Value>, &Vec<Value>)>(&self, f: F) {
7378
SPANS.with(|spans| {
7479
EVENTS.with(|events| {

0 commit comments

Comments
 (0)