aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'ci' into 'master'CHECK/pre-splg-workingSimon Glass7 days108-3193/+3177
|\ | | | | | | | | test/py: Shorten u_boot_console See merge request u-boot/u-boot!47
| * test: Make net tests depend on CONFIG_CMD_NETSimon Glass7 days1-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | This fails on samus_tpl as there is no 'net' command. => net list Unknown command 'net' - try 'help' ! Fix it by adding a condition for the test. Add a blank line to keep pylint happy. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test/py: Show info about module-loadingSimon Glass7 days1-13/+20
| | | | | | | | | | | | | | | | | | | | | | It is sometimes tricky to figure out what modules test.py is loading when it starts up. The result can be a silent failure with no clue as to what when wrong. Add a section which lists the modules loaded as well as those not found. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test/py: Drop assigning ubman to consSimon Glass7 days27-463/+432
| | | | | | | | | | | | | | Now that we have a shorter name, we don't need this sort of thing. Just use ubman instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test/py: Drop importing utils as utilSimon Glass7 days18-104/+110
| | | | | | | | | | | | | | | | Now that we have a shorter name, we don't need this sort of thing. Drop it. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # test_android
| * test/py: Drop u_boot_ prefix on test filesSimon Glass7 days52-215/+215
| | | | | | | | | | | | | | | | We know this is U-Boot so the prefix serves no purpose other than to make things longer and harder to read. Drop it and rename the files. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Mattijs Korpershoek <mkorpershoek@baylibre.com> # test_android / test_dfu
| * test/py: Shorten u_boot_consoleSimon Glass7 days102-2604/+2604
|/ | | | | | | | | | | | | | | | This fixture name is quite long and results in lots of verbose code. We know this is U-Boot so the 'u_boot_' part is not necessary. But it is also a bit of a misnomer, since it provides access to all the information available to tests. It is not just the console. It would be too confusing to use con as it would be confused with config and it is probably too short. So shorten it to 'ubman'. Signed-off-by: Simon Glass <sjg@chromium.org> Link: https://lore.kernel.org/u-boot/CAFLszTgPa4aT_J9h9pqeTtLCVn4x2JvLWRcWRD8NaN3uoSAtyA@mail.gmail.com/
* Merge branch 'ci' into 'master'Simon Glass8 days55-499/+587
|\ | | | | | | | | test: Complete the suite migration See merge request u-boot/u-boot!45
| * test: Update documentationSimon Glass8 days3-60/+149
| | | | | | | | | | | | Update documentation for how to write tests and the 'ut' command. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Do flag-processing in the correct placeSimon Glass8 days2-47/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | At present the 'ut' command handles its flags in a strange way, in that they must come after the subcommand. So, we must use 'ut bloblist -r2' to run the bloblist tests twice. This is an artefact of the way tests were run, through subcommands. It is now possible to correct this, by doing flag-processing before running the suite. Update the code to handle this, so that 'ut -r2 bloblist' works. Update the 'test_suite' test to check the new arguments. Add a sanity-check for -I while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Move code out of cmd_ut_category()Simon Glass8 days1-37/+25
| | | | | | | | | | | | | | Move the logic from this function into run_suite(), on the way to having flag parsing in the top-level 'ut' command instead of its children. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Allow running a selection of suitesSimon Glass8 days3-13/+26
| | | | | | | | | | | | | | Enhance the ut command to accept a comma-separated list of test suites to run. Report the summary information for these at the end. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Drop suites.hSimon Glass8 days31-40/+0
| | | | | | | | | | | | This file is empty now. Remove it and its uses. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Make cmd_ut_category() staticSimon Glass8 days2-25/+3
| | | | | | | | | | | | | | This function is not used outside the cmd_ut file anymore, so make it static. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Drop support for test commandsSimon Glass8 days2-36/+12
| | | | | | | | | | | | | | | | | | Now that everything is using the new test-suite features, drop support for running commands. Fix a missing closing-bracket while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Rename optee test-fileSimon Glass8 days2-1/+1
| | | | | | | | | | | | This has nothing to do with commands anymore, so rename the file. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Drop the function for running optee testsSimon Glass8 days3-19/+1
| | | | | | | | | | | | Use the new suite-runner to run these tests instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Split optee tests into three functionsSimon Glass8 days1-17/+40
| | | | | | | | | | | | | | | | | | | | These tests run three different checks on the nodes, but the logic is currently all in one tests. Split the code out into three different tests, which do different setup and then run the same checks. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Update optee to do init and uninit from testsSimon Glass8 days2-21/+38
| | | | | | | | | | | | | | | | | | | | Rather than having an init function and then running the tests, create a test-init function to do it. This will allow us to get rid of the command function. Fix the comment abotu 'environment' while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Drop the function for running bootstd testsSimon Glass8 days3-15/+1
| | | | | | | | | | | | Use the new suite-runner to run these tests instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Update bootstd to do init from testsSimon Glass8 days3-21/+10
| | | | | | | | | | | | | | | | Rather than having an init function and then running the tests, create a test-init function to do it. This will allow us to get rid of the command function. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Drop the function for running fdt_overlay testsSimon Glass8 days3-20/+1
| | | | | | | | | | | | Use the new suite-runner to run these tests instead. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Update fdt_overlay to do init from testsSimon Glass8 days2-1/+5
| | | | | | | | | | | | | | | | Rather than having an init function and then running the tests, create a test-init function to do it. This will allow us to get rid of the command function. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Update fdt_overlay test to use fdtdec functionsSimon Glass8 days1-51/+22
| | | | | | | | | | | | | | | | | | Use the helpers provided for this purpose, rather than different ones in this particular test. Leave fdt_getprop_str() alone as it seems to have more value. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Move fdt_overlay init into a functionSimon Glass8 days1-56/+57
| | | | | | | | | | | | | | | | Move the init code into a separate function since it is quite large. Adjust it to use unit-test functions which have become available since the test was written. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Make all tests depend on UNIT_TESTSimon Glass8 days5-12/+9
| | | | | | | | | | | | | | Rather than having this condition defined separately for each suite, bracket all options with 'if UNIT_TEST'. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Move fdt-overlay-test rule into test/Simon Glass8 days2-1/+1
| | | | | | | | | | | | | | The Makefile rules for tests should be within test/Makefile so move the 'fdt-overlay' rule over. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Move optee-test rule into test/Simon Glass8 days2-1/+1
| | | | | | | | | | | | | | The Makefile rules for tests should be within test/Makefile so move the 'optee' rule over. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Move env-test rule into test/Simon Glass8 days2-1/+1
| | | | | | | | | | | | | | The Makefile rules for tests should be within test/Makefile so move the 'env' rule over. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Tweak FDT-overlay testsSimon Glass8 days12-38/+39
| | | | | | | | | | | | Use fdt_overlay consistently in the identifiers and file/dir names. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Support an init/uninit functions for test suitesSimon Glass8 days2-1/+22
| | | | | | | | | | | | | | | | | | | | | | Some suites need things to be set up before they can run. Add a way to declare an init function using the UNIT_TEST_INIT() macro. The init function is just like any other test, but is always placed first so that it runs before all the other test functions in the suite. Add an uninit function as well, to clean up after the test. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Leave out the prefix when printing test namesSimon Glass8 days3-9/+15
| | | | | | | | | | | | | | When tests are all in the same suite it is annoying to have to read all the common text after each name. Skip this to help the user. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Show the average time per testSimon Glass8 days3-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Show the average duration of a test, so we can keep track of how it is trending. Report the suite with the longest average test to encourage people to improve it. Add a function to update the stats based on the results from a single suite and another to show the summary information. Make this optional, since sandbox's SPL tests do not have a timer driver and people may want to print results without times. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Keep track of suite durationSimon Glass8 days5-2/+48
| | | | | | | | | | | | | | | | | | | | | | Show the time taken by each test suite with 'ut all' and the total time for all suites. Take care to remove any sandbox time-offset from the values. Fix the comment-format on timer_test_add_offset() while we are here. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Add up the number of tests manuallySimon Glass8 days1-2/+8
| | | | | | | | | | | | | | | | All tests should belong to a suite, but if there is a suite we don't know about (e.g. not added to cmd_ut.c) then the totals will not add up. Add a check for this. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Fix a stray asterisk in ut_run_list()Simon Glass8 days1-1/+1
| | | | | | | | | | | | Drop the unwanted asterisk in the comment. Signed-off-by: Simon Glass <sjg@chromium.org>
| * test: Drop sandbox_set_enable_memio() from mux-cmd testSimon Glass8 days1-6/+0
|/ | | | | | | | | | | | This test does not appear to use sandbox's memory-mapped I/O so there is no need to enable it. Even if there were a need, it should be disabled at the end of the test, so as not to affect other tests. Drop these lines from the test. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'mmc-fix' into 'master'Simon Glass8 days1-13/+3
|\ | | | | | | | | mmc: Avoid uniniting twice See merge request u-boot/u-boot!46
| * mmc: Avoid uniniting twiceSimon Glass8 days1-13/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | Each MMC device has a child which ihs a block device. At present we call mmc_deinit() when the block device is removed. But the MMC struct (i.e. struct mmc) is attached to the MMC's device, not its child. So at present, when an MMC device is removed, mmc_deinit() is called twice, once for the MMC device and once for its block device. This results in a double call to cyclic_unregister(). Fix this by adding a 'remove' method to the uclass and calling mmc_deinit() from there. Also drop the call to device_probe() within the block-device's probe() method. The device is already in the process of being probed, so this call does nothing. Series-to: u-boot Series-cc: marek Signed-off-by: Simon Glass <sjg@chromium.org> Fixes: c822c1a50bd ("mmc: call device_probe() after scanning")
* Merge branch 'ci' into 'master'Simon Glass8 days46-109/+370
|\ | | | | | | | | upl: Prerequite patches for updated spec See merge request u-boot/u-boot!44
| * dm: core: Provide ofnode_find_subnode_unit()Simon Glass8 days3-7/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | The ofnode_find_subnode() function currently processes things two different ways, so the treatment of unit addresses differs depending on whether OF_LIVE is enabled or not. Add a new version which uses the ofnode API and add a test to check that unit addresses can be matched correctly. Leave the old function in place for the !OF_LIVE case, to avoid a code-size increase, e.g. on firefly-rk3288 Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Provide ofnode_name_eq_unit() to accept a unit addressSimon Glass8 days3-0/+55
| | | | | | | | | | | | | | | | | | When a unit-address is provided, use it to match against the node name. Since this increases code size, put it into a separate function. Signed-off-by: Simon Glass <sjg@chromium.org>
| * dm: core: Clarify behaviour of ofnode_name_eq()Simon Glass8 days2-4/+5
| | | | | | | | | | | | | | This function is somewhat ambiguous, so expand the comments and add a test for the undefined behaviour. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: emulation: Enable bloblistSimon Glass8 days2-0/+6
| | | | | | | | | | | | | | Add bloblist support so that tables can be generated and placed in a bloblist, then passed to a payload using UPL Signed-off-by: Simon Glass <sjg@chromium.org>
| * efi_loader: Avoid mapping the ACPI tables twiceSimon Glass8 days1-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The add_u_boot_and_runtime() function paints with a broad brush, considering all of the memory from the top of U-Boot stack to gd->ram_top as EFI_RUNTIME_SERVICES_CODE This is fine, but we need to make sure we don't add a separate entry for any ACPI tables in this region (which happens when bloblist is used for tables). Otherwise the memory map looks strange and we get a test failure on qemu-x86 (only) for the 'virtual address map' test. Good map: Type Start End Attributes ================ ================ ================ ========== CONVENTIONAL 0000000000000000-00000000000a0000 WB RESERVED 00000000000a0000-00000000000f0000 WB RUNTIME DATA 00000000000f0000-00000000000f2000 WB|RT RESERVED 00000000000f2000-0000000000100000 WB CONVENTIONAL 0000000000100000-0000000005cc7000 WB BOOT DATA 0000000005cc7000-0000000005ccc000 WB RUNTIME DATA 0000000005ccc000-0000000005ccd000 WB|RT BOOT DATA 0000000005ccd000-0000000005cce000 WB RUNTIME DATA 0000000005cce000-0000000005cf0000 WB|RT BOOT DATA 0000000005cf0000-0000000006cf5000 WB RESERVED 0000000006cf5000-0000000006cfa000 WB ACPI RECLAIM MEM 0000000006cfa000-0000000006d1c000 WB RESERVED 0000000006d1c000-0000000006f35000 WB RUNTIME CODE 0000000006f35000-0000000006f37000 WB|RT RESERVED 0000000006f37000-0000000008000000 WB RESERVED 00000000e0000000-00000000f0000000 WB Bad map: (with BLOBLIST_TABLES but without this patch): Type Start End Attributes ================ ================ ================ ========== CONVENTIONAL 0000000000000000-00000000000a0000 WB RESERVED 00000000000a0000-00000000000f0000 WB ACPI RECLAIM MEM 00000000000f0000-00000000000f1000 WB RESERVED 00000000000f1000-0000000000100000 WB CONVENTIONAL 0000000000100000-0000000005ca5000 WB BOOT DATA 0000000005ca5000-0000000005caa000 WB RUNTIME DATA 0000000005caa000-0000000005cab000 WB|RT BOOT DATA 0000000005cab000-0000000005cac000 WB RUNTIME DATA 0000000005cac000-0000000005cce000 WB|RT BOOT DATA 0000000005cce000-0000000006cd3000 WB RUNTIME DATA 0000000006cd3000-0000000006cd5000 WB|RT BOOT DATA 0000000006cd5000-0000000006cf4000 WB RESERVED 0000000006cf4000-0000000006cf9000 WB ACPI RECLAIM MEM 0000000006cf9000-0000000006ce6000 WB Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Align the SMBIOS table to a 4K boundarySimon Glass8 days1-1/+5
| | | | | | | | | | | | | | | | | | This isn't strictly needed, but with UPL we use the reserved-memory nodes to indicate where the SMBIOS table is. Tianocore requires 4KB alignment on these regions, so it is easier to adjust the alignment to match. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Move tables to use SZ macrosSimon Glass8 days1-2/+3
| | | | | | | | | | | | | | Update the tables to use linux/sizes rather than open-coped values. Signed-off-by: Simon Glass <sjg@chromium.org> Suggested-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
| * x86: Enable UPL handoff for SPLSimon Glass8 days1-0/+3
| | | | | | | | | | | | Add the GD_FLG_UPL so that a UPL-handoff is created. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Support jumping to a UPL imageSimon Glass8 days1-0/+11
| | | | | | | | | | | | | | Add a function to allow x86 boards to jump to a UPL images. Currently only 32-bit entry is supported. Signed-off-by: Simon Glass <sjg@chromium.org>
| * x86: Show an error if video failsSimon Glass8 days2-3/+8
| | | | | | | | | | | | | | | | | | If video is enabled we expect it to work. Avoid silent failure by adding a panic if things go wrong. Expand the SPL malloc-area for qemu-x86_64 to avoid a panic. Signed-off-by: Simon Glass <sjg@chromium.org>