U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 00/42] labgrid: Provide an integration with Labgrid
@ 2024-06-11 20:01 Simon Glass
  2024-06-11 20:01 ` [PATCH 01/42] trace: Update test to tolerate different trace-cmd version Simon Glass
                   ` (44 more replies)
  0 siblings, 45 replies; 59+ messages in thread
From: Simon Glass @ 2024-06-11 20:01 UTC (permalink / raw)
  To: U-Boot Mailing List
  Cc: Tom Rini, Simon Glass, AKASHI Takahiro, Alexander Gendin,
	Alexey Brodkin, Allen Martin, Alper Nebi Yasak, Andre Przywara,
	Andrejs Cainikovs, Andrew Davis, Bin Meng, Caleb Connolly,
	Christian Taedcke, Dan Carpenter, Francis Laniel,
	Heinrich Schuchardt, Ilias Apalodimas, Jaehoon Chung, Jagan Teki,
	Jerome Brunet, Leo Yu-Chi Liang, Lukas Funke, Manorit Chawdhry,
	Marcel Ziswiler, Marek Vasut, Marek Vasut, Martyn Welch,
	Michal Suchánek, Neha Malcom Francis, Neil Armstrong,
	Nishanth Menon, Pavel Herrmann, Peng Fan, Peter Robinson,
	Philippe Reynes, Samuel Holland, Sean Anderson,
	Stefan Herbrechtsmeier, Sughosh Ganu, Svyatoslav Ryhel,
	Trevor Woerner, Vignesh Raghavendra, u-boot-amlogic

Labgrid provides access to a hardware lab in an automated way. It is
possible to boot U-Boot on boards in the lab without physically touching
them. It relies on relays, USB UARTs and SD muxes, among other things.

By way of background, about 4 years ago I wrong a thing called Labman[1]
which allowed my lab of about 30 devices to be operated remotely, using
tbot for the console and build integration. While it worked OK and I
used it for many bisects, I didn't take it any further.

It turns out that there was already an existing program, called Labgrid,
which I did not know about at time (thank you Tom for telling me). It is
more rounded than Labman and has a number of advantages:

- does not need udev rules, mostly
- has several existing users who rely on it
- supports multiple machines exporting their devices

It lacks a 'lab check' feature and a few other things, but these can be
remedied.

On and off over the past several weeks I have been experimenting with
Labgrid. I have managed to create an initial U-Boot integration (this
series) by adding various features to Labgrid[2] and the U-Boot test
hooks.

I hope that this might inspire others to set up boards and run tests
automatically, rather than relying on infrequent, manual test. Perhaps
it may even be possible to have a number of labs available.

Included in the integration are a number of simple scripts which make it
easy to connect to boards and run tests:

ub-int <target>
    Build and boot on a target, starting an interactive session

ub-cli <target>
    Build and boot on a target, ensure U-Boot starts and provide an interactive
    session from there

ub-smoke <target>
    Smoke test U-Boot to check that it boots to a prompt on a target

ub-bisect
    Bisect a git tree to locate a failure on a particular target

ub-pyt <target> <testspec>
    Run U-Boot pytests on a target

Some of these help to provide the same tbot[4] workflow which I have
relied on for several years, albeit much simpler versions.

The goal here is to create some sort of script which can collect
patches from the mailing list, apply them and test them on a selection
of boards. I suspect that script already exists, so please let me know
what you suggest.

I hope you find this interesting and take a look!

[1] https://github.com/sjg20/u-boot/tree/lab6a
[2] https://github.com/labgrid-project/labgrid/pull/1411
[3] https://github.com/sjg20/uboot-test-hooks/tree/labgrid
[4] https://tbot.tools/index.html


