- 13 4月, 2021 6 次提交
-
-
由 Asherah Connor 提交于
A sandbox driver and test are added for the qfw uclass, and a test in QEMU added for qfw functionality to confirm it doesn't break in real world use. Signed-off-by: NAsherah Connor <ashe@kivikakk.ee> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NBin Meng <bmeng.cn@gmail.com>
-
由 Sean Anderson 提交于
This test is adapted from glibc, which is very concerned about alignment. It also tests strlcpy by dependency. Signed-off-by: NSean Anderson <seanga2@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Etienne Carriere 提交于
Add local variables agent0/agent1 to refer to SCMI sandbox context agent and ease readability of the test. For consistency, rename regul_dev to regul0_dev and remove sandbox_voltd in dm_test_scmi_voltage_domains(). Signed-off-by: NEtienne Carriere <etienne.carriere@linaro.org> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Etienne Carriere 提交于
Fix inline comments and empty line in scmi driver and test files. Remove test on IS_ENABLED(CONFIG_*_SCMI) in test/dm/scmi.c since these configuration are expected enabled when CONFIG_FIRMWARE_SCMI is enabled in sandbox configuration. Signed-off-by: NEtienne Carriere <etienne.carriere@linaro.org> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
-
由 Etienne Carriere 提交于
Implement sandbox regulator devices for SCMI voltage domains and test them in DM scmi tests. Signed-off-by: NEtienne Carriere <etienne.carriere@linaro.org> Reviewed-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NJaehoon Chung <jh80.chung@samsung.com>
-
由 Sean Anderson 提交于
If there were no variable substitutions in a command, then initial assignments would be misinterpreted as commands, instead of being skipped over. This is demonstrated by the following example: => foo=bar echo baz Unknown command 'foo=bar' - try 'help' Signed-off-by: NSean Anderson <seanga2@gmail.com>
-
- 10 4月, 2021 1 次提交
-
-
由 Alper Nebi Yasak 提交于
The PWM device provided by Chrome OS EC doesn't really support anything other than setting a relative duty cycle. To support it as a backlight, this patch makes the PWM period optional in the device tree and pretends the valid brightness range is its period_ns. Also adds a sandbox test for a PWM channel that has a fixed period, checking that the resulting duty_cycle matches on a set_config() even if the requested period_ns can't be set. Signed-off-by: NAlper Nebi Yasak <alpernebiyasak@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 08 4月, 2021 1 次提交
-
-
由 Heinrich Schuchardt 提交于
Provide a unit test for the longjmp() library function Signed-off-by: NHeinrich Schuchardt <xypron.glpk@gmx.de> Acked-by: NSean Anderson <seanga2@gmail.com>
-
- 07 4月, 2021 1 次提交
-
-
由 Tom Rini 提交于
The latest versions of pygit2 are not available in practically any distribution at this time. Furthermore, we don't need the latest in order to run all of our testsuites. Reduce this version requirement to something older that meets our needs while still supporting running our tests on older hosts (and so, test labs). Reported-by: NTom Warren <twarren@nvidia.com> Signed-off-by: NTom Rini <trini@konsulko.com>
-
- 06 4月, 2021 1 次提交
-
-
由 Simon Glass 提交于
Due to a recent change, tests are limited to running on sandbox only. Correct this so that any architecture can run them. Signed-off-by: NSimon Glass <sjg@chromium.org> Reported-by: NSean Anderson <seanga2@gmail.com> Fixes: c79705ea ("test: Move dm_test_init() into test-main.c") Tested-by: NSean Anderson <seanga2@gmail.com>
-
- 31 3月, 2021 1 次提交
-
-
由 Andy Shevchenko 提交于
When test suite tries to create a file for a new filesystem test case and fails, the clean up of the exception tries to unmount the image, that has not yet been mounted. When it happens, the fuse_mounted global variable is set to False and inconveniently the test case tries to use sudo, so without this change the admin of the machine gets an (annoying) email: Subject: *** SECURITY information for example.com *** example.com : Feb 5 19:43:47 : ... COMMAND=/bin/umount .../build-sandbox/persistent-data/mnt and second run of the test cases on uncleaned build folder will ask for sudo which is not what expected. Besides that there is a double unmount calls during successfully run test case. All of these due to over engineered Python try-except clause and people didn't get it properly at all. The rule of thumb is that don't use more keywords than try-except in the exception handling code. Nevertheless, here we adjust code to be less intrusive to the initial logic behind that complex and unclear constructions in the test case, although it adds a lot of lines of the code, i.e. splits one exception handler to three, so on each step we know what cleanup shall perform. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 29 3月, 2021 1 次提交
-
-
由 Sean Anderson 提交于
We need this header for U_BOOT_CMD, which is always present even without EFI. Fixes: 82c468a0 ("dm: test: Update Makefile conditions") Signed-off-by: NSean Anderson <seanga2@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 27 3月, 2021 2 次提交
-
-
由 Simon Glass 提交于
This feature was dropped from U-Boot some time ago: f12f96cf (sf: Drop spl_flash_get_sw_write_prot") However, we do need a way to see if a flash device is write-protected, since if it is, it may not be possible to write to do (i.e. failing to write is expected). I am not sure of the correct layer to implement this, so this patch is a stab at it. If spi-flash makes sense then I will add to the 'sf' also. Re the points mentioned in the removal commit: 1) This kind of requirement can be achieved using existing flash operations and flash locking API calls instead of making a separate flash API. Which uclass is this? 2) Technically there is no real hardware user for this API to use in the source tree. I do want coral (at least) to support this. 3) Having a flash operations API for simple register read bits also make difficult to extend the flash operations. This new patch only mentions write-protect being on or off, rather than the actual mechanism. 4) Instead of touching generic code, it is possible to have this functionality inside spinor operations in the form of flash hooks or fixups for associated flash chips. That sounds to me like what drivers are for. But we still need some sort of API for it to be accessible. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
These tests current produce unwanted output on sandbox. Use the correct functions to controller console output, to avoid this. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 26 3月, 2021 10 次提交
-
-
由 Simon Glass 提交于
At present when driver model needs to change a device it simply updates the struct udevice structure. But with of-platdata-inst most of the fields are not modified at runtime. In fact, typically only the flags need to change. For systems running SPL from read-only memory it is convenient to separate out the runtime information, so that the devices don't need to be copied before being used. Create a new udevice_rt table, similar to the existing driver_rt. For now it just holds the flags, although they are not used in this patch. Add a new Kconfig for the driver_rt data, since this is not needed when of-platdata-inst is used. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Run the tests on this build too, to prevent regressions. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Move sandbox_spl over to use OF_PLATDATA_INST. Create a new board to test the case when this is not enabled, since we will be keeping that code around for several months and want to avoid regressions. Skip the dm_test_of_plat_dev() test since driver info is not available for OF_PLATDATA_INST. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
With recent changes this can be supported again. Add it back. This reverts commit d85f2c4f. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This function finds a device by its driver_info index. With of-platdata-inst we do not use driver_info, but instead instantiate udevice records at build-time. However the semantics of using the function are the same in each case: the caller provides an index and gets back a device. So rename the function to device_get_by_ofplat_idx(), so that it can be used for both situations. The caller does not really need to worry about the details. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
This function is now only used in a test. Drop it. Also drop DM_DRVINFO_GET() which was the only purpose for having the function. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Create a version of this driver for sandbox so that it can use the of-platdata struct. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
It is not possible to destroy the uclasses when they are created at build time. Skip this step so that SPL test can complete successfully. Signed-off-by: NSimon Glass <sjg@chromium.org> Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Jose Marinho 提交于
This commit slightly extends test_efi_capsule_fw3. In order to run the test the following must be added to sandbox_defconfig: +CONFIG_CMD_SF=y +CONFIG_CMD_MEMORY=y +CONFIG_CMD_FAT=y +CONFIG_DFU=y The ESRT is printed in the u-boot shell by calling efidebug esrt. The test ensures that, after the capsule is installed, the ESRT contains entries with the GUIDs: - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_FIT_GUID; - EFI_FIRMWARE_IMAGE_TYPE_UBOOT_RAW_GUID; test invocation: sudo ./test/py/test.py --bd sandbox -k capsule_fw3 -l --build CC: Heinrich Schuchardt <xypron.glpk@gmx.de> CC: Sughosh Ganu <sughosh.ganu@linaro.org> CC: AKASHI Takahiro <takahiro.akashi@linaro.org> CC: Ilias Apalodimas <ilias.apalodimas@linaro.org> CC: Andre Przywara <andre.przywara@arm.com> CC: Alexander Graf <agraf@csgraf.de> CC: nd@arm.com Signed-off-by: NJose Marinho <jose.marinho@arm.com> Reviewed-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
由 Ilias Apalodimas 提交于
The UEFI spec allows a packed array of UEFI device paths in the FilePathList[] of an EFI_LOAD_OPTION. The first file path must describe the loaded image but the rest are OS specific. Previous patches parse the device path and try to use the second member of the array as an initrd. So let's modify efidebug slightly and install the second file described in the command line as the initrd device path. Signed-off-by: NIlias Apalodimas <ilias.apalodimas@linaro.org>
-
- 22 3月, 2021 3 次提交
-
-
由 Simon Glass 提交于
Now that we have the alias information we can assign a sequence number to each device in the uclass. Store this in the node associated with each device. This requires renaming the sandbox test drivers to have the right name. Note that test coverage is broken with this patch, but fixed in the next one. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Bin Meng 提交于
This files uses the macro U_BOOT_CMD which is defined in command.h, but command.h is conditionally included. Fix it. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Bin Meng 提交于
SETEXPR_TEST is for a new setexpr test, not mem. Signed-off-by: NBin Meng <bmeng.cn@gmail.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 18 3月, 2021 1 次提交
-
-
由 Andy Shevchenko 提交于
On some distributions the mkfs.ext4 is under /sbin and /sbin is not set for mere users. Include /sbin to the PATH when creating ext4 disk image, so that users won't get a scary traceback from Python. Cc: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
- 14 3月, 2021 2 次提交
-
-
由 Igor Opaniuk 提交于
Add initial test coverage for SCP03 command. Signed-off-by: NIgor Opaniuk <igor.opaniuk@foundries.io> Reviewed-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Some format strings use the wrong type. Fix them. Example warnings: In file included from test/dm/acpi.c:22: test/dm/acpi.c: In function ‘dm_test_acpi_cmd_list’: test/dm/acpi.c:362:21: warning: format ‘%lx’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=] ut_assert_nextline("RSDP %08lx %06lx (v02 U-BOOT)", addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ sizeof(struct acpi_rsdp)); ~~~~~~~~~~~~~~~~~~~~~~~~ include/test/ut.h:282:33: note: in definition of macro ‘ut_assert_nextline’ if (ut_check_console_line(uts, fmt, ##args)) { \ ^~~ Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 13 3月, 2021 1 次提交
-
-
由 Simon Glass 提交于
When multiple log() calls are used which don't end in newline, the log prefix is prepended multiple times in the same line. This makes the output look strange. Fix this by detecting when the previous log record did not end in newline. In that case, setting a flag. Drop the unused BUFFSIZE in the test while we are here. As an example implementation, update log_console to check the flag and produce the expected output. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
- 12 3月, 2021 9 次提交
-
-
由 Simon Glass 提交于
As an example of an SPL test, add a new test for loading a FIT within SPL. This runs on sandbox_spl. For this to work, the text base is adjusted so that there is plenty of space available. While we are here, document struct spl_load_info properly, since this is currently ambiguous. This test only verifies the logic path. It does not actually check that the image is loaded correctly. It is not possible for sandbox's SPL to actually run u-boot.img since it currently includes u-boot.bin rather than u-boot. Further work could expand the test in that direction. The need for this was noted at: http://patchwork.ozlabs.org/project/uboot/patch/20201216000944.2832585-3-mr.nuke.me@gmail.com/Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present SPL only runs driver model tests. Update it to run all available tests, i.e. in any test suite. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present each test suite has its own portion of the linker_list section of the image, but other lists are interspersed. This makes it hard to enumerate all the available tests without knowing the suites that each one is in. Place all tests together in a single contiguous list by giving them common prefix not used elsewhere in U-Boot. This makes it possible to find the start and end of all tests. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
At present we use the linker list directly. This is not very friendly, so add a helpful macro instead. This will also allow us to change the naming later without updating this code. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
The current name is the same as the main test runner file. Rename it to avoid confusion. Signed-off-by: NSimon Glass <sjg@chromium.org> Reviewed-by: NHeinrich Schuchardt <xypron.glpk@gmx.de>
-
由 Simon Glass 提交于
Add this functionality to ut_run_list() so it can be removed from dm_test_run(). At this point all tests are run through ut_run_list(). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Add a check to ut_run_list() as to whether a list has driver model tests. Move the logic for the test devicetree into that function, in an effort to eventually remove all logic from dm_test_run(). Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Update this function to use the return value of ut_run_list() to check for success/failure, so that they are in sync. Also return a command success code so that the caller gets what it expects. Signed-off-by: NSimon Glass <sjg@chromium.org>
-
由 Simon Glass 提交于
Use this function instead of implementing it separately for driver model. Make ut_run_tests() private since it is only used in test-main.c Signed-off-by: NSimon Glass <sjg@chromium.org>
-