U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/39] efi: Add a test for EFI bootmeth
@ 2024-08-06 12:58 Simon Glass
  2024-08-06 12:58 ` [PATCH v2 01/39] nvmxip: Drop the message on probe Simon Glass
                   ` (38 more replies)
  0 siblings, 39 replies; 71+ messages in thread
From: Simon Glass @ 2024-08-06 12:58 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Caleb Connolly, Ilias Apalodimas, Tom Rini, Heinrich Schuchardt,
	Simon Glass, Aaron Williams, Abdellatif El Khlifi,
	Alexander Gendin, Angelo Dureghello, Ashok Reddy Soma,
	Dan Carpenter, Dragan Simic, Eddie James, Etienne Carriere,
	Francis Laniel, Guillaume La Roque, Heiko Schocher, Ion Agorria,
	Jaehoon Chung, Julien Masson, Leo, Marek Vasut, Marek Vasut,
	Mattijs Korpershoek, Michal Simek, Nam Cao, Neal Gompa,
	Pavel Herrmann, Peng Fan, Quentin Schulz, Rasmus Villemoes,
	Raymond Mao, Rick Chen, Sean Anderson, Stephen Warren,
	Sughosh Ganu, Svyatoslav Ryhel, Thomas Weißschuh,
	Wei Ming Chen, William Zhang, Yang Xiwen, Yu Chien Peter Lin

The test coverage for the EFI bootmeth is incomplete since it does not
actually boot the application.

This series creates a simple test for this purpose. It includes a
surprising number patches to make this work:

- sandbox memory-mapping conflict with PCI
- the fix for that causes the mbr test to crash as it sets up pointers
  instead of addresses for its 'mmc' commands
- the mmc and read commands which cast addresses to pointers
- ANSI output from the EFI loader confusing the unit-testing checker
- bug in bootdev_next_prio() which causes an infinite loop in EFI test
- Hang in sandbox virtio due to EFI probing all block devices
- a tricky bug to do with USB keyboard and stdio
- a few other minor things

Changes in v2:
- Fix 'use' typo
- Add many new patches to resolve all the outstanding test issues