Simon Glass (42):
  trace: Update test to tolerate different trace-cmd version
  binman: efi: Correct entry docs
  binman: Regenerate nxp docs
  binman: ti: Regenerate entry docs
  binman: Update the entrydocs header
  buildman: Make mrproper an argument to _reconfigure()
  buildman: Make mrproper an argument to _config_and_build()
  buildman: Make mrproper an argument to run_commit()
  buildman: Avoid rebuilding when --mrproper is used
  buildman: Add a flag to force mrproper on failure
  buildman: Retry the build for current source
  buildman: Add a way to limit the number of buildmans
  dm: core: Enhance comments on bind_drivers_pass()
  initcall: Correct use of relocation offset
  am33xx: Provide a function to set up the debug UART
  sunxi: Mark scp as optional
  google: Disable TPMv2 on most Chromebooks
  meson: Correct driver declaration for meson_axg_gpio
  test: Allow signaling that U-Boot is ready
  test: Make bootstd init run only on sandbox
  test: Use a constant for the test timeout
  test: Pass stderr to stdout
  test: Release board after tests complete
  log: Allow tests to pass with CONFIG_LOGF_FUNC_PAD set
  test: Allow connecting to a running board
  test: Decode exceptions only with sandbox
  test: Avoid failing skipped tests
  test: dm: Show failing driver name
  test: Check help output
  test: Create a common function to get the config
  test: Introduce the concept of a role
  test: Move the receive code into a function
  test: Separate out the exception handling
  test: Detect dead connections
  test: Tidy up remaining exceptions
  test: Introduce lab mode
  test: Improve handling of sending commands
  test: Fix mulptiplex_log typo
  test: Avoid double echo when starting up
  test: Try to shut down the lab console gracefully
  test: Add a section for closing the connection
  CI: Allow running tests on sjg lab

 .gitlab-ci.yml                                | 151 +++++++++++++++++
 arch/arm/dts/sunxi-u-boot.dtsi                |   1 +
 arch/arm/mach-omap2/am33xx/board.c            |  18 +-
 configs/chromebook_link64_defconfig           |   1 +
 configs/chromebook_link_defconfig             |   1 +
 configs/chromebook_samus_defconfig            |   1 +
 configs/chromebook_samus_tpl_defconfig        |   1 +
 configs/nyan-big_defconfig                    |   4 +-
 configs/snow_defconfig                        |   1 +
 drivers/core/lists.c                          |  16 ++
 drivers/pinctrl/meson/pinctrl-meson-axg-pmx.c |   2 +-
 drivers/pinctrl/meson/pinctrl-meson-axg.c     |   4 +-
 drivers/pinctrl/meson/pinctrl-meson-axg.h     |   2 +-
 drivers/pinctrl/meson/pinctrl-meson-g12a.c    |   4 +-
 lib/initcall.c                                |   6 +-
 test/py/conftest.py                           |  86 ++++++++--
 test/py/tests/test_dm.py                      |   5 +-
 test/py/tests/test_help.py                    |   6 +-
 test/py/tests/test_log.py                     |  11 +-
 test/py/tests/test_trace.py                   |   6 +-
 test/py/tests/test_ut.py                      |   1 +
 test/py/u_boot_console_base.py                | 154 ++++++++++++------
 test/py/u_boot_console_exec_attach.py         |  31 +++-
 test/py/u_boot_console_sandbox.py             |   2 +-
 test/py/u_boot_spawn.py                       | 123 ++++++++++++--
 test/test-main.c                              |  16 +-
 tools/binman/entries.rst                      | 115 +++++++++----
 tools/binman/entry.py                         |   2 +-
 tools/binman/etype/efi_capsule.py             |  40 ++---
 tools/binman/etype/efi_empty_capsule.py       |  22 +--
 tools/binman/etype/ti_secure.py               |  45 ++---
 tools/buildman/builder.py                     |  18 +-
 tools/buildman/builderthread.py               |  44 +++--
 tools/buildman/buildman.rst                   |   8 +-
 tools/buildman/cmdline.py                     |   6 +-
 tools/buildman/control.py                     | 141 +++++++++++++++-
 tools/buildman/pyproject.toml                 |   6 +-
 tools/buildman/test.py                        | 121 ++++++++++++++
 tools/u_boot_pylib/terminal.py                |   7 +-
 39 files changed, 1003 insertions(+), 226 deletions(-)

-- 
2.34.1


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

end of thread, other threads:[~2024-06-26 12:29 UTC | newest]

