Skip to content

Commit 45093a1

Browse files
nicholasbishopGabrielMajeri
authored andcommitted
Fix query_variable_info test
The behavior of OVMF changed recently so that calling query_variable_info with just the `NON_VOLATILE` attribute is treated as an error: tianocore/edk2@21320ef Fix by OR'ing it with `BOOTSERVICE_ACCESS`. Also fix a typo in the output, and `unwrap` the result of calling `query_variable_info` since these calls should always succeed.
1 parent fd5382d commit 45093a1

File tree

1 file changed

+7
-3
lines changed
  • uefi-test-runner/src/runtime

1 file changed

+7
-3
lines changed

uefi-test-runner/src/runtime/vars.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,14 +47,18 @@ fn test_variables(rt: &RuntimeServices) {
4747

4848
fn test_variable_info(rt: &RuntimeServices) {
4949
info!(
50-
"Storage for non-volatile variabls: {:?}",
51-
rt.query_variable_info(VariableAttributes::NON_VOLATILE),
50+
"Storage for non-volatile boot-services variables: {:?}",
51+
rt.query_variable_info(
52+
VariableAttributes::BOOTSERVICE_ACCESS | VariableAttributes::NON_VOLATILE
53+
)
54+
.unwrap(),
5255
);
5356
info!(
5457
"Storage for volatile runtime variables: {:?}",
5558
rt.query_variable_info(
5659
VariableAttributes::BOOTSERVICE_ACCESS | VariableAttributes::RUNTIME_ACCESS
57-
),
60+
)
61+
.unwrap(),
5862
);
5963
}
6064

0 commit comments

Comments
 (0)