Simon Glass (39):
  nvmxip: Drop the message on probe
  nvmxip: Avoid probing on boot
  bootstd: Add UT_TESTF_CONSOLE_REC to bootflow tests
  test/py: Fix some pylint warnings in test_ut.py
  scripts: Update pylint.base
  bootstd: Create a function to reset USB
  usb: Drop old non-DM code
  log: Add a new log category for the console
  usb: Add DEV_FLAGS_DM to stdio for USB keyboard
  dm: usb: Deal with USB keyboard persisting across tests
  test: mbr: Adjust test to use lower-case hex
  test: mbr: Adjust test to drop 0x
  sandbox: Change the range used for memory-mapping tags
  sandbox: Update cpu to use logging
  sandbox: Unmap old tags
  sandbox: Add some debugging to pci_io
  sandbox: Implement reference counting for address mapping
  mmc: Use map_sysmem() with buffers in the mmc command
  read: Use map_sysmem() with buffers in the read command
  cmd: Fix memory-mapping in cmp command
  test: mbr: Unmap the buffers after use
  test: mbr: Use a constant for the block size
  test: mbr: Use RAM for the buffers
  test: mbr: Drop a duplicate test
  efi: Use puts() in cout so that console recording works
  efi_loader: Put back copyright message
  efi_loader: Rename and move CMD_BOOTEFI_HELLO_COMPILE
  efi_loader: Shorten the app rules
  efi_loader: Shorten the app rules further
  efi: Show the vendor in helloworld
  Revert "bootdev: avoid infinite probe loop"
  bootstd: Make bootdev_next_prio() continue after failure
  efi: Use the same filename for all sandbox builds
  bootstd: Add debugging for efi bootmeth
  efi: Disable ANSI output for tests
  efi: Add a test app
  efi: Avoid using sandbox virtio devices
  test: Set up an image suitable for EFI testing
  efi: Add a test for the efi bootmeth

 arch/arm/lib/Makefile               |   2 +-
 arch/riscv/lib/Makefile             |   2 +-
 arch/sandbox/cpu/cpu.c              |  38 ++-
 arch/sandbox/cpu/state.c            |   9 +-
 arch/sandbox/dts/test.dts           |   2 +-
 arch/sandbox/include/asm/state.h    |   3 +
 arch/sandbox/lib/pci_io.c           |   9 +-
 arch/x86/lib/Makefile               |   2 +-
 boot/bootdev-uclass.c               |  23 +-
 boot/bootmeth_efi.c                 |  11 +-
 cmd/Kconfig                         |  14 +-
 cmd/mem.c                           |  26 +-
 cmd/mmc.c                           |  15 +-
 cmd/read.c                          |  10 +-
 cmd/usb.c                           |  20 --
 common/console.c                    |  36 +++
 common/log.c                        |   1 +
 common/usb_kbd.c                    |  74 +----
 configs/octeontx2_95xx_defconfig    |   2 +-
 configs/octeontx2_96xx_defconfig    |   2 +-
 configs/octeontx_81xx_defconfig     |   2 +-
 configs/octeontx_83xx_defconfig     |   2 +-
 doc/arch/sandbox/sandbox.rst        |  21 +-
 doc/develop/uefi/uefi.rst           |   2 +-
 drivers/mtd/nvmxip/nvmxip-uclass.c  |  10 +-
 drivers/usb/Kconfig                 |   3 +-
 include/console.h                   |   8 +
 include/efi_default_filename.h      |  25 +-
 include/efi_loader.h                |  21 +-
 include/log.h                       |   2 +
 include/usb.h                       |  20 +-
 lib/efi_loader/Kconfig              |  22 ++
 lib/efi_loader/Makefile             |  47 +--
 lib/efi_loader/efi_console.c        |  28 +-
 lib/efi_loader/efi_disk.c           |  14 +-
 lib/efi_loader/helloworld.c         |   6 +
 lib/efi_loader/testapp.c            |  68 ++++
 scripts/pylint.base                 | 461 ++++++++++++++++------------
 test/boot/bootdev.c                 |  37 ++-
 test/boot/bootflow.c                | 119 +++++--
 test/boot/bootstd_common.c          |  12 +
 test/boot/bootstd_common.h          |   8 +
 test/cmd/mbr.c                      | 132 ++++----
 test/py/tests/bootstd/flash1.img.xz | Bin 0 -> 5016 bytes
 test/py/tests/test_efi_fit.py       |   2 +-
 test/py/tests/test_efi_loader.py    |   2 +-
 test/py/tests/test_ut.py            | 146 +++++----
 test/test-main.c                    |  38 +++
 48 files changed, 949 insertions(+), 610 deletions(-)
 create mode 100644 lib/efi_loader/testapp.c
 create mode 100644 test/py/tests/bootstd/flash1.img.xz

-- 
2.34.1


^ permalink raw reply	[flat|nested] 71+ messages in thread

end of thread, other threads:[~2024-08-22 17:11 UTC | newest]