Thread overview: 59+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-11 20:01 [PATCH 00/42] labgrid: Provide an integration with Labgrid Simon Glass
2024-06-11 20:01 ` [PATCH 01/42] trace: Update test to tolerate different trace-cmd version Simon Glass
2024-06-11 20:01 ` [PATCH 02/42] binman: efi: Correct entry docs Simon Glass
2024-06-11 20:01 ` [PATCH 03/42] binman: Regenerate nxp docs Simon Glass
2024-06-11 20:01 ` [PATCH 04/42] binman: ti: Regenerate entry docs Simon Glass
2024-06-11 20:01 ` [PATCH 05/42] binman: Update the entrydocs header Simon Glass
2024-06-11 20:01 ` [PATCH 06/42] buildman: Make mrproper an argument to _reconfigure() Simon Glass
2024-06-11 20:01 ` [PATCH 07/42] buildman: Make mrproper an argument to _config_and_build() Simon Glass
2024-06-11 20:01 ` [PATCH 08/42] buildman: Make mrproper an argument to run_commit() Simon Glass
2024-06-11 20:01 ` [PATCH 09/42] buildman: Avoid rebuilding when --mrproper is used Simon Glass
2024-06-11 20:01 ` [PATCH 10/42] buildman: Add a flag to force mrproper on failure Simon Glass
2024-06-11 20:01 ` [PATCH 11/42] buildman: Retry the build for current source Simon Glass
2024-06-11 20:01 ` [PATCH 12/42] buildman: Add a way to limit the number of buildmans Simon Glass
2024-06-11 20:01 ` [PATCH 13/42] dm: core: Enhance comments on bind_drivers_pass() Simon Glass
2024-06-11 20:01 ` [PATCH 14/42] initcall: Correct use of relocation offset Simon Glass
2024-06-12  9:04   ` Caleb Connolly
2024-06-11 20:01 ` [PATCH 15/42] am33xx: Provide a function to set up the debug UART Simon Glass
2024-06-11 20:01 ` [PATCH 16/42] sunxi: Mark scp as optional Simon Glass
2024-06-11 20:01 ` [PATCH 17/42] google: Disable TPMv2 on most Chromebooks Simon Glass
2024-06-12  5:50   ` Ilias Apalodimas
2024-06-11 20:01 ` [PATCH 18/42] meson: Correct driver declaration for meson_axg_gpio Simon Glass
2024-06-12  9:38   ` Neil Armstrong
2024-06-11 20:01 ` [PATCH 19/42] test: Allow signaling that U-Boot is ready Simon Glass
2024-06-11 20:01 ` [PATCH 20/42] test: Make bootstd init run only on sandbox Simon Glass
2024-06-11 20:01 ` [PATCH 21/42] test: Use a constant for the test timeout Simon Glass
2024-06-11 20:01 ` [PATCH 22/42] test: Pass stderr to stdout Simon Glass
2024-06-11 20:01 ` [PATCH 23/42] test: Release board after tests complete Simon Glass
2024-06-12 16:02   ` Tom Rini
2024-06-12 20:24     ` Simon Glass
2024-06-11 20:01 ` [PATCH 24/42] log: Allow tests to pass with CONFIG_LOGF_FUNC_PAD set Simon Glass
2024-06-11 20:01 ` [PATCH 25/42] test: Allow connecting to a running board Simon Glass
2024-06-24 23:56   ` Andrejs Cainikovs
2024-06-25 12:31     ` Simon Glass
2024-06-25 14:14       ` Tom Rini
2024-06-25 15:21         ` Andrejs Cainikovs
2024-06-11 20:01 ` [PATCH 26/42] test: Decode exceptions only with sandbox Simon Glass
2024-06-11 20:01 ` [PATCH 27/42] test: Avoid failing skipped tests Simon Glass
2024-06-11 20:01 ` [PATCH 28/42] test: dm: Show failing driver name Simon Glass
2024-06-11 20:01 ` [PATCH 29/42] test: Check help output Simon Glass
2024-06-11 20:01 ` [PATCH 30/42] test: Create a common function to get the config Simon Glass
2024-06-11 20:01 ` [PATCH 31/42] test: Introduce the concept of a role Simon Glass
2024-06-11 20:01 ` [PATCH 32/42] test: Move the receive code into a function Simon Glass
2024-06-11 20:01 ` [PATCH 33/42] test: Separate out the exception handling Simon Glass
2024-06-11 20:01 ` [PATCH 34/42] test: Detect dead connections Simon Glass
2024-06-11 20:01 ` [PATCH 35/42] test: Tidy up remaining exceptions Simon Glass
2024-06-11 20:01 ` [PATCH 36/42] test: Introduce lab mode Simon Glass
2024-06-11 20:01 ` [PATCH 37/42] test: Improve handling of sending commands Simon Glass
2024-06-11 20:01 ` [PATCH 38/42] test: Fix mulptiplex_log typo Simon Glass
2024-06-11 20:01 ` [PATCH 39/42] test: Avoid double echo when starting up Simon Glass
2024-06-11 20:01 ` [PATCH 40/42] test: Try to shut down the lab console gracefully Simon Glass
2024-06-11 20:01 ` [PATCH 41/42] test: Add a section for closing the connection Simon Glass
2024-06-11 20:01 ` [PATCH 42/42] CI: Allow running tests on sjg lab Simon Glass
2024-06-12  8:43   ` Andrejs Cainikovs
2024-06-11 20:09 ` [PATCH 00/42] labgrid: Provide an integration with Labgrid Simon Glass
2024-06-12  6:08 ` Ilias Apalodimas
2024-06-12 16:03   ` Tom Rini
2024-06-12 20:24     ` Simon Glass
2024-06-12 20:24   ` Simon Glass
2024-06-26  9:43 ` (subset) " Neil Armstrong

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