File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed
uefi-test-runner/src/boot Expand file tree Collapse file tree 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>) {
2525 test_watchdog ( bt) ;
2626 info ! ( "Testing protocol handler services..." ) ;
2727 test_register_protocol_notify ( bt) ;
28+ test_register_protocol_notify_freestanding ( ) ;
2829 test_protocol_interface_management ( ) ;
2930 test_install_protocol_interface ( bt) ;
3031 test_reinstall_protocol_interface ( bt) ;
@@ -156,6 +157,20 @@ fn test_register_protocol_notify(bt: &BootServices) {
156157 . expect ( "Failed to register protocol notify fn" ) ;
157158}
158159
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+
159174fn test_protocol_interface_management ( ) {
160175 let mut interface = TestProtocol { data : 123 } ;
161176 let interface_ptr: * mut _ = & mut interface;
You can’t perform that action at this time.
0 commit comments