Thread overview: 71+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-08-06 12:58 [PATCH v2 00/39] efi: Add a test for EFI bootmeth Simon Glass
2024-08-06 12:58 ` [PATCH v2 01/39] nvmxip: Drop the message on probe Simon Glass
2024-08-06 12:58 ` [PATCH v2 02/39] nvmxip: Avoid probing on boot Simon Glass
2024-08-06 12:58 ` [PATCH v2 03/39] bootstd: Add UT_TESTF_CONSOLE_REC to bootflow tests Simon Glass
2024-08-06 12:58 ` [PATCH v2 04/39] test/py: Fix some pylint warnings in test_ut.py Simon Glass
2024-08-06 12:58 ` [PATCH v2 05/39] scripts: Update pylint.base Simon Glass
2024-08-06 12:58 ` [PATCH v2 06/39] bootstd: Create a function to reset USB Simon Glass
2024-08-07  1:56   ` Heinrich Schuchardt
2024-08-07 14:36     ` Simon Glass
2024-08-08 21:07       ` Heinrich Schuchardt
2024-08-11 14:50         ` Simon Glass
2024-08-06 12:58 ` [PATCH v2 07/39] usb: Drop old non-DM code Simon Glass
2024-08-06 12:58 ` [PATCH v2 08/39] log: Add a new log category for the console Simon Glass
2024-08-06 12:58 ` [PATCH v2 09/39] usb: Add DEV_FLAGS_DM to stdio for USB keyboard Simon Glass
2024-08-06 12:58 ` [PATCH v2 10/39] dm: usb: Deal with USB keyboard persisting across tests Simon Glass
2024-08-06 12:58 ` [PATCH v2 11/39] test: mbr: Adjust test to use lower-case hex Simon Glass
2024-08-06 12:58 ` [PATCH v2 12/39] test: mbr: Adjust test to drop 0x Simon Glass
2024-08-06 12:58 ` [PATCH v2 13/39] sandbox: Change the range used for memory-mapping tags Simon Glass
2024-08-06 12:58 ` [PATCH v2 14/39] sandbox: Update cpu to use logging Simon Glass
2024-08-06 12:58 ` [PATCH v2 15/39] sandbox: Unmap old tags Simon Glass
2024-08-06 12:58 ` [PATCH v2 16/39] sandbox: Add some debugging to pci_io Simon Glass
2024-08-06 12:58 ` [PATCH v2 17/39] sandbox: Implement reference counting for address mapping Simon Glass
2024-08-06 12:58 ` [PATCH v2 18/39] mmc: Use map_sysmem() with buffers in the mmc command Simon Glass
2024-08-06 12:58 ` [PATCH v2 19/39] read: Use map_sysmem() with buffers in the read command Simon Glass
2024-08-08 10:20   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 20/39] cmd: Fix memory-mapping in cmp command Simon Glass
2024-08-06 12:58 ` [PATCH v2 21/39] test: mbr: Unmap the buffers after use Simon Glass
2024-08-08 10:13   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 22/39] test: mbr: Use a constant for the block size Simon Glass
2024-08-08 10:15   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 23/39] test: mbr: Use RAM for the buffers Simon Glass
2024-08-06 12:58 ` [PATCH v2 24/39] test: mbr: Drop a duplicate test Simon Glass
2024-08-06 12:58 ` [PATCH v2 25/39] efi: Use puts() in cout so that console recording works Simon Glass
2024-08-07  0:37   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 26/39] efi_loader: Put back copyright message Simon Glass
2024-08-06 12:58 ` [PATCH v2 27/39] efi_loader: Rename and move CMD_BOOTEFI_HELLO_COMPILE Simon Glass
2024-08-07  1:01   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 28/39] efi_loader: Shorten the app rules Simon Glass
2024-08-07  1:04   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 29/39] efi_loader: Shorten the app rules further Simon Glass
2024-08-07  1:05   ` Heinrich Schuchardt
2024-08-07  7:00   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 30/39] efi: Show the vendor in helloworld Simon Glass
2024-08-07  1:22   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 31/39] Revert "bootdev: avoid infinite probe loop" Simon Glass
2024-08-07  1:27   ` Heinrich Schuchardt
2024-08-06 12:58 ` [PATCH v2 32/39] bootstd: Make bootdev_next_prio() continue after failure Simon Glass
2024-08-06 12:58 ` [PATCH v2 33/39] efi: Use the same filename for all sandbox builds Simon Glass
2024-08-08 10:18   ` Ilias Apalodimas
2024-08-06 12:58 ` [PATCH v2 34/39] bootstd: Add debugging for efi bootmeth Simon Glass
2024-08-06 12:58 ` [PATCH v2 35/39] efi: Disable ANSI output for tests Simon Glass
2024-08-06 12:58 ` [PATCH v2 36/39] efi: Add a test app Simon Glass
2024-08-07  1:42   ` Heinrich Schuchardt
2024-08-07 14:36     ` Simon Glass
2024-08-08 21:17       ` Heinrich Schuchardt
2024-08-11 14:50         ` Simon Glass
2024-08-06 12:58 ` [PATCH v2 37/39] efi: Avoid using sandbox virtio devices Simon Glass
2024-08-07  1:47   ` Heinrich Schuchardt
2024-08-07  1:56     ` Tom Rini
2024-08-08 18:44       ` Simon Glass
2024-08-08 20:06         ` Tom Rini
2024-08-11 14:50           ` Simon Glass
2024-08-14 17:56             ` Tom Rini
2024-08-15 20:33               ` Simon Glass
2024-08-15 22:56                 ` Tom Rini
2024-08-16  1:34                   ` Simon Glass
2024-08-16 23:53                 ` Simon Glass
2024-08-22 15:13                   ` Tom Rini
2024-08-22 17:11                     ` Simon Glass
2024-08-06 12:58 ` [PATCH v2 38/39] test: Set up an image suitable for EFI testing Simon Glass
2024-08-06 12:58 ` [PATCH v2 39/39] efi: Add a test for the efi bootmeth Simon Glass

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox