File tree 1 file changed +15
-0
lines changed
uefi-test-runner/src/boot
1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,7 @@ pub fn test(st: &SystemTable<Boot>) {
25
25
test_watchdog ( bt) ;
26
26
info ! ( "Testing protocol handler services..." ) ;
27
27
test_register_protocol_notify ( bt) ;
28
+ test_register_protocol_notify_freestanding ( ) ;
28
29
test_protocol_interface_management ( ) ;
29
30
test_install_protocol_interface ( bt) ;
30
31
test_reinstall_protocol_interface ( bt) ;
@@ -156,6 +157,20 @@ fn test_register_protocol_notify(bt: &BootServices) {
156
157
. expect ( "Failed to register protocol notify fn" ) ;
157
158
}
158
159
160
+ fn test_register_protocol_notify_freestanding ( ) {
161
+ unsafe extern "efiapi" fn callback ( _event : Event , _context : Option < NonNull < c_void > > ) {
162
+ info ! ( "in callback for test_register_protocol_notify_freestanding" )
163
+ }
164
+
165
+ let protocol = & TestProtocol :: GUID ;
166
+ let event = unsafe {
167
+ boot:: create_event ( EventType :: NOTIFY_SIGNAL , Tpl :: NOTIFY , Some ( callback) , None ) . unwrap ( )
168
+ } ;
169
+
170
+ boot:: register_protocol_notify ( protocol, & event)
171
+ . expect ( "Failed to register protocol notify fn" ) ;
172
+ }
173
+
159
174
fn test_protocol_interface_management ( ) {
160
175
let mut interface = TestProtocol { data : 123 } ;
161
176
let interface_ptr: * mut _ = & mut interface;
You can’t perform that action at this time.
0 commit comments