u-boot/lib/efi_selftest
Ilias Apalodimas 3ae95fe21c efi_selftests: fix controllers repeated selftesting
Running the controller selftest more than one times fails with

=> setenv efi_selftest 'controllers' && bootefi selftest
Testing EFI API implementation
Selected test: 'controllers'
Setting up 'controllers'
Setting up 'controllers' succeeded
Executing 'controllers'
Executing 'controllers' succeeded
Summary: 0 failures

=> bootefi selftest
Testing EFI API implementation
Selected test: 'controllers'
Setting up 'controllers'
lib/efi_selftest/efi_selftest_controllers.c(280):
ERROR: InstallProtocolInterface failed
lib/efi_selftest/efi_selftest.c(89):
ERROR: Setting up 'controllers' failed
Summary: 1 failures

There are multiple reason for this.  We don't uninstall the binding
interface from the controller handle and we don't reset the handle
pointers either.  So let's uninstall all the protocols properly and
reset the handles to NULL on setup().

While at it add a forgotten check when uninstalling protocols from the
handle_controller and make sure the number of child controllers is 0

Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Reviewed-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
2023-06-16 06:45:20 +02:00
..
.gitignore efi_selftest: Update .gitignore 2020-01-07 18:08:20 +01:00
efi_freestanding.c efi_loader: fix build error for freestanding.o 2019-03-14 21:03:14 +01:00
efi_miniapp_tcg2_arm.h efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot 2021-11-07 18:36:55 +01:00
efi_miniapp_tcg2_arm64.h efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot 2021-11-07 18:36:55 +01:00
efi_miniapp_tcg2_ia32.h efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot 2021-11-07 18:36:55 +01:00
efi_miniapp_tcg2_riscv32.h efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot 2021-11-07 18:36:55 +01:00
efi_miniapp_tcg2_riscv64.h efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot 2021-11-07 18:36:55 +01:00
efi_miniapp_tcg2_x86_64.h efi_selftest: add selftest for EFI_TCG2_PROTOCOL and Measured Boot 2021-11-07 18:36:55 +01:00
efi_selftest.c efi_selftest: export efi_st_get_config_table() 2022-09-09 16:07:54 +02:00
efi_selftest_bitblt.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_block_device.c EFI: Fix ReadBlocks API reading incorrect sector for UCLASS_PARTITION devices 2022-07-02 14:19:12 +02:00
efi_selftest_config_table.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_console.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_controllers.c efi_selftests: fix controllers repeated selftesting 2023-06-16 06:45:20 +02:00
efi_selftest_crc32.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_devicepath.c efi: Use 16-bit unicode strings 2022-02-03 12:16:01 -05:00
efi_selftest_devicepath_util.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_disk_image.h SPDX: Convert a few files that were missed before 2018-05-10 20:38:35 -04:00
efi_selftest_ecpt.c efi: adjust ebbr to v2.1 in conformance profile 2022-12-17 13:37:33 +00:00
efi_selftest_esrt.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_event_groups.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_events.c efi_selftest: rename event_notify 2022-10-06 22:54:58 +02:00
efi_selftest_exception.c efi: Use 16-bit unicode strings 2022-02-03 12:16:01 -05:00
efi_selftest_exitbootservices.c efi: selftest: Make record static 2023-04-08 07:46:44 +02:00
efi_selftest_fdt.c efi_selftest: export efi_st_get_config_table() 2022-09-09 16:07:54 +02:00
efi_selftest_gop.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_hii.c efi_selftest: add hii set keyboard layout test case 2023-01-13 09:09:07 +01:00
efi_selftest_hii_data.c efi_selftest: add HII database protocols test 2019-02-13 09:40:06 +01:00
efi_selftest_load_file.c efi: selftest: Make load_file() and load_file2() static 2023-04-08 07:46:44 +02:00
efi_selftest_loaded_image.c efi_selftest: remove redundant function efi_st_memcmp() 2019-05-07 21:10:04 +02:00
efi_selftest_loadimage.c efi_selftest: prefix test functions with efi_st_ 2022-09-30 02:03:23 +02:00
efi_selftest_manageprotocols.c efi_selftest: remove redundant function efi_st_memcmp() 2019-05-07 21:10:04 +02:00
efi_selftest_mem.c efi_selftest: test CalculateCrc32, CopyMem, SetMem 2020-03-22 11:06:23 +01:00
efi_selftest_memory.c efi_loader: put device tree into EfiACPIReclaimMemory 2020-05-07 18:23:16 +02:00
efi_selftest_miniapp_exception.c efi_selftest: on sandbox use host specific assembly 2022-09-03 08:16:09 +02:00
efi_selftest_miniapp_exit.c efi: Use 16-bit unicode strings 2022-02-03 12:16:01 -05:00
efi_selftest_miniapp_return.c efi: Use 16-bit unicode strings 2022-02-03 12:16:01 -05:00
efi_selftest_open_protocol.c efi_selftest: unit test for OpenProtocolInformation() 2019-06-01 22:40:24 +02:00
efi_selftest_register_notify.c efi_selftest: ReinstallProtocolInterface test 2023-06-16 06:45:19 +02:00
efi_selftest_reset.c efi: Use 16-bit unicode strings 2022-02-03 12:16:01 -05:00
efi_selftest_rng.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_rtc.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_set_virtual_address_map.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_snp.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_startimage_exit.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_startimage_return.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_tcg2.c efi_selftest: error handling in efi_selftest_tcg2 2022-05-03 21:39:22 +02:00
efi_selftest_textinput.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_textinputex.c efi_loader: correct function comment style 2022-01-29 10:23:40 +01:00
efi_selftest_textoutput.c efi: Use 16-bit unicode strings 2022-02-03 12:16:01 -05:00
efi_selftest_tpl.c efi_selftest: rename event_notify 2022-10-06 22:54:58 +02:00
efi_selftest_unaligned.c efi_selftest: clean up unaligned unit test 2022-05-03 21:39:22 +02:00
efi_selftest_unicode_collation.c efi_selftest: test FatToStr() truncation 2022-12-02 19:17:24 +01:00
efi_selftest_util.c efi_selftest: unsigned char parameter for efi_st_strcmp_16_8() 2022-11-22 11:54:30 +01:00
efi_selftest_variables.c efi_selftest: conformance test for GetNextVariableName 2022-12-20 16:06:48 +01:00
efi_selftest_variables_runtime.c efi: Use 16-bit unicode strings 2022-02-03 12:16:01 -05:00
efi_selftest_watchdog.c efi_selftest: rename event_notify 2022-10-06 22:54:58 +02:00
Kconfig efi_selftest: block device test requires CONFIG_DOS_PARTITION 2020-08-01 11:58:39 +02:00
Makefile efi_loader: Let networking support depend on NETDEVICES 2022-11-06 10:50:04 +01:00