[PATCH v2 00/19] Tidy up console recording in tests

Simon Glass sjg at chromium.org
Thu Aug 22 15:57:45 CEST 2024


This series started as a small fix for checking for an empty line,
but in the process several other problems were found and fixed:

- fix tests which use console recording but don't set the flag
- drop unnecessary resetting of the console in tests
- drop unnecessary blank line before MMC output
- update the docs a little
- fix buildman test failure on newer Pythons
- a few other minor things

This series also renames the confusing flag names, so that they are
easier to remember - just a UTF_ (unit-test flags) prefix.

Changes in v2:
- Update env test too
- Rewrite as separate functions to avoid the macro
- Drop wget patches as they have been sent by the author

Simon Glass (19):
  buildman: Make test_process_limit handle time.monotonic()
  test: Fail when an empty line is expected but not present
  test: Rename unit-test flags
  test: Drop the blank line before test macros
  test: Rename UTF_CONSOLE_REC to UTF_CONSOLE
  mmc: Drop the blank line before accesses
  test: Update NAND test to avoid extra macros
  test: bloblist: Use UTF_CONSOLE in tests
  test: boot: Use UTF_CONSOLE in tests
  test: fdt: Check internal-function return values
  test: fdt: Move common code into the setup functions
  test: cmd: Use UTF_CONSOLE in tests
  test: cmd: Drop unnecessary console_record_reset_enable()
  test: dm: Use UTF_CONSOLE in tests
  test: hush: Use UTF_CONSOLE in tests
  test: log: Use UTF_CONSOLE in tests
  test: Use UTF_CONSOLE in remaining tests
  test: Tidy up checking for console end
  doc: Add a few notes about how to use console checking

 cmd/mmc.c                     |  12 +-
 common/console.c              |   2 +
 doc/develop/commands.rst      |   9 +-
 doc/develop/tests_writing.rst |  18 +-
 doc/usage/cmd/ut.rst          |   2 +-
 include/console.h             |   2 +-
 include/dm/test.h             |   2 +-
 include/test/log.h            |   5 +-
 include/test/spl.h            |   2 +-
 include/test/test.h           |  32 +-
 include/test/ut.h             |   2 +-
 test/bloblist.c               |  14 +-
 test/boot/bootdev.c           |  49 ++-
 test/boot/bootflow.c          |  65 ++--
 test/boot/bootmeth.c          |  14 +-
 test/boot/cedit.c             |  13 +-
 test/boot/expo.c              |  15 +-
 test/boot/upl.c               |   6 +-
 test/boot/vbe_fixup.c         |   4 +-
 test/boot/vbe_simple.c        |   2 +-
 test/cmd/addrmap.c            |   3 +-
 test/cmd/armffa.c             |   3 +-
 test/cmd/bdinfo.c             |  24 +-
 test/cmd/exit.c               |  39 +--
 test/cmd/fdt.c                | 544 +++++++++++++++-------------------
 test/cmd/font.c               |  13 +-
 test/cmd/history.c            |   2 +-
 test/cmd/loadm.c              |   6 +-
 test/cmd/mbr.c                |  24 +-
 test/cmd/mem_search.c         |  31 +-
 test/cmd/pci_mps.c            |   3 +-
 test/cmd/pinmux.c             |   7 +-
 test/cmd/pwm.c                |   7 +-
 test/cmd/rw.c                 |   5 +-
 test/cmd/seama.c              |   9 +-
 test/cmd/setexpr.c            |  24 +-
 test/cmd/temperature.c        |   5 +-
 test/cmd/test_echo.c          |   8 +-
 test/cmd/test_pause.c         |   9 +-
 test/cmd/wget.c               |   9 +-
 test/common/cread.c           |   4 +-
 test/common/event.c           |   2 +-
 test/common/test_autoboot.c   |   4 +-
 test/dm/acpi.c                |  39 +--
 test/dm/acpi_dp.c             |   2 +-
 test/dm/acpigen.c             |  19 +-
 test/dm/adc.c                 |  16 +-
 test/dm/audio.c               |   2 +-
 test/dm/axi.c                 |   9 +-
 test/dm/blk.c                 |  16 +-
 test/dm/blkmap.c              |   4 +-
 test/dm/bootcount.c           |  10 +-
 test/dm/bus.c                 |  26 +-
 test/dm/button.c              |  12 +-
 test/dm/cache.c               |   2 +-
 test/dm/clk.c                 |   7 +-
 test/dm/clk_ccf.c             |   3 +-
 test/dm/core.c                |  47 ++-
 test/dm/cpu.c                 |   3 +-
 test/dm/cros_ec.c             |  18 +-
 test/dm/cros_ec_pwm.c         |   2 +-
 test/dm/devres.c              |  12 +-
 test/dm/dma.c                 |   6 +-
 test/dm/dsa.c                 |   6 +-
 test/dm/dsi_host.c            |   3 +-
 test/dm/ecdsa.c               |   2 +-
 test/dm/efi_media.c           |   2 +-
 test/dm/eth.c                 |  24 +-
 test/dm/extcon.c              |   3 +-
 test/dm/fastboot.c            |   2 +-
 test/dm/fdtdec.c              |   4 +-
 test/dm/ffa.c                 |   6 +-
 test/dm/firmware.c            |   2 +-
 test/dm/fpga.c                |   3 +-
 test/dm/fwu_mdata.c           |   4 +-
 test/dm/gpio.c                |  32 +-
 test/dm/host.c                |   8 +-
 test/dm/hwspinlock.c          |   3 +-
 test/dm/i2c.c                 |  19 +-
 test/dm/i2s.c                 |   2 +-
 test/dm/iommu.c               |   8 +-
 test/dm/irq.c                 |  10 +-
 test/dm/led.c                 |  12 +-
 test/dm/mailbox.c             |   2 +-
 test/dm/mdio.c                |   3 +-
 test/dm/mdio_mux.c            |   3 +-
 test/dm/memory.c              |   3 +-
 test/dm/misc.c                |   3 +-
 test/dm/mmc.c                 |   4 +-
 test/dm/mux-cmd.c             |   6 +-
 test/dm/mux-emul.c            |   4 +-
 test/dm/mux-mmio.c            |   4 +-
 test/dm/nand.c                |  47 ++-
 test/dm/nop.c                 |   3 +-
 test/dm/nvmxip.c              |   3 +-
 test/dm/of_platdata.c         |  16 +-
 test/dm/ofnode.c              | 106 +++----
 test/dm/ofread.c              |   2 +-
 test/dm/osd.c                 |   6 +-
 test/dm/p2sb.c                |   2 +-
 test/dm/panel.c               |   2 +-
 test/dm/part.c                |   6 +-
 test/dm/pch.c                 |   4 +-
 test/dm/pci.c                 |  31 +-
 test/dm/pci_ep.c              |   3 +-
 test/dm/phy.c                 |  10 +-
 test/dm/phys2bus.c            |   2 +-
 test/dm/pinmux.c              |   6 +-
 test/dm/pmc.c                 |   2 +-
 test/dm/pmic.c                |  13 +-
 test/dm/power-domain.c        |   2 +-
 test/dm/pwm.c                 |   2 +-
 test/dm/qfw.c                 |   6 +-
 test/dm/ram.c                 |   2 +-
 test/dm/read.c                |   2 +-
 test/dm/reboot-mode.c         |   6 +-
 test/dm/regmap.c              |  18 +-
 test/dm/regulator.c           |  20 +-
 test/dm/remoteproc.c          |   4 +-
 test/dm/reset.c               |  11 +-
 test/dm/rkmtd.c               |   6 +-
 test/dm/rng.c                 |   6 +-
 test/dm/rtc.c                 |  18 +-
 test/dm/scmi.c                |  17 +-
 test/dm/scsi.c                |   2 +-
 test/dm/serial.c              |   3 +-
 test/dm/sf.c                  |   4 +-
 test/dm/simple-bus.c          |   2 +-
 test/dm/simple-pm-bus.c       |   2 +-
 test/dm/sm.c                  |   3 +-
 test/dm/smem.c                |   2 +-
 test/dm/soc.c                 |   3 +-
 test/dm/sound.c               |   4 +-
 test/dm/spi.c                 |   6 +-
 test/dm/spmi.c                |   6 +-
 test/dm/syscon-reset.c        |   2 +-
 test/dm/syscon.c              |   6 +-
 test/dm/sysinfo-gpio.c        |   2 +-
 test/dm/sysinfo.c             |   3 +-
 test/dm/sysreset.c            |   8 +-
 test/dm/tag.c                 |   4 -
 test/dm/tee.c                 |   3 +-
 test/dm/test-fdt.c            |  58 ++--
 test/dm/timer.c               |   4 +-
 test/dm/tpm.c                 |   8 +-
 test/dm/usb.c                 |  12 +-
 test/dm/video.c               |  42 +--
 test/dm/virtio.c              |   2 +-
 test/dm/virtio_device.c       |   8 +-
 test/dm/virtio_rng.c          |   2 +-
 test/dm/wdt.c                 |   8 +-
 test/env/cmd_ut_env.c         |   2 +-
 test/env/hashtable.c          |   2 -
 test/hush/dollar.c            |  10 +-
 test/hush/loop.c              |  11 +-
 test/lib/asn1.c               |   3 -
 test/lib/efi_device_path.c    |   1 -
 test/lib/efi_image_region.c   |   2 -
 test/lib/hexdump.c            |   3 -
 test/lib/lmb.c                |   1 -
 test/lib/rsa.c                |   2 -
 test/lib/sscanf.c             |   1 -
 test/lib/string.c             |   3 -
 test/lib/test_aes.c           |   1 -
 test/lib/test_crc8.c          |   1 -
 test/lib/test_crypt.c         |   1 -
 test/lib/test_errno_str.c     |   1 -
 test/lib/test_print.c         |  16 +-
 test/lib/uuid.c               |   1 -
 test/log/cont_test.c          |   7 +-
 test/log/log_filter.c         |   7 +-
 test/log/log_test.c           |  51 +---
 test/log/nolog_ndebug.c       |   3 +-
 test/log/nolog_test.c         |  24 +-
 test/log/pr_cont_test.c       |   3 +-
 test/print_ut.c               |  21 +-
 test/test-main.c              |  40 +--
 test/ut.c                     |   8 +-
 tools/buildman/test.py        |   1 +
 179 files changed, 989 insertions(+), 1328 deletions(-)

-- 
2.34.1



More information about the U-Boot mailing list