Skip to content

Commit 6914830

Browse files
test-runner: Make MP test fail if protocol is not available
We already disable the test via feature flags when it's expected to fail. Making it fail instead of warn makes it easier to catch accidental breakage.
1 parent b59ec4e commit 6914830

File tree

1 file changed

+13
-14
lines changed
  • uefi-test-runner/src/proto/pi

1 file changed

+13
-14
lines changed

uefi-test-runner/src/proto/pi/mp.rs

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,19 @@ pub fn test(bt: &BootServices) {
1717
}
1818

1919
info!("Running UEFI multi-processor services protocol test");
20-
if let Ok(handle) = bt.get_handle_for_protocol::<MpServices>() {
21-
let mp_support = &bt
22-
.open_protocol_exclusive::<MpServices>(handle)
23-
.expect("failed to open multi-processor services protocol");
24-
25-
test_get_number_of_processors(mp_support);
26-
test_get_processor_info(mp_support);
27-
test_startup_all_aps(mp_support, bt);
28-
test_startup_this_ap(mp_support, bt);
29-
test_enable_disable_ap(mp_support);
30-
test_switch_bsp_and_who_am_i(mp_support);
31-
} else {
32-
warn!("Multi-processor services protocol is not supported");
33-
}
20+
let handle = bt
21+
.get_handle_for_protocol::<MpServices>()
22+
.expect("failed to get multi-processor services handle");
23+
let mp_support = &bt
24+
.open_protocol_exclusive::<MpServices>(handle)
25+
.expect("failed to open multi-processor services protocol");
26+
27+
test_get_number_of_processors(mp_support);
28+
test_get_processor_info(mp_support);
29+
test_startup_all_aps(mp_support, bt);
30+
test_startup_this_ap(mp_support, bt);
31+
test_enable_disable_ap(mp_support);
32+
test_switch_bsp_and_who_am_i(mp_support);
3433
}
3534

3635
fn test_get_number_of_processors(mps: &MpServices) {

0 commit comments

Comments
 (0)