From 725c438c6271f1870636f61a68d6904dc27a1357 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 22 Aug 2024 07:57:48 -0600 Subject: test: Rename unit-test flags The UT_TESTF_ macros read as 'unit test test flags' which is not right. Rename to UTF ('unit test flags'). This has the benefit of being shorter, which helps keep UNIT_TEST() declarations on a single line. Give the enum a name and reference it from the UNIT_TEST() macros while we are here. Signed-off-by: Simon Glass --- doc/develop/commands.rst | 2 +- doc/develop/tests_writing.rst | 14 +++++++------- doc/usage/cmd/ut.rst | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) (limited to 'doc') diff --git a/doc/develop/commands.rst b/doc/develop/commands.rst index 5ad4e59c838..6427844f143 100644 --- a/doc/develop/commands.rst +++ b/doc/develop/commands.rst @@ -223,4 +223,4 @@ Here is an example: return 0; } - DM_TEST(dm_test_acpi_cmd_items, UT_TESTF_SCAN_PDATA | UT_TESTF_SCAN_FDT); + DM_TEST(dm_test_acpi_cmd_items, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst index 44b544fa78b..655eb95110d 100644 --- a/doc/develop/tests_writing.rst +++ b/doc/develop/tests_writing.rst @@ -81,7 +81,7 @@ The best of both worlds is sometimes to have a Python test set things up and perform some operations, with a 'checker' C unit test doing the checks afterwards. This can be achieved with these steps: -- Add the `UT_TESTF_MANUAL` flag to the checker test so that the `ut` command +- Add the `UTF_MANUAL` flag to the checker test so that the `ut` command does not run it by default - Add a `_norun` suffix to the name so that pytest knows to skip it too @@ -95,7 +95,7 @@ test to run it, e.g.:: # Run the checker to make sure that everything worked ut -f bootstd vbe_test_fixup_norun -Note that apart from the `UT_TESTF_MANUAL` flag, the code in a 'manual' C test +Note that apart from the `UTF_MANUAL` flag, the code in a 'manual' C test is just like any other C test. It still uses ut_assert...() and other such constructs, in this case to check that the expected things happened in the Python test. @@ -167,7 +167,7 @@ There is no exactly equivalent C test, but here is a similar one that tests 'ms' return 0; } - MEM_TEST(mem_test_ms_b, UT_TESTF_CONSOLE_REC); + MEM_TEST(mem_test_ms_b, UTF_CONSOLE_REC); This runs the command directly in U-Boot, then checks the console output, also directly in U-Boot. If run by itself this takes 100ms. For 1000 runs it takes @@ -226,14 +226,14 @@ Declare the test with:: return 0; } - DM_TEST(dm_test_uclassname_what, UT_TESTF_SCAN_FDT); + DM_TEST(dm_test_uclassname_what, UTF_SCAN_FDT); Replace 'uclassname' with the name of your uclass, if applicable. Replace 'what' with what you are testing. The flags for DM_TEST() are defined in test/test.h and you typically want -UT_TESTF_SCAN_FDT so that the devicetree is scanned and all devices are bound -and ready for use. The DM_TEST macro adds UT_TESTF_DM automatically so that +UTF_SCAN_FDT so that the devicetree is scanned and all devices are bound +and ready for use. The DM_TEST macro adds UTF_DM automatically so that the test runner knows it is a driver model test. Driver model tests are special in that the entire driver model state is @@ -263,7 +263,7 @@ with the suite. For example, to add a new mem_search test:: return 0; } - MEM_TEST(mem_test_ms_new_thing, UT_TESTF_CONSOLE_REC); + MEM_TEST(mem_test_ms_new_thing, UTF_CONSOLE_REC); Note that the MEM_TEST() macros is defined at the top of the file. diff --git a/doc/usage/cmd/ut.rst b/doc/usage/cmd/ut.rst index 45bc9ffbdc5..afeafa824d6 100644 --- a/doc/usage/cmd/ut.rst +++ b/doc/usage/cmd/ut.rst @@ -32,7 +32,7 @@ to run some tests on real boards. For a list of available test suites, type `ut` by itself. -Each test is normally run once, although those marked with `UT_TESTF_DM` are +Each test is normally run once, although those marked with `UTF_DM` are run with livetree and flattree where possible. To run a test more than once, use the `-r` flag. -- cgit v1.3.1 From b073d48e8dd7d178ebd237089be730d15c72ddfc Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 22 Aug 2024 07:57:49 -0600 Subject: test: Drop the blank line before test macros Most tests don't have this. It helps to keep the test declaration clearly associated with the function it relates to, rather than the next one in the file. Remove the extra blank line and mention this in the docs. Signed-off-by: Simon Glass --- doc/develop/tests_writing.rst | 3 +++ test/cmd/armffa.c | 1 - test/cmd/bdinfo.c | 4 ---- test/cmd/exit.c | 1 - test/cmd/mbr.c | 1 - test/cmd/pci_mps.c | 1 - test/cmd/pinmux.c | 1 - test/cmd/pwm.c | 1 - test/cmd/rw.c | 1 - test/cmd/setexpr.c | 1 - test/cmd/temperature.c | 1 - test/cmd/test_echo.c | 1 - test/cmd/wget.c | 1 - test/common/test_autoboot.c | 1 - test/dm/axi.c | 3 --- test/dm/bootcount.c | 6 +----- test/dm/clk.c | 1 - test/dm/clk_ccf.c | 1 - test/dm/core.c | 1 - test/dm/cpu.c | 1 - test/dm/dsa.c | 2 -- test/dm/dsi_host.c | 1 - test/dm/eth.c | 4 ---- test/dm/extcon.c | 1 - test/dm/ffa.c | 2 -- test/dm/fpga.c | 1 - test/dm/hwspinlock.c | 1 - test/dm/i2c.c | 1 - test/dm/mdio.c | 1 - test/dm/mdio_mux.c | 1 - test/dm/memory.c | 1 - test/dm/misc.c | 1 - test/dm/nop.c | 1 - test/dm/nvmxip.c | 1 - test/dm/osd.c | 2 -- test/dm/pci_ep.c | 1 - test/dm/pmic.c | 1 - test/dm/qfw.c | 2 -- test/dm/reboot-mode.c | 2 -- test/dm/regmap.c | 1 - test/dm/reset.c | 1 - test/dm/scmi.c | 3 --- test/dm/serial.c | 1 - test/dm/sm.c | 1 - test/dm/soc.c | 1 - test/dm/sysinfo.c | 1 - test/dm/tag.c | 4 ---- test/dm/tee.c | 1 - test/dm/test-fdt.c | 1 - test/env/hashtable.c | 2 -- 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 | 2 -- test/lib/uuid.c | 1 - 64 files changed, 4 insertions(+), 95 deletions(-) (limited to 'doc') diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst index 655eb95110d..c277c8dd44f 100644 --- a/doc/develop/tests_writing.rst +++ b/doc/develop/tests_writing.rst @@ -228,6 +228,9 @@ Declare the test with:: } DM_TEST(dm_test_uclassname_what, UTF_SCAN_FDT); +Note that the convention is to NOT add a blank line before the macro, so that +the function it relates to is more obvious. + Replace 'uclassname' with the name of your uclass, if applicable. Replace 'what' with what you are testing. diff --git a/test/cmd/armffa.c b/test/cmd/armffa.c index f5d5a1b54a3..d7b076cfe7c 100644 --- a/test/cmd/armffa.c +++ b/test/cmd/armffa.c @@ -28,5 +28,4 @@ static int dm_test_armffa_cmd(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_armffa_cmd, UTF_SCAN_FDT | UTF_CONSOLE_REC); diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index 973544f63f6..cb88d2ee11b 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -244,7 +244,6 @@ static int bdinfo_test_full(struct unit_test_state *uts) return 0; } - BDINFO_TEST(bdinfo_test_full, UTF_CONSOLE_REC); static int bdinfo_test_help(struct unit_test_state *uts) @@ -266,7 +265,6 @@ static int bdinfo_test_help(struct unit_test_state *uts) return 0; } - BDINFO_TEST(bdinfo_test_help, UTF_CONSOLE_REC); static int bdinfo_test_memory(struct unit_test_state *uts) @@ -282,7 +280,6 @@ static int bdinfo_test_memory(struct unit_test_state *uts) return 0; } - BDINFO_TEST(bdinfo_test_memory, UTF_CONSOLE_REC); static int bdinfo_test_eth(struct unit_test_state *uts) @@ -298,7 +295,6 @@ static int bdinfo_test_eth(struct unit_test_state *uts) return 0; } - BDINFO_TEST(bdinfo_test_eth, UTF_CONSOLE_REC); int do_ut_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/test/cmd/exit.c b/test/cmd/exit.c index d4aac0facf6..e7e454c7631 100644 --- a/test/cmd/exit.c +++ b/test/cmd/exit.c @@ -121,7 +121,6 @@ static int cmd_exit_test(struct unit_test_state *uts) return 0; } - EXIT_TEST(cmd_exit_test, UTF_CONSOLE_REC); int do_ut_exit(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/test/cmd/mbr.c b/test/cmd/mbr.c index fd601ee5f53..e4b694b728f 100644 --- a/test/cmd/mbr.c +++ b/test/cmd/mbr.c @@ -479,5 +479,4 @@ static int dm_test_cmd_mbr(struct unit_test_state *uts) { return mbr_test_run(uts); } - DM_TEST(dm_test_cmd_mbr, UTF_SCAN_FDT | UTF_CONSOLE_REC); diff --git a/test/cmd/pci_mps.c b/test/cmd/pci_mps.c index f7f77e73a30..755a0649770 100644 --- a/test/cmd/pci_mps.c +++ b/test/cmd/pci_mps.c @@ -27,7 +27,6 @@ static int test_pci_mps_safe(struct unit_test_state *uts) return 0; } - PCI_MPS_TEST(test_pci_mps_safe, UTF_CONSOLE_REC); int do_ut_pci_mps(struct cmd_tbl *cmdtp, int flag, int argc, diff --git a/test/cmd/pinmux.c b/test/cmd/pinmux.c index 23f9b9a9f3a..0b4e001fa1e 100644 --- a/test/cmd/pinmux.c +++ b/test/cmd/pinmux.c @@ -36,5 +36,4 @@ static int dm_test_cmd_pinmux_status_pinname(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_cmd_pinmux_status_pinname, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/cmd/pwm.c b/test/cmd/pwm.c index 494f31f4dae..44f52e15cbb 100644 --- a/test/cmd/pwm.c +++ b/test/cmd/pwm.c @@ -71,5 +71,4 @@ static int dm_test_pwm_cmd(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_pwm_cmd, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE_REC); diff --git a/test/cmd/rw.c b/test/cmd/rw.c index 3dcf4228ee6..eeda87b53ed 100644 --- a/test/cmd/rw.c +++ b/test/cmd/rw.c @@ -99,5 +99,4 @@ static int dm_test_read_write(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_read_write, UTF_SCAN_FDT | UTF_CONSOLE_REC); diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c index f024a335763..a4086c9451c 100644 --- a/test/cmd/setexpr.c +++ b/test/cmd/setexpr.c @@ -478,7 +478,6 @@ static int setexpr_test_fmt(struct unit_test_state *uts) return 0; } - SETEXPR_TEST(setexpr_test_fmt, UTF_CONSOLE_REC); #endif diff --git a/test/cmd/temperature.c b/test/cmd/temperature.c index fc0c95f3d81..b86c7d44b33 100644 --- a/test/cmd/temperature.c +++ b/test/cmd/temperature.c @@ -34,5 +34,4 @@ static int dm_test_cmd_temperature(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_cmd_temperature, UTF_SCAN_FDT | UTF_CONSOLE_REC); diff --git a/test/cmd/test_echo.c b/test/cmd/test_echo.c index cde74ebeb61..ee07ab22933 100644 --- a/test/cmd/test_echo.c +++ b/test/cmd/test_echo.c @@ -56,5 +56,4 @@ static int lib_test_hush_echo(struct unit_test_state *uts) } return 0; } - LIB_TEST(lib_test_hush_echo, 0); diff --git a/test/cmd/wget.c b/test/cmd/wget.c index b0feb21dc41..1ce167c4ab4 100644 --- a/test/cmd/wget.c +++ b/test/cmd/wget.c @@ -223,5 +223,4 @@ static int net_test_wget(struct unit_test_state *uts) return 0; } - LIB_TEST(net_test_wget, 0); diff --git a/test/common/test_autoboot.c b/test/common/test_autoboot.c index 4ba1dcc8091..a556cbf8e33 100644 --- a/test/common/test_autoboot.c +++ b/test/common/test_autoboot.c @@ -91,5 +91,4 @@ static int test_autoboot(struct unit_test_state *uts) return CMD_RET_SUCCESS; } - COMMON_TEST(test_autoboot, 0); diff --git a/test/dm/axi.c b/test/dm/axi.c index 1138a46aca1..45c46a19739 100644 --- a/test/dm/axi.c +++ b/test/dm/axi.c @@ -21,7 +21,6 @@ static int dm_test_axi_base(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_axi_base, UTF_SCAN_PDATA | UTF_SCAN_FDT); /* Test that sandbox PCI bus numbering works correctly */ @@ -33,7 +32,6 @@ static int dm_test_axi_busnum(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_axi_busnum, UTF_SCAN_PDATA | UTF_SCAN_FDT); /* Test that we can use the store device correctly */ @@ -74,5 +72,4 @@ static int dm_test_axi_store(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_axi_store, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/dm/bootcount.c b/test/dm/bootcount.c index 4b0a4b37931..f66927a5d37 100644 --- a/test/dm/bootcount.c +++ b/test/dm/bootcount.c @@ -35,7 +35,6 @@ static int dm_test_bootcount_rtc(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_bootcount_rtc, UTF_SCAN_PDATA | UTF_SCAN_FDT); static int dm_test_bootcount_syscon_four_bytes(struct unit_test_state *uts) @@ -55,7 +54,6 @@ static int dm_test_bootcount_syscon_four_bytes(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_bootcount_syscon_four_bytes, UTF_SCAN_PDATA | UTF_SCAN_FDT); @@ -76,6 +74,4 @@ static int dm_test_bootcount_syscon_two_bytes(struct unit_test_state *uts) return 0; } - -DM_TEST(dm_test_bootcount_syscon_two_bytes, - UTF_SCAN_PDATA | UTF_SCAN_FDT); +DM_TEST(dm_test_bootcount_syscon_two_bytes, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/dm/clk.c b/test/dm/clk.c index 922b0536154..790968e6477 100644 --- a/test/dm/clk.c +++ b/test/dm/clk.c @@ -46,7 +46,6 @@ static int dm_test_clk_base(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_clk_base, UTF_SCAN_FDT); static int dm_test_clk(struct unit_test_state *uts) diff --git a/test/dm/clk_ccf.c b/test/dm/clk_ccf.c index 95c0f42caab..ac56f17b775 100644 --- a/test/dm/clk_ccf.c +++ b/test/dm/clk_ccf.c @@ -208,5 +208,4 @@ static int dm_test_clk_ccf(struct unit_test_state *uts) return 1; } - DM_TEST(dm_test_clk_ccf, UTF_SCAN_FDT); diff --git a/test/dm/core.c b/test/dm/core.c index 5d4678437e6..e0c5b9e0017 100644 --- a/test/dm/core.c +++ b/test/dm/core.c @@ -188,7 +188,6 @@ static int dm_test_compare_node_name(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_compare_node_name, UTF_SCAN_PDATA); /* Test that binding with uclass plat setting occurs correctly */ diff --git a/test/dm/cpu.c b/test/dm/cpu.c index 885cddb8690..9b2f90ee1e5 100644 --- a/test/dm/cpu.c +++ b/test/dm/cpu.c @@ -47,5 +47,4 @@ static int dm_test_cpu(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_cpu, UTF_SCAN_FDT); diff --git a/test/dm/dsa.c b/test/dm/dsa.c index 2537605fdce..c6b4e12a758 100644 --- a/test/dm/dsa.c +++ b/test/dm/dsa.c @@ -56,7 +56,6 @@ static int dm_test_dsa_probe(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_dsa_probe, UTF_SCAN_FDT); /* This test sends ping requests with the local address through each DSA port @@ -78,5 +77,4 @@ static int dm_test_dsa(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_dsa, UTF_SCAN_FDT); diff --git a/test/dm/dsi_host.c b/test/dm/dsi_host.c index bf3fd99a18b..b92742472d4 100644 --- a/test/dm/dsi_host.c +++ b/test/dm/dsi_host.c @@ -54,5 +54,4 @@ static int dm_test_dsi_host(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_dsi_host, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/dm/eth.c b/test/dm/eth.c index 8479ebd3f21..467495863e1 100644 --- a/test/dm/eth.c +++ b/test/dm/eth.c @@ -528,7 +528,6 @@ static int dm_test_eth_async_arp_reply(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_eth_async_arp_reply, UTF_SCAN_FDT); static int sb_check_ping_reply(struct udevice *dev, void *packet, @@ -613,7 +612,6 @@ static int dm_test_eth_async_ping_reply(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_eth_async_ping_reply, UTF_SCAN_FDT); #if IS_ENABLED(CONFIG_IPV6_ROUTER_DISCOVERY) @@ -659,7 +657,6 @@ static int dm_test_validate_ra(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_validate_ra, 0); static int dm_test_process_ra(struct unit_test_state *uts) @@ -698,7 +695,6 @@ static int dm_test_process_ra(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_process_ra, 0); #endif diff --git a/test/dm/extcon.c b/test/dm/extcon.c index 0f77b3d34b7..91358abb5f0 100644 --- a/test/dm/extcon.c +++ b/test/dm/extcon.c @@ -17,5 +17,4 @@ static int dm_test_extcon(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_extcon, UTF_SCAN_FDT); diff --git a/test/dm/ffa.c b/test/dm/ffa.c index 450e3e41562..1937d0eecb0 100644 --- a/test/dm/ffa.c +++ b/test/dm/ffa.c @@ -197,7 +197,6 @@ static int dm_test_ffa_ack(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_ffa_ack, UTF_SCAN_FDT | UTF_CONSOLE_REC); static int dm_test_ffa_nack(struct unit_test_state *uts) @@ -256,5 +255,4 @@ static int dm_test_ffa_nack(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_ffa_nack, UTF_SCAN_FDT | UTF_CONSOLE_REC); diff --git a/test/dm/fpga.c b/test/dm/fpga.c index 28215a3a5bf..fe9f287f8c7 100644 --- a/test/dm/fpga.c +++ b/test/dm/fpga.c @@ -16,5 +16,4 @@ static int dm_test_fpga(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_fpga, UTF_SCAN_FDT); diff --git a/test/dm/hwspinlock.c b/test/dm/hwspinlock.c index d6c786e93dd..58bba52182e 100644 --- a/test/dm/hwspinlock.c +++ b/test/dm/hwspinlock.c @@ -36,5 +36,4 @@ static int dm_test_hwspinlock_base(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_hwspinlock_base, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/dm/i2c.c b/test/dm/i2c.c index 50a2cd0c1be..40f1f26b671 100644 --- a/test/dm/i2c.c +++ b/test/dm/i2c.c @@ -301,7 +301,6 @@ static int dm_test_i2c_addr_offset(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_i2c_addr_offset, UTF_SCAN_PDATA | UTF_SCAN_FDT); static int dm_test_i2c_reg_clrset(struct unit_test_state *uts) diff --git a/test/dm/mdio.c b/test/dm/mdio.c index 325b2122822..6760c98898a 100644 --- a/test/dm/mdio.c +++ b/test/dm/mdio.c @@ -53,5 +53,4 @@ static int dm_test_mdio(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_mdio, UTF_SCAN_FDT); diff --git a/test/dm/mdio_mux.c b/test/dm/mdio_mux.c index 864bc0c3190..866feb26381 100644 --- a/test/dm/mdio_mux.c +++ b/test/dm/mdio_mux.c @@ -76,5 +76,4 @@ static int dm_test_mdio_mux(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_mdio_mux, UTF_SCAN_FDT); diff --git a/test/dm/memory.c b/test/dm/memory.c index 64ceb99f8df..34e64ba0187 100644 --- a/test/dm/memory.c +++ b/test/dm/memory.c @@ -17,5 +17,4 @@ static int dm_test_memory(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_memory, UTF_SCAN_FDT); diff --git a/test/dm/misc.c b/test/dm/misc.c index 1abc9eee045..250885dcf51 100644 --- a/test/dm/misc.c +++ b/test/dm/misc.c @@ -79,5 +79,4 @@ static int dm_test_misc(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_misc, UTF_SCAN_FDT); diff --git a/test/dm/nop.c b/test/dm/nop.c index 7eac16703d7..a6f5f820f6a 100644 --- a/test/dm/nop.c +++ b/test/dm/nop.c @@ -69,5 +69,4 @@ static int dm_test_nop(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_nop, UTF_FLAT_TREE | UTF_SCAN_FDT); diff --git a/test/dm/nvmxip.c b/test/dm/nvmxip.c index 67e19f2a30e..5c455ddbf04 100644 --- a/test/dm/nvmxip.c +++ b/test/dm/nvmxip.c @@ -142,5 +142,4 @@ static int dm_test_nvmxip(struct unit_test_state *uts) return CMD_RET_SUCCESS; } - DM_TEST(dm_test_nvmxip, UTF_SCAN_FDT | UTF_CONSOLE_REC); diff --git a/test/dm/osd.c b/test/dm/osd.c index 5e77d3b5264..5fb27a3d822 100644 --- a/test/dm/osd.c +++ b/test/dm/osd.c @@ -130,7 +130,6 @@ static int dm_test_osd_basics(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_osd_basics, UTF_SCAN_PDATA | UTF_SCAN_FDT); static int dm_test_osd_extended(struct unit_test_state *uts) @@ -214,5 +213,4 @@ static int dm_test_osd_extended(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_osd_extended, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/dm/pci_ep.c b/test/dm/pci_ep.c index 244fefa40bf..068b72a20c0 100644 --- a/test/dm/pci_ep.c +++ b/test/dm/pci_ep.c @@ -59,5 +59,4 @@ static int dm_test_pci_ep_base(struct unit_test_state *uts) ut_asserteq(sandbox_get_pci_ep_irq_count(bus), 10); return 0; } - DM_TEST(dm_test_pci_ep_base, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/dm/pmic.c b/test/dm/pmic.c index 146aedf8f93..70dd18f5df0 100644 --- a/test/dm/pmic.c +++ b/test/dm/pmic.c @@ -52,7 +52,6 @@ static int dm_test_power_pmic_mc34708_get(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_power_pmic_mc34708_get, UTF_SCAN_FDT); /* Test PMIC I/O */ diff --git a/test/dm/qfw.c b/test/dm/qfw.c index a7dfe8f8daa..b6be5c5baa5 100644 --- a/test/dm/qfw.c +++ b/test/dm/qfw.c @@ -23,7 +23,6 @@ static int dm_test_qfw_cpus(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_qfw_cpus, UTF_SCAN_PDATA); static int dm_test_qfw_firmware_list(struct unit_test_state *uts) @@ -37,5 +36,4 @@ static int dm_test_qfw_firmware_list(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_qfw_firmware_list, UTF_SCAN_PDATA); diff --git a/test/dm/reboot-mode.c b/test/dm/reboot-mode.c index c5949092c58..9a3b2bf0a43 100644 --- a/test/dm/reboot-mode.c +++ b/test/dm/reboot-mode.c @@ -39,7 +39,6 @@ static int dm_test_reboot_mode_gpio(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_reboot_mode_gpio, UTF_PROBE_TEST | UTF_SCAN_FDT | UTF_FLAT_TREE); @@ -65,6 +64,5 @@ static int dm_test_reboot_mode_rtc(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_reboot_mode_rtc, UTF_PROBE_TEST | UTF_SCAN_FDT | UTF_FLAT_TREE); diff --git a/test/dm/regmap.c b/test/dm/regmap.c index 436b711b85d..5024b47c7a2 100644 --- a/test/dm/regmap.c +++ b/test/dm/regmap.c @@ -157,7 +157,6 @@ static int dm_test_regmap_getset(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_regmap_getset, UTF_SCAN_PDATA | UTF_SCAN_FDT); /* Read polling test */ diff --git a/test/dm/reset.c b/test/dm/reset.c index 99f46fead6d..dceb6a1dad3 100644 --- a/test/dm/reset.c +++ b/test/dm/reset.c @@ -66,7 +66,6 @@ static int dm_test_reset_base(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_reset_base, UTF_SCAN_FDT); static int dm_test_reset(struct unit_test_state *uts) diff --git a/test/dm/scmi.c b/test/dm/scmi.c index 93e275e0650..5c540fc0583 100644 --- a/test/dm/scmi.c +++ b/test/dm/scmi.c @@ -202,7 +202,6 @@ static int dm_test_scmi_base(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_scmi_base, UTF_SCAN_FDT); static int dm_test_scmi_cmd(struct unit_test_state *uts) @@ -282,7 +281,6 @@ static int dm_test_scmi_cmd(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_scmi_cmd, UTF_SCAN_FDT); static int dm_test_scmi_power_domains(struct unit_test_state *uts) @@ -388,7 +386,6 @@ static int dm_test_scmi_power_domains(struct unit_test_state *uts) return release_sandbox_scmi_test_devices(uts, dev); } - DM_TEST(dm_test_scmi_power_domains, UTF_SCAN_FDT); static int dm_test_scmi_clocks(struct unit_test_state *uts) diff --git a/test/dm/serial.c b/test/dm/serial.c index 456799a9eb8..4acb14f41bc 100644 --- a/test/dm/serial.c +++ b/test/dm/serial.c @@ -87,5 +87,4 @@ static int dm_test_serial(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_serial, UTF_SCAN_FDT); diff --git a/test/dm/sm.c b/test/dm/sm.c index 30985717fed..cf4dab6a722 100644 --- a/test/dm/sm.c +++ b/test/dm/sm.c @@ -60,5 +60,4 @@ static int dm_test_sm(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_sm, UTF_SCAN_FDT); diff --git a/test/dm/soc.c b/test/dm/soc.c index c01b062970d..a6b82e5376d 100644 --- a/test/dm/soc.c +++ b/test/dm/soc.c @@ -115,5 +115,4 @@ static int dm_test_soc(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_soc, UTF_SCAN_FDT); diff --git a/test/dm/sysinfo.c b/test/dm/sysinfo.c index adb2f366d2c..6c0d2d7e4df 100644 --- a/test/dm/sysinfo.c +++ b/test/dm/sysinfo.c @@ -59,5 +59,4 @@ static int dm_test_sysinfo(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_sysinfo, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/dm/tag.c b/test/dm/tag.c index bce8a35acfb..1412171738c 100644 --- a/test/dm/tag.c +++ b/test/dm/tag.c @@ -29,7 +29,6 @@ static int dm_test_tag_ptr(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_tag_ptr, 0); /* @@ -49,7 +48,6 @@ static int dm_test_tag_val(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_tag_val, 0); /* @@ -63,7 +61,6 @@ static int dm_test_tag_inval(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_tag_inval, 0); /* @@ -79,5 +76,4 @@ static int dm_test_tag_del_all(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_tag_del_all, 0); diff --git a/test/dm/tee.c b/test/dm/tee.c index fb890c1bdd4..b56c982eb75 100644 --- a/test/dm/tee.c +++ b/test/dm/tee.c @@ -215,5 +215,4 @@ out: return rc; } - DM_TEST(dm_test_tee, UTF_SCAN_FDT); diff --git a/test/dm/test-fdt.c b/test/dm/test-fdt.c index d9c49312f5e..af8cd617108 100644 --- a/test/dm/test-fdt.c +++ b/test/dm/test-fdt.c @@ -1224,5 +1224,4 @@ static int dm_test_read_resource(struct unit_test_state *uts) return 0; } - DM_TEST(dm_test_read_resource, UTF_SCAN_PDATA | UTF_SCAN_FDT); diff --git a/test/env/hashtable.c b/test/env/hashtable.c index ccdf0138c4b..16e49358888 100644 --- a/test/env/hashtable.c +++ b/test/env/hashtable.c @@ -101,7 +101,6 @@ static int env_test_htab_fill(struct unit_test_state *uts) hdestroy_r(&htab); return 0; } - ENV_TEST(env_test_htab_fill, 0); /* Fill the hashtable up halfway an repeateadly delete/create elements @@ -122,5 +121,4 @@ static int env_test_htab_deletes(struct unit_test_state *uts) hdestroy_r(&htab); return 0; } - ENV_TEST(env_test_htab_deletes, 0); diff --git a/test/lib/asn1.c b/test/lib/asn1.c index 4842b7058ac..f0c7819e408 100644 --- a/test/lib/asn1.c +++ b/test/lib/asn1.c @@ -135,7 +135,6 @@ static int lib_asn1_x509(struct unit_test_state *uts) return CMD_RET_SUCCESS; } - LIB_TEST(lib_asn1_x509, 0); #endif /* CONFIG_X509_CERTIFICATE_PARSER */ @@ -324,7 +323,6 @@ static int lib_asn1_pkcs7(struct unit_test_state *uts) return CMD_RET_SUCCESS; } - LIB_TEST(lib_asn1_pkcs7, 0); #endif /* CONFIG_PKCS7_MESSAGE_PARSER */ @@ -386,6 +384,5 @@ static int lib_asn1_pkey(struct unit_test_state *uts) return CMD_RET_SUCCESS; } - LIB_TEST(lib_asn1_pkey, 0); #endif /* CONFIG_RSA_PUBLIC_KEY_PARSER */ diff --git a/test/lib/efi_device_path.c b/test/lib/efi_device_path.c index 290c8768fa4..5cc001e209e 100644 --- a/test/lib/efi_device_path.c +++ b/test/lib/efi_device_path.c @@ -45,5 +45,4 @@ static int lib_test_efi_dp_check_length(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_test_efi_dp_check_length, 0); diff --git a/test/lib/efi_image_region.c b/test/lib/efi_image_region.c index 3ca49dc4a2e..2102539ea70 100644 --- a/test/lib/efi_image_region.c +++ b/test/lib/efi_image_region.c @@ -65,7 +65,6 @@ static int lib_test_efi_image_region_add(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_test_efi_image_region_add, 0); static int lib_test_efi_image_region_sort(struct unit_test_state *uts) @@ -158,5 +157,4 @@ static int lib_test_efi_image_region_sort(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_test_efi_image_region_sort, 0); diff --git a/test/lib/hexdump.c b/test/lib/hexdump.c index d531a830398..7b4592d175f 100644 --- a/test/lib/hexdump.c +++ b/test/lib/hexdump.c @@ -31,7 +31,6 @@ static int lib_test_hex_to_bin(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_test_hex_to_bin, 0); static int lib_test_hex2bin(struct unit_test_state *uts) @@ -61,7 +60,6 @@ static int lib_test_hex2bin(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_test_hex2bin, 0); static int lib_test_bin2hex(struct unit_test_state *uts) @@ -91,5 +89,4 @@ static int lib_test_bin2hex(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_test_bin2hex, 0); diff --git a/test/lib/lmb.c b/test/lib/lmb.c index 4b5b6e5e209..3c66138f732 100644 --- a/test/lib/lmb.c +++ b/test/lib/lmb.c @@ -360,7 +360,6 @@ static int lib_test_lmb_noreserved(struct unit_test_state *uts) /* simulate 512 MiB RAM beginning at 1.5GiB */ return test_noreserved(uts, 0xE0000000, 4, 1); } - LIB_TEST(lib_test_lmb_noreserved, 0); static int lib_test_lmb_unaligned_size(struct unit_test_state *uts) diff --git a/test/lib/rsa.c b/test/lib/rsa.c index 40f70010c78..129d03ab7dd 100644 --- a/test/lib/rsa.c +++ b/test/lib/rsa.c @@ -158,7 +158,6 @@ static int lib_rsa_verify_valid(struct unit_test_state *uts) return CMD_RET_SUCCESS; } - LIB_TEST(lib_rsa_verify_valid, 0); /** @@ -200,6 +199,5 @@ static int lib_rsa_verify_invalid(struct unit_test_state *uts) return CMD_RET_SUCCESS; } - LIB_TEST(lib_rsa_verify_invalid, 0); #endif /* RSA_VERIFY_WITH_PKEY */ diff --git a/test/lib/sscanf.c b/test/lib/sscanf.c index 9fe5521749f..3a2ec8ffa5f 100644 --- a/test/lib/sscanf.c +++ b/test/lib/sscanf.c @@ -169,5 +169,4 @@ static int lib_sscanf(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_sscanf, 0); diff --git a/test/lib/string.c b/test/lib/string.c index d08dbca9291..8d22f3fd68f 100644 --- a/test/lib/string.c +++ b/test/lib/string.c @@ -93,7 +93,6 @@ static int lib_memset(struct unit_test_state *uts) } return 0; } - LIB_TEST(lib_memset, 0); /** @@ -157,7 +156,6 @@ static int lib_memcpy(struct unit_test_state *uts) } return 0; } - LIB_TEST(lib_memcpy, 0); /** @@ -192,7 +190,6 @@ static int lib_memmove(struct unit_test_state *uts) } return 0; } - LIB_TEST(lib_memmove, 0); /** lib_memdup() - unit test for memdup() */ diff --git a/test/lib/test_aes.c b/test/lib/test_aes.c index cfd9d8ca5a9..6d9068c4f79 100644 --- a/test/lib/test_aes.c +++ b/test/lib/test_aes.c @@ -163,5 +163,4 @@ static int lib_test_aes(struct unit_test_state *uts) return ret; } - LIB_TEST(lib_test_aes, 0); diff --git a/test/lib/test_crc8.c b/test/lib/test_crc8.c index 0dac97bc5bf..52be2dc06c4 100644 --- a/test/lib/test_crc8.c +++ b/test/lib/test_crc8.c @@ -25,5 +25,4 @@ static int lib_crc8(struct unit_test_state *uts) { return 0; } - LIB_TEST(lib_crc8, 0); diff --git a/test/lib/test_crypt.c b/test/lib/test_crypt.c index dcdadd992c1..b6dd5f07b86 100644 --- a/test/lib/test_crypt.c +++ b/test/lib/test_crypt.c @@ -59,5 +59,4 @@ static int lib_crypt(struct unit_test_state *uts) return CMD_RET_SUCCESS; } - LIB_TEST(lib_crypt, 0); diff --git a/test/lib/test_errno_str.c b/test/lib/test_errno_str.c index 67f76442b27..967ecfd56f1 100644 --- a/test/lib/test_errno_str.c +++ b/test/lib/test_errno_str.c @@ -41,5 +41,4 @@ static int lib_errno_str(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_errno_str, 0); diff --git a/test/lib/test_print.c b/test/lib/test_print.c index c7fc50a1de1..e356afc22ba 100644 --- a/test/lib/test_print.c +++ b/test/lib/test_print.c @@ -41,7 +41,6 @@ static int lib_test_print_freq(struct unit_test_state *uts) ut_assertok(test_print_freq(uts, 54321987654321, "54321.99 GHz;")); return 0; } - LIB_TEST(lib_test_print_freq, 0); static int test_print_size(struct unit_test_state *uts, @@ -74,5 +73,4 @@ static int lib_test_print_size(struct unit_test_state *uts) ut_assertok(test_print_size(uts, 54321987654321, "49.4 TiB;")); return 0; } - LIB_TEST(lib_test_print_size, 0); diff --git a/test/lib/uuid.c b/test/lib/uuid.c index 0914f2c47e7..8fe65dbf78b 100644 --- a/test/lib/uuid.c +++ b/test/lib/uuid.c @@ -36,5 +36,4 @@ static int lib_test_uuid_to_le(struct unit_test_state *uts) return 0; } - LIB_TEST(lib_test_uuid_to_le, 0); -- cgit v1.3.1 From 9b99762eff5eac971cd1ae561e443252afb7b985 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 22 Aug 2024 07:57:50 -0600 Subject: test: Rename UTF_CONSOLE_REC to UTF_CONSOLE The _REC suffix doesn't add much. Really what we want to know is whether the test uses the console, so rename this flag. Signed-off-by: Simon Glass Reviewed-by: Mattijs Korpershoek --- doc/develop/tests_writing.rst | 4 ++-- include/dm/test.h | 2 +- include/test/test.h | 2 +- test/boot/bootflow.c | 4 ++-- test/boot/upl.c | 6 +++--- test/cmd/addrmap.c | 2 +- test/cmd/armffa.c | 2 +- test/cmd/bdinfo.c | 8 ++++---- test/cmd/exit.c | 2 +- test/cmd/fdt.c | 38 +++++++++++++++++++------------------- test/cmd/font.c | 2 +- test/cmd/history.c | 2 +- test/cmd/loadm.c | 4 ++-- test/cmd/mbr.c | 4 ++-- test/cmd/mem_search.c | 18 +++++++++--------- test/cmd/pci_mps.c | 2 +- test/cmd/pwm.c | 2 +- test/cmd/rw.c | 2 +- test/cmd/seama.c | 6 +++--- test/cmd/setexpr.c | 22 +++++++++++----------- test/cmd/temperature.c | 2 +- test/dm/ffa.c | 4 ++-- test/dm/nvmxip.c | 2 +- test/dm/rkmtd.c | 2 +- test/dm/rng.c | 2 +- test/env/cmd_ut_env.c | 2 +- test/log/log_filter.c | 4 ++-- test/log/log_test.c | 32 ++++++++++++++++---------------- test/print_ut.c | 6 +++--- test/test-main.c | 2 +- 30 files changed, 96 insertions(+), 96 deletions(-) (limited to 'doc') diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst index c277c8dd44f..404d158ec40 100644 --- a/doc/develop/tests_writing.rst +++ b/doc/develop/tests_writing.rst @@ -167,7 +167,7 @@ There is no exactly equivalent C test, but here is a similar one that tests 'ms' return 0; } - MEM_TEST(mem_test_ms_b, UTF_CONSOLE_REC); + MEM_TEST(mem_test_ms_b, UTF_CONSOLE); This runs the command directly in U-Boot, then checks the console output, also directly in U-Boot. If run by itself this takes 100ms. For 1000 runs it takes @@ -266,7 +266,7 @@ with the suite. For example, to add a new mem_search test:: return 0; } - MEM_TEST(mem_test_ms_new_thing, UTF_CONSOLE_REC); + MEM_TEST(mem_test_ms_new_thing, UTF_CONSOLE); Note that the MEM_TEST() macros is defined at the top of the file. diff --git a/include/dm/test.h b/include/dm/test.h index 61776c8dda1..3cbf2c740d4 100644 --- a/include/dm/test.h +++ b/include/dm/test.h @@ -143,7 +143,7 @@ extern struct unit_test_state global_dm_test_state; /* Declare a new driver model test */ #define DM_TEST(_name, _flags) \ - UNIT_TEST(_name, UTF_DM | UTF_CONSOLE_REC | (_flags), dm_test) + UNIT_TEST(_name, UTF_DM | UTF_CONSOLE | (_flags), dm_test) /* * struct sandbox_sdl_plat - Platform data for the SDL video driver diff --git a/include/test/test.h b/include/test/test.h index 9ad73daf7f8..92eec2eb6f9 100644 --- a/include/test/test.h +++ b/include/test/test.h @@ -61,7 +61,7 @@ enum ut_flags { UTF_SCAN_FDT = BIT(2), /* scan device tree */ UTF_FLAT_TREE = BIT(3), /* test needs flat DT */ UTF_LIVE_TREE = BIT(4), /* needs live device tree */ - UTF_CONSOLE_REC = BIT(5), /* needs console recording */ + UTF_CONSOLE = BIT(5), /* needs console recording */ /* do extra driver model init and uninit */ UTF_DM = BIT(6), UTF_OTHER_FDT = BIT(7), /* read in other device tree */ diff --git a/test/boot/bootflow.c b/test/boot/bootflow.c index a97f4f877e9..f53e20e4c86 100644 --- a/test/boot/bootflow.c +++ b/test/boot/bootflow.c @@ -721,7 +721,7 @@ static int bootflow_scan_menu(struct unit_test_state *uts) return 0; } -BOOTSTD_TEST(bootflow_scan_menu, UTF_DM | UTF_SCAN_FDT | UTF_CONSOLE_REC); +BOOTSTD_TEST(bootflow_scan_menu, UTF_DM | UTF_SCAN_FDT | UTF_CONSOLE); /* Check 'bootflow scan -mb' to select and boot a bootflow using a menu */ static int bootflow_scan_menu_boot(struct unit_test_state *uts) @@ -767,7 +767,7 @@ static int bootflow_scan_menu_boot(struct unit_test_state *uts) return 0; } -BOOTSTD_TEST(bootflow_scan_menu_boot, UTF_DM | UTF_SCAN_FDT | UTF_CONSOLE_REC); +BOOTSTD_TEST(bootflow_scan_menu_boot, UTF_DM | UTF_SCAN_FDT | UTF_CONSOLE); /* Check searching for a single bootdev using the hunters */ static int bootflow_cmd_hunt_single(struct unit_test_state *uts) diff --git a/test/boot/upl.c b/test/boot/upl.c index 6ef29a98f05..99f02b7951b 100644 --- a/test/boot/upl.c +++ b/test/boot/upl.c @@ -374,7 +374,7 @@ static int upl_test_info(struct unit_test_state *uts) return 0; } -UPL_TEST(upl_test_info, UTF_CONSOLE_REC); +UPL_TEST(upl_test_info, UTF_CONSOLE); /* Test 'upl read' and 'upl_write' commands */ static int upl_test_read_write(struct unit_test_state *uts) @@ -396,7 +396,7 @@ static int upl_test_read_write(struct unit_test_state *uts) return 0; } -UPL_TEST(upl_test_read_write, UTF_CONSOLE_REC); +UPL_TEST(upl_test_read_write, UTF_CONSOLE); /* Test UPL passthrough */ static int upl_test_info_norun(struct unit_test_state *uts) @@ -425,7 +425,7 @@ static int upl_test_info_norun(struct unit_test_state *uts) return 0; } -UPL_TEST(upl_test_info_norun, UTF_CONSOLE_REC | UTF_MANUAL); +UPL_TEST(upl_test_info_norun, UTF_CONSOLE | UTF_MANUAL); int do_ut_upl(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/test/cmd/addrmap.c b/test/cmd/addrmap.c index fb4ec316781..abeb467aede 100644 --- a/test/cmd/addrmap.c +++ b/test/cmd/addrmap.c @@ -24,7 +24,7 @@ static int addrmap_test_basic(struct unit_test_state *uts) return 0; } -ADDRMAP_TEST(addrmap_test_basic, UTF_CONSOLE_REC); +ADDRMAP_TEST(addrmap_test_basic, UTF_CONSOLE); int do_ut_addrmap(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/test/cmd/armffa.c b/test/cmd/armffa.c index d7b076cfe7c..fd578f3087f 100644 --- a/test/cmd/armffa.c +++ b/test/cmd/armffa.c @@ -28,4 +28,4 @@ static int dm_test_armffa_cmd(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_armffa_cmd, UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_armffa_cmd, UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/cmd/bdinfo.c b/test/cmd/bdinfo.c index cb88d2ee11b..1d038bec29c 100644 --- a/test/cmd/bdinfo.c +++ b/test/cmd/bdinfo.c @@ -244,7 +244,7 @@ static int bdinfo_test_full(struct unit_test_state *uts) return 0; } -BDINFO_TEST(bdinfo_test_full, UTF_CONSOLE_REC); +BDINFO_TEST(bdinfo_test_full, UTF_CONSOLE); static int bdinfo_test_help(struct unit_test_state *uts) { @@ -265,7 +265,7 @@ static int bdinfo_test_help(struct unit_test_state *uts) return 0; } -BDINFO_TEST(bdinfo_test_help, UTF_CONSOLE_REC); +BDINFO_TEST(bdinfo_test_help, UTF_CONSOLE); static int bdinfo_test_memory(struct unit_test_state *uts) { @@ -280,7 +280,7 @@ static int bdinfo_test_memory(struct unit_test_state *uts) return 0; } -BDINFO_TEST(bdinfo_test_memory, UTF_CONSOLE_REC); +BDINFO_TEST(bdinfo_test_memory, UTF_CONSOLE); static int bdinfo_test_eth(struct unit_test_state *uts) { @@ -295,7 +295,7 @@ static int bdinfo_test_eth(struct unit_test_state *uts) return 0; } -BDINFO_TEST(bdinfo_test_eth, UTF_CONSOLE_REC); +BDINFO_TEST(bdinfo_test_eth, UTF_CONSOLE); int do_ut_bdinfo(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/test/cmd/exit.c b/test/cmd/exit.c index e7e454c7631..d416607d610 100644 --- a/test/cmd/exit.c +++ b/test/cmd/exit.c @@ -121,7 +121,7 @@ static int cmd_exit_test(struct unit_test_state *uts) return 0; } -EXIT_TEST(cmd_exit_test, UTF_CONSOLE_REC); +EXIT_TEST(cmd_exit_test, UTF_CONSOLE); int do_ut_exit(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/test/cmd/fdt.c b/test/cmd/fdt.c index 4f935d053c6..721345f0288 100644 --- a/test/cmd/fdt.c +++ b/test/cmd/fdt.c @@ -213,7 +213,7 @@ static int fdt_test_addr(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_addr, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_addr, UTF_CONSOLE); /* Test 'fdt addr' resizing an fdt */ static int fdt_test_addr_resize(struct unit_test_state *uts) @@ -247,7 +247,7 @@ static int fdt_test_addr_resize(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_addr_resize, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_addr_resize, UTF_CONSOLE); static int fdt_test_move(struct unit_test_state *uts) { @@ -281,7 +281,7 @@ static int fdt_test_move(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_move, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_move, UTF_CONSOLE); static int fdt_test_resize(struct unit_test_state *uts) { @@ -305,7 +305,7 @@ static int fdt_test_resize(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_resize, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_resize, UTF_CONSOLE); static int fdt_test_print_list_common(struct unit_test_state *uts, const char *opc, const char *node) @@ -442,13 +442,13 @@ static int fdt_test_print(struct unit_test_state *uts) { return fdt_test_print_list(uts, true); } -FDT_TEST(fdt_test_print, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_print, UTF_CONSOLE); static int fdt_test_list(struct unit_test_state *uts) { return fdt_test_print_list(uts, false); } -FDT_TEST(fdt_test_list, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_list, UTF_CONSOLE); /* Test 'fdt get value' reading an fdt */ static int fdt_test_get_value_string(struct unit_test_state *uts, @@ -554,7 +554,7 @@ static int fdt_test_get_value(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_get_value, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_get_value, UTF_CONSOLE); static int fdt_test_get_name(struct unit_test_state *uts) { @@ -633,7 +633,7 @@ static int fdt_test_get_name(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_get_name, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_get_name, UTF_CONSOLE); static int fdt_test_get_addr_common(struct unit_test_state *uts, char *fdt, const char *path, const char *prop) @@ -700,7 +700,7 @@ static int fdt_test_get_addr(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_get_addr, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_get_addr, UTF_CONSOLE); static int fdt_test_get_size_common(struct unit_test_state *uts, const char *path, const char *prop, @@ -787,7 +787,7 @@ static int fdt_test_get_size(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_get_size, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_get_size, UTF_CONSOLE); static int fdt_test_set_single(struct unit_test_state *uts, const char *path, const char *prop, @@ -929,7 +929,7 @@ static int fdt_test_set(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_set, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_set, UTF_CONSOLE); static int fdt_test_mknode(struct unit_test_state *uts) { @@ -997,7 +997,7 @@ static int fdt_test_mknode(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_mknode, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_mknode, UTF_CONSOLE); static int fdt_test_rm(struct unit_test_state *uts) { @@ -1081,7 +1081,7 @@ static int fdt_test_rm(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_rm, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_rm, UTF_CONSOLE); static int fdt_test_bootcpu(struct unit_test_state *uts) { @@ -1114,7 +1114,7 @@ static int fdt_test_bootcpu(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_bootcpu, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_bootcpu, UTF_CONSOLE); static int fdt_test_header_get(struct unit_test_state *uts, const char *field, const unsigned long val) @@ -1173,7 +1173,7 @@ static int fdt_test_header(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_header, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_header, UTF_CONSOLE); static int fdt_test_memory_cells(struct unit_test_state *uts, const unsigned int cells) @@ -1256,7 +1256,7 @@ static int fdt_test_memory(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_memory, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_memory, UTF_CONSOLE); static int fdt_test_rsvmem(struct unit_test_state *uts) { @@ -1319,7 +1319,7 @@ static int fdt_test_rsvmem(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_rsvmem, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_rsvmem, UTF_CONSOLE); static int fdt_test_chosen(struct unit_test_state *uts) { @@ -1375,7 +1375,7 @@ static int fdt_test_chosen(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_chosen, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_chosen, UTF_CONSOLE); static int fdt_test_apply(struct unit_test_state *uts) { @@ -1527,7 +1527,7 @@ static int fdt_test_apply(struct unit_test_state *uts) return 0; } -FDT_TEST(fdt_test_apply, UTF_CONSOLE_REC); +FDT_TEST(fdt_test_apply, UTF_CONSOLE); int do_ut_fdt(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/test/cmd/font.c b/test/cmd/font.c index 3ea262bb703..08600dfe2eb 100644 --- a/test/cmd/font.c +++ b/test/cmd/font.c @@ -69,7 +69,7 @@ static int font_test_base(struct unit_test_state *uts) return 0; } -FONT_TEST(font_test_base, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE_REC | +FONT_TEST(font_test_base, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE | UTF_DM); int do_ut_font(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/test/cmd/history.c b/test/cmd/history.c index 9fec4a811f4..6d9d2288483 100644 --- a/test/cmd/history.c +++ b/test/cmd/history.c @@ -45,4 +45,4 @@ static int lib_test_history(struct unit_test_state *uts) return 0; } -LIB_TEST(lib_test_history, UTF_CONSOLE_REC); +LIB_TEST(lib_test_history, UTF_CONSOLE); diff --git a/test/cmd/loadm.c b/test/cmd/loadm.c index 0b6390ebc53..29ae8339183 100644 --- a/test/cmd/loadm.c +++ b/test/cmd/loadm.c @@ -41,7 +41,7 @@ static int loadm_test_params(struct unit_test_state *uts) return 0; } -LOADM_TEST(loadm_test_params, UTF_CONSOLE_REC); +LOADM_TEST(loadm_test_params, UTF_CONSOLE); static int loadm_test_load (struct unit_test_state *uts) { @@ -59,7 +59,7 @@ static int loadm_test_load (struct unit_test_state *uts) return 0; } -LOADM_TEST(loadm_test_load, UTF_CONSOLE_REC); +LOADM_TEST(loadm_test_load, UTF_CONSOLE); int do_ut_loadm(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/test/cmd/mbr.c b/test/cmd/mbr.c index e4b694b728f..0c3698afb0b 100644 --- a/test/cmd/mbr.c +++ b/test/cmd/mbr.c @@ -465,7 +465,7 @@ static int mbr_test_run(struct unit_test_state *uts) } /* Declare mbr test */ -UNIT_TEST(mbr_test_run, UTF_CONSOLE_REC, mbr_test); +UNIT_TEST(mbr_test_run, UTF_CONSOLE, mbr_test); int do_ut_mbr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { @@ -479,4 +479,4 @@ static int dm_test_cmd_mbr(struct unit_test_state *uts) { return mbr_test_run(uts); } -DM_TEST(dm_test_cmd_mbr, UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_cmd_mbr, UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/cmd/mem_search.c b/test/cmd/mem_search.c index 9ad0c18152f..1387baea032 100644 --- a/test/cmd/mem_search.c +++ b/test/cmd/mem_search.c @@ -43,7 +43,7 @@ static int mem_test_ms_b(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_b, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_b, UTF_CONSOLE); /* Test 'ms' command with 16-bit values */ static int mem_test_ms_w(struct unit_test_state *uts) @@ -68,7 +68,7 @@ static int mem_test_ms_w(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_w, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_w, UTF_CONSOLE); /* Test 'ms' command with 32-bit values */ static int mem_test_ms_l(struct unit_test_state *uts) @@ -102,7 +102,7 @@ static int mem_test_ms_l(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_l, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_l, UTF_CONSOLE); /* Test 'ms' command with continuation */ static int mem_test_ms_cont(struct unit_test_state *uts) @@ -152,7 +152,7 @@ static int mem_test_ms_cont(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_cont, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_cont, UTF_CONSOLE); /* Test that an 'ms' command with continuation stops at the end of the range */ static int mem_test_ms_cont_end(struct unit_test_state *uts) @@ -196,7 +196,7 @@ static int mem_test_ms_cont_end(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_cont_end, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_cont_end, UTF_CONSOLE); /* Test 'ms' command with multiple values */ static int mem_test_ms_mult(struct unit_test_state *uts) @@ -225,7 +225,7 @@ static int mem_test_ms_mult(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_mult, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_mult, UTF_CONSOLE); /* Test 'ms' command with string */ static int mem_test_ms_s(struct unit_test_state *uts) @@ -268,7 +268,7 @@ static int mem_test_ms_s(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_s, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_s, UTF_CONSOLE); /* Test 'ms' command with limit */ static int mem_test_ms_limit(struct unit_test_state *uts) @@ -297,7 +297,7 @@ static int mem_test_ms_limit(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_limit, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_limit, UTF_CONSOLE); /* Test 'ms' command in quiet mode */ static int mem_test_ms_quiet(struct unit_test_state *uts) @@ -321,4 +321,4 @@ static int mem_test_ms_quiet(struct unit_test_state *uts) return 0; } -MEM_TEST(mem_test_ms_quiet, UTF_CONSOLE_REC); +MEM_TEST(mem_test_ms_quiet, UTF_CONSOLE); diff --git a/test/cmd/pci_mps.c b/test/cmd/pci_mps.c index 755a0649770..a265105600c 100644 --- a/test/cmd/pci_mps.c +++ b/test/cmd/pci_mps.c @@ -27,7 +27,7 @@ static int test_pci_mps_safe(struct unit_test_state *uts) return 0; } -PCI_MPS_TEST(test_pci_mps_safe, UTF_CONSOLE_REC); +PCI_MPS_TEST(test_pci_mps_safe, UTF_CONSOLE); int do_ut_pci_mps(struct cmd_tbl *cmdtp, int flag, int argc, char * const argv[]) diff --git a/test/cmd/pwm.c b/test/cmd/pwm.c index 44f52e15cbb..f8de03fd6d1 100644 --- a/test/cmd/pwm.c +++ b/test/cmd/pwm.c @@ -71,4 +71,4 @@ static int dm_test_pwm_cmd(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_pwm_cmd, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_pwm_cmd, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/cmd/rw.c b/test/cmd/rw.c index eeda87b53ed..1086dcd2914 100644 --- a/test/cmd/rw.c +++ b/test/cmd/rw.c @@ -99,4 +99,4 @@ static int dm_test_read_write(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_read_write, UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_read_write, UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/cmd/seama.c b/test/cmd/seama.c index 235135118cf..802563e4f71 100644 --- a/test/cmd/seama.c +++ b/test/cmd/seama.c @@ -26,7 +26,7 @@ static int seama_test_noargs(struct unit_test_state *uts) ut_assert_console_end(); return 0; } -SEAMA_TEST(seama_test_noargs, UTF_CONSOLE_REC); +SEAMA_TEST(seama_test_noargs, UTF_CONSOLE); static int seama_test_addr(struct unit_test_state *uts) { @@ -42,7 +42,7 @@ static int seama_test_addr(struct unit_test_state *uts) ut_assert_console_end(); return 0; } -SEAMA_TEST(seama_test_addr, UTF_CONSOLE_REC); +SEAMA_TEST(seama_test_addr, UTF_CONSOLE); static int seama_test_index(struct unit_test_state *uts) { @@ -58,7 +58,7 @@ static int seama_test_index(struct unit_test_state *uts) ut_assert_console_end(); return 0; } -SEAMA_TEST(seama_test_index, UTF_CONSOLE_REC); +SEAMA_TEST(seama_test_index, UTF_CONSOLE); int do_ut_seama(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/test/cmd/setexpr.c b/test/cmd/setexpr.c index a4086c9451c..dcd0e3726e4 100644 --- a/test/cmd/setexpr.c +++ b/test/cmd/setexpr.c @@ -63,7 +63,7 @@ static int setexpr_test_int(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_int, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_int, UTF_CONSOLE); /* Test 'setexpr' command with + operator */ static int setexpr_test_plus(struct unit_test_state *uts) @@ -105,7 +105,7 @@ static int setexpr_test_plus(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_plus, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_plus, UTF_CONSOLE); /* Test 'setexpr' command with other operators */ static int setexpr_test_oper(struct unit_test_state *uts) @@ -148,7 +148,7 @@ static int setexpr_test_oper(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_oper, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_oper, UTF_CONSOLE); /* Test 'setexpr' command with regex */ static int setexpr_test_regex(struct unit_test_state *uts) @@ -192,7 +192,7 @@ static int setexpr_test_regex(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_regex, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_regex, UTF_CONSOLE); /* Test 'setexpr' command with regex replacement that expands the string */ static int setexpr_test_regex_inc(struct unit_test_state *uts) @@ -209,7 +209,7 @@ static int setexpr_test_regex_inc(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_regex_inc, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_regex_inc, UTF_CONSOLE); /* Test setexpr_regex_sub() directly to check buffer usage */ static int setexpr_test_sub(struct unit_test_state *uts) @@ -249,7 +249,7 @@ static int setexpr_test_sub(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_sub, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_sub, UTF_CONSOLE); /* Test setexpr_regex_sub() with back references */ static int setexpr_test_backref(struct unit_test_state *uts) @@ -292,7 +292,7 @@ static int setexpr_test_backref(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_backref, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_backref, UTF_CONSOLE); /* Test 'setexpr' command with setting strings */ static int setexpr_test_str(struct unit_test_state *uts) @@ -327,7 +327,7 @@ static int setexpr_test_str(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_str, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_str, UTF_CONSOLE); /* Test 'setexpr' command with concatenating strings */ static int setexpr_test_str_oper(struct unit_test_state *uts) @@ -376,7 +376,7 @@ static int setexpr_test_str_oper(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_str_oper, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_str_oper, UTF_CONSOLE); /* Test 'setexpr' command with a string that is too long */ static int setexpr_test_str_long(struct unit_test_state *uts) @@ -396,7 +396,7 @@ static int setexpr_test_str_long(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_str_long, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_str_long, UTF_CONSOLE); #ifdef CONFIG_CMD_SETEXPR_FMT /* Test 'setexpr' command with simply setting integers */ @@ -478,7 +478,7 @@ static int setexpr_test_fmt(struct unit_test_state *uts) return 0; } -SETEXPR_TEST(setexpr_test_fmt, UTF_CONSOLE_REC); +SETEXPR_TEST(setexpr_test_fmt, UTF_CONSOLE); #endif int do_ut_setexpr(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) diff --git a/test/cmd/temperature.c b/test/cmd/temperature.c index b86c7d44b33..193fa6324ea 100644 --- a/test/cmd/temperature.c +++ b/test/cmd/temperature.c @@ -34,4 +34,4 @@ static int dm_test_cmd_temperature(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_cmd_temperature, UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_cmd_temperature, UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/dm/ffa.c b/test/dm/ffa.c index 1937d0eecb0..593b7177fce 100644 --- a/test/dm/ffa.c +++ b/test/dm/ffa.c @@ -197,7 +197,7 @@ static int dm_test_ffa_ack(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ffa_ack, UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_ffa_ack, UTF_SCAN_FDT | UTF_CONSOLE); static int dm_test_ffa_nack(struct unit_test_state *uts) { @@ -255,4 +255,4 @@ static int dm_test_ffa_nack(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_ffa_nack, UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_ffa_nack, UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/dm/nvmxip.c b/test/dm/nvmxip.c index 5c455ddbf04..a702d0aec3f 100644 --- a/test/dm/nvmxip.c +++ b/test/dm/nvmxip.c @@ -142,4 +142,4 @@ static int dm_test_nvmxip(struct unit_test_state *uts) return CMD_RET_SUCCESS; } -DM_TEST(dm_test_nvmxip, UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_nvmxip, UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/dm/rkmtd.c b/test/dm/rkmtd.c index e77c43b247a..d1ca5d1acac 100644 --- a/test/dm/rkmtd.c +++ b/test/dm/rkmtd.c @@ -196,4 +196,4 @@ static int dm_test_rkmtd_cmd(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_rkmtd_cmd, UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_rkmtd_cmd, UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/dm/rng.c b/test/dm/rng.c index d249e0218fe..8ed4e1373ea 100644 --- a/test/dm/rng.c +++ b/test/dm/rng.c @@ -52,4 +52,4 @@ static int dm_test_rng_cmd(struct unit_test_state *uts) return 0; } -DM_TEST(dm_test_rng_cmd, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE_REC); +DM_TEST(dm_test_rng_cmd, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE); diff --git a/test/env/cmd_ut_env.c b/test/env/cmd_ut_env.c index 238cf310367..4af05764fb8 100644 --- a/test/env/cmd_ut_env.c +++ b/test/env/cmd_ut_env.c @@ -34,7 +34,7 @@ static int env_test_env_cmd(struct unit_test_state *uts) return 0; } -ENV_TEST(env_test_env_cmd, UT_TESTF_CONSOLE_REC); +ENV_TEST(env_test_env_cmd, UTF_CONSOLE); int do_ut_env(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { diff --git a/test/log/log_filter.c b/test/log/log_filter.c index 149eef05426..e175f409c9b 100644 --- a/test/log/log_filter.c +++ b/test/log/log_filter.c @@ -24,7 +24,7 @@ static int log_test_filter_invalid(struct unit_test_state *uts) return 0; } -LOG_TEST_FLAGS(log_test_filter_invalid, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_filter_invalid, UTF_CONSOLE); /* Test adding and removing filters */ static int log_test_filter(struct unit_test_state *uts) @@ -105,4 +105,4 @@ static int log_test_filter(struct unit_test_state *uts) return 0; } -LOG_TEST_FLAGS(log_test_filter, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_filter, UTF_CONSOLE); diff --git a/test/log/log_test.c b/test/log/log_test.c index d2c062e1323..357a3b57feb 100644 --- a/test/log/log_test.c +++ b/test/log/log_test.c @@ -121,7 +121,7 @@ int log_test_cat_allow(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt)); return 0; } -LOG_TEST_FLAGS(log_test_cat_allow, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_cat_allow, UTF_CONSOLE); /* Check a category filter that should block log entries */ int log_test_cat_deny_implicit(struct unit_test_state *uts) @@ -141,7 +141,7 @@ int log_test_cat_deny_implicit(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt)); return 0; } -LOG_TEST_FLAGS(log_test_cat_deny_implicit, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_cat_deny_implicit, UTF_CONSOLE); /* Check passing and failing file filters */ int log_test_file(struct unit_test_state *uts) @@ -162,7 +162,7 @@ int log_test_file(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt)); return 0; } -LOG_TEST_FLAGS(log_test_file, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_file, UTF_CONSOLE); /* Check a passing file filter (second in list) */ int log_test_file_second(struct unit_test_state *uts) @@ -179,7 +179,7 @@ int log_test_file_second(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt)); return 0; } -LOG_TEST_FLAGS(log_test_file_second, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_file_second, UTF_CONSOLE); /* Check a passing file filter (middle of list) */ int log_test_file_mid(struct unit_test_state *uts) @@ -197,7 +197,7 @@ int log_test_file_mid(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt)); return 0; } -LOG_TEST_FLAGS(log_test_file_mid, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_file_mid, UTF_CONSOLE); /* Check a log level filter */ int log_test_level(struct unit_test_state *uts) @@ -215,7 +215,7 @@ int log_test_level(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt)); return 0; } -LOG_TEST_FLAGS(log_test_level, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_level, UTF_CONSOLE); /* Check two filters, one of which passes everything */ int log_test_double(struct unit_test_state *uts) @@ -235,7 +235,7 @@ int log_test_double(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt2)); return 0; } -LOG_TEST_FLAGS(log_test_double, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_double, UTF_CONSOLE); /* Check three filters, which together pass everything */ int log_test_triple(struct unit_test_state *uts) @@ -258,7 +258,7 @@ int log_test_triple(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt3)); return 0; } -LOG_TEST_FLAGS(log_test_triple, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_triple, UTF_CONSOLE); int do_log_test_helpers(struct unit_test_state *uts) { @@ -292,7 +292,7 @@ int log_test_helpers(struct unit_test_state *uts) gd->log_fmt = log_get_default_format(); return ret; } -LOG_TEST_FLAGS(log_test_helpers, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_helpers, UTF_CONSOLE); int do_log_test_disable(struct unit_test_state *uts) { @@ -319,7 +319,7 @@ int log_test_disable(struct unit_test_state *uts) gd->log_fmt = log_get_default_format(); return ret; } -LOG_TEST_FLAGS(log_test_disable, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_disable, UTF_CONSOLE); /* Check denying based on category */ int log_test_cat_deny(struct unit_test_state *uts) @@ -343,7 +343,7 @@ int log_test_cat_deny(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt2)); return 0; } -LOG_TEST_FLAGS(log_test_cat_deny, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_cat_deny, UTF_CONSOLE); /* Check denying based on file */ int log_test_file_deny(struct unit_test_state *uts) @@ -364,7 +364,7 @@ int log_test_file_deny(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt2)); return 0; } -LOG_TEST_FLAGS(log_test_file_deny, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_file_deny, UTF_CONSOLE); /* Check denying based on level */ int log_test_level_deny(struct unit_test_state *uts) @@ -387,7 +387,7 @@ int log_test_level_deny(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt2)); return 0; } -LOG_TEST_FLAGS(log_test_level_deny, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_level_deny, UTF_CONSOLE); /* Check matching based on minimum level */ int log_test_min(struct unit_test_state *uts) @@ -410,7 +410,7 @@ int log_test_min(struct unit_test_state *uts) ut_assertok(log_remove_filter("console", filt2)); return 0; } -LOG_TEST_FLAGS(log_test_min, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_min, UTF_CONSOLE); /* Check dropped traces */ int log_test_dropped(struct unit_test_state *uts) @@ -432,7 +432,7 @@ int log_test_dropped(struct unit_test_state *uts) return 0; } -LOG_TEST_FLAGS(log_test_dropped, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_dropped, UTF_CONSOLE); /* Check log_buffer() */ int log_test_buffer(struct unit_test_state *uts) @@ -459,4 +459,4 @@ int log_test_buffer(struct unit_test_state *uts) return 0; } -LOG_TEST_FLAGS(log_test_buffer, UTF_CONSOLE_REC); +LOG_TEST_FLAGS(log_test_buffer, UTF_CONSOLE); diff --git a/test/print_ut.c b/test/print_ut.c index eef85d16218..cf0d5929508 100644 --- a/test/print_ut.c +++ b/test/print_ut.c @@ -246,7 +246,7 @@ static int print_display_buffer(struct unit_test_state *uts) return 0; } -PRINT_TEST(print_display_buffer, UTF_CONSOLE_REC); +PRINT_TEST(print_display_buffer, UTF_CONSOLE); static int print_hexdump_line(struct unit_test_state *uts) { @@ -272,7 +272,7 @@ static int print_hexdump_line(struct unit_test_state *uts) return 0; } -PRINT_TEST(print_hexdump_line, UTF_CONSOLE_REC); +PRINT_TEST(print_hexdump_line, UTF_CONSOLE); static int print_do_hex_dump(struct unit_test_state *uts) { @@ -365,7 +365,7 @@ static int print_do_hex_dump(struct unit_test_state *uts) return 0; } -PRINT_TEST(print_do_hex_dump, UTF_CONSOLE_REC); +PRINT_TEST(print_do_hex_dump, UTF_CONSOLE); static int snprint(struct unit_test_state *uts) { diff --git a/test/test-main.c b/test/test-main.c index 2ee703ef5a8..63e8be0ccd1 100644 --- a/test/test-main.c +++ b/test/test-main.c @@ -333,7 +333,7 @@ static int test_pre_run(struct unit_test_state *uts, struct unit_test *test) } } - if (test->flags & UTF_CONSOLE_REC) { + if (test->flags & UTF_CONSOLE) { int ret = console_record_reset_enable(); if (ret) { -- cgit v1.3.1 From 695b4645325ef40c792a6e6a3849d134fcf80ed0 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Thu, 22 Aug 2024 07:58:04 -0600 Subject: doc: Add a few notes about how to use console checking Tidy up the existing docs in line with current conventions. Signed-off-by: Simon Glass --- doc/develop/commands.rst | 9 +++++---- doc/develop/tests_writing.rst | 1 - 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/develop/commands.rst b/doc/develop/commands.rst index 6427844f143..77a7a4d9c02 100644 --- a/doc/develop/commands.rst +++ b/doc/develop/commands.rst @@ -197,7 +197,6 @@ Here is an example: ctx.current = buf; ut_assertok(acpi_fill_ssdt(&ctx)); - console_record_reset(); run_command("acpi items", 0); ut_assert_nextline("dev 'acpi-test', type 1, size 2"); ut_assert_nextline("dev 'acpi-test2', type 1, size 2"); @@ -205,13 +204,11 @@ Here is an example: ctx.current = buf; ut_assertok(acpi_inject_dsdt(&ctx)); - console_record_reset(); run_command("acpi items", 0); ut_assert_nextline("dev 'acpi-test', type 2, size 2"); ut_assert_nextline("dev 'acpi-test2', type 2, size 2"); ut_assert_console_end(); - console_record_reset(); run_command("acpi items -d", 0); ut_assert_nextline("dev 'acpi-test', type 2, size 2"); ut_assert_nextlines_are_dump(2); @@ -223,4 +220,8 @@ Here is an example: return 0; } - DM_TEST(dm_test_acpi_cmd_items, UTF_SCAN_PDATA | UTF_SCAN_FDT); + DM_TEST(dm_test_acpi_cmd_items, UTF_SCAN_PDATA | UTF_SCAN_FDT | UTF_CONSOLE); + +Note that it is not necessary to call console_record_reset() unless you are +trying to drop some unchecked output. Consider using ut_check_skip_to_line() +instead. diff --git a/doc/develop/tests_writing.rst b/doc/develop/tests_writing.rst index 404d158ec40..a328ebfef33 100644 --- a/doc/develop/tests_writing.rst +++ b/doc/develop/tests_writing.rst @@ -151,7 +151,6 @@ There is no exactly equivalent C test, but here is a similar one that tests 'ms' buf[0x31] = 0x12; buf[0xff] = 0x12; buf[0x100] = 0x12; - ut_assertok(console_record_reset_enable()); run_command("ms.b 1 ff 12", 0); ut_assert_nextline("00000030: 00 12 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ................"); ut_assert_nextline("--"); -- cgit v1.3.1