mirror of
				https://xff.cz/git/u-boot/
				synced 2025-10-31 02:15:45 +01:00 
			
		
		
		
	U-Boot should set up the SMBIOS tables during startup, as it does on x86. Ensure that it does this correctly on non-x86 machines too, by creating an event spy for last-stage init. Tidy up the installation-condition code while we are here. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
		
			
				
	
	
		
			25 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			1.2 KiB
		
	
	
	
		
			Python
		
	
	
	
	
	
| # SPDX-License-Identifier: GPL-2.0+
 | |
| # Copyright 2021 Google LLC
 | |
| # Written by Simon Glass <sjg@chromium.org>
 | |
| 
 | |
| import pytest
 | |
| import re
 | |
| import u_boot_utils as util
 | |
| 
 | |
| # This is only a partial test - coverting 64-bit sandbox. It does not test
 | |
| # big-endian images, nor 32-bit images
 | |
| @pytest.mark.boardspec('sandbox')
 | |
| def test_event_dump(u_boot_console):
 | |
|     """Test that the "help" command can be executed."""
 | |
|     cons = u_boot_console
 | |
|     sandbox = cons.config.build_dir + '/u-boot'
 | |
|     out = util.run_and_log(cons, ['scripts/event_dump.py', sandbox])
 | |
|     expect = '''.*Event type            Id                              Source location
 | |
| --------------------  ------------------------------  ------------------------------
 | |
| EVT_FT_FIXUP          bootmeth_vbe_ft_fixup           .*boot/vbe_request.c:.*
 | |
| EVT_FT_FIXUP          bootmeth_vbe_simple_ft_fixup    .*boot/vbe_simple_os.c:.*
 | |
| EVT_LAST_STAGE_INIT   install_smbios_table            .*lib/efi_loader/efi_smbios.c:.*
 | |
| EVT_MISC_INIT_F       sandbox_early_getopt_check      .*arch/sandbox/cpu/start.c:.*
 | |
| EVT_TEST              h_adder_simple                  .*test/common/event.c:'''
 | |
|     assert re.match(expect, out, re.MULTILINE) is not None
 |