| Age | Commit message (Collapse) | Author |
|
Enable this feature so that truetype fonts can be used on the sandbox
console. Update the tests to select the normal/rotated console when needed.
Signed-off-by: Simon Glass <[email protected]>
Signed-off-by: Anatolij Gustschin <[email protected]>
|
|
This can be sent when to many characters are entered. Make sure it is
ignored and does not cause a character to be displayed.
Signed-off-by: Simon Glass <[email protected]>
|
|
With anti-aliased fonts we need a more fine-grained horizontal position
than a single pixel. Characters can be positioned to start part-way through
a pixel, with anti-aliasing (greyscale edges) taking care of the visual
effect.
To cope with this, use fractional units (1/256 pixel) for horizontal
positions in the text console.
Signed-off-by: Simon Glass <[email protected]>
[agust: rebased]
Signed-off-by: Anatolij Gustschin <[email protected]>
|
|
The ut command prints a test failure count each time it is executed.
This is stored in a global variable which is never reset. Consequently,
the printed failure count accumulates across runs. Fix this by clearing
the counter each time "ut" is invoked.
Signed-off-by: Stephen Warren <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
We have a way to find a regmap by its syscon driver data value. Add the same
for syscon itself.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Bin Meng <[email protected]>
|
|
Add a test for the 'bmp' command. Test both the uncompressed and compressed
versions of the file, since they use different code paths.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
|
|
Test that text is displayed correctly when the console is rotated.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
|
|
Add tests that check that the video console is working correcty. Also check
that text output produces the expected result. Test coverage includes
character output, wrapping and scrolling.
Signed-off-by: Simon Glass <[email protected]>
Acked-by: Anatolij Gustschin <[email protected]>
|
|
This will allow the implementation to make use of data in the block_dev
structure beyond the base device number. This will be useful so that eMMC
block devices can encompass the HW partition ID rather than treating this
out-of-band. Equally, the existence of the priv field is crying out for
this patch to exist.
Signed-off-by: Stephen Warren <[email protected]>
Reviewed-by: Tom Rini <[email protected]>
|
|
Update these tests to use driver model API functions.
Signed-off-by: Simon Glass <[email protected]>
|
|
Due to a limitation removed in an earlier patch, USB tests were not seeing
all the devices. Update the tests to pass now that all devices are visible.
Signed-off-by: Simon Glass <[email protected]>
|
|
This subsystem has been broken since commit:
4efad20a sf: Update status reg check in spi_flash_cmd_wait_ready
There has so far been no response from the maintainer, and a release is
imminent. For now, let's just disable the tests.
Signed-off-by: Simon Glass <[email protected]>
|
|
Now that we may compile (but not link) code calling fixup_cmdtable when
this is not set, we need to always have the declaration available. We
should also make sure that anyone calling the function includes
<command.h> as that's where the function declaration is.
Signed-off-by: Tom Rini <[email protected]>
|
|
Subcommands contain pointers to functions which are not updated when
MANUAL_RELOC is enabled. This patch fix it.
Signed-off-by: Michal Simek <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Add a test that verifies that USB keyboards work correctly on sandbox.
This verifies some additional parts of the USB stack.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add tests that 'usb tree' produces the right output when a device changes
order on the bus.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add tests that this command produces the right output, even when a rescan
results in a device disappearing from the bus.
Signed-off-by: Simon Glass <[email protected]>
|
|
When running sandbox tests, silence the console to avoid unwanted output.
Also, record the console in case tests want to check it.
The -v option can be used to enable stdout during tests.
Signed-off-by: Simon Glass <[email protected]>
|
|
The console includes a global variable and several functions that are only
used by a small subset of U-Boot files. Before adding more functions, move
the definitions into their own header file.
Signed-off-by: Simon Glass <[email protected]>
|
|
Currently the USB tests take around two seconds to run. Remove these
unnecessary time delays so that the tests run quickly.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a sandbox timer which get time from host os and a basic
test.
Signed-off-by: Thomas Chou <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
This commit adds unit tests for ADC uclass's methods using sandbox ADC.
Testing proper ADC binding:
- dm_test_adc_bind() - device binding
- dm_test_adc_wrong_channel_selection() - checking wrong channel selection
Testing ADC supply operations:
- dm_test_adc_supply():
- Vdd/Vss values validating
- Vdd regulator updated value validating
- Vdd regulator's auto enable state validating
Testing ADC operations results:
- dm_test_adc_single_channel_conversion() - single channel start/data
- dm_test_adc_single_channel_shot() - single channel shot
- dm_test_adc_multi_channel_conversion() - multi channel start/data
- dm_test_adc_multi_channel_shot() - multi channel single shot
Signed-off-by: Przemyslaw Marczak <[email protected]>
Cc: Simon Glass <[email protected]>
Signed-off-by: Minkyu Kang <[email protected]>
|
|
|
|
U-Boot crashes when doing a 'ping' with the following test scenario:
- All ethernet devices are not probed
- "ethaddr" for all ethernet devices are not set
- "ethact" is set to a valid ethernet device name
Add a new test case 'dm_test_eth_act' to hit such scenario.
Signed-off-by: Bin Meng <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
The current name is inconsistent with other driver model data access
functions. Rename it and fix up all users.
Signed-off-by: Simon Glass <[email protected]>
Reviewed-by: Joe Hershberger <[email protected]>
|
|
Use the sandbox environment for the basic tests.
Reviewed-by: Simon Glass <[email protected]>
Tested-by: Simon Glass <[email protected]>
Signed-off-by: Nishanth Menon <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Adjust the memory leak tests to show the amount of memory leaked. This can
be a useful signal as to what is wrong.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add one more ethernet device node in the sandbox test device tree,
with name 'sbe5'. This is to support a new test case for testing
network device rotation.
Signed-off-by: Bin Meng <[email protected]>
Acked-by: Joe Hershberger <[email protected]>
|
|
This new command can dump all device resources associated to
each device. The fields in every line shows:
- The address of the resource
- The size of the resource
- The name of the release function
- The stage in which the resource has been acquired (BIND/PROBE)
Currently, there is no driver using devres, but if such drivers are
implemented, the output of this command should look like this:
=> dm devres
- root_driver
- soc
- extbus
- serial@54006800
bfb541e8 (8 byte) devm_kmalloc_release BIND
bfb54440 (4 byte) devm_kmalloc_release PROBE
bfb54460 (4 byte) devm_kmalloc_release PROBE
- serial@54006900
bfb54270 (8 byte) devm_kmalloc_release BIND
- gpio@55000000
- i2c@58780000
bfb5bce8 (12 byte) devm_kmalloc_release PROBE
bfb5bd10 (4 byte) devm_kmalloc_release PROBE
- eeprom
bfb54418 (12 byte) devm_kmalloc_release BIND
Signed-off-by: Masahiro Yamada <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
We use syscon to test that the regmap functions work as expected.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a test to confirm that we can access system controllers and find their
driver data.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a test to confirm that we can adjust LEDs using the led_gpio driver.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a test to confirm that we can probe this device. Since there is no
MMC stack support in sandbox at present, this is as far as the test goes.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add a test to confirm that we can probe this device and get information on
the available RAM.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add tests that confirm that the drivers work as expected, and we can walk
through the available reset types trying to reset the board.
Signed-off-by: Simon Glass <[email protected]>
|
|
Add tests of each API call using a sandbox clock device.
Signed-off-by: Simon Glass <[email protected]>
|
|
All driver model tests have a dm_test_ prefix. Ignore it when matching a
test name. This makes it easier to run individual tests, like this:
./sandbox/u-boot -d ./sandbox/arch/sandbox/dts/test.dtb \
-c "ut dm clk_periph"
We can use 'clk_periph' instead of 'dm_test_clk_periph'.
Also print a message if the requested test is not found.
Signed-off-by: Simon Glass <[email protected]>
|
|
The regulator_autoset() function mixes printf() output and PMIC adjustment
code. It provides a boolean to control the output. It is better to avoid
missing logic and output, and this permits a smaller SPL code size. So
split the output into a separate function.
Also rename the function to have a by_name() suffix, since we would like
to be able to pass a device when we know it, and thus avoid the name
search.
Signed-off-by: Simon Glass <[email protected]>
Tested-by: Przemyslaw Marczak <[email protected]>
Acked-by: Przemyslaw Marczak <[email protected]>
|
|
In SPL it is sometimes useful to be able to obtain a dump of the current
driver model state. Since commands are not available, provide a way to
directly call the functions to output this information.
Adjust the existing commands to use these functions.
Signed-off-by: Simon Glass <[email protected]>
|
|
Commit 9cc36a2 'dm: core: Add a flag to control sequence numbering' changed
the default uclass behaviour to not support bus numbering. This is incorrect
for PCI and that commit should have enabled the flag for PCI.
Enable it so that PCI buses can be found and the 'pci' command works again.
Also add a test for this.
Signed-off-by: Simon Glass <[email protected]>
|
|
Put the driver model for the system back into a good state after
completing the DM testing.
Signed-off-by: Joe Hershberger <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Make sure that the env gets cleaned up after a test fails so that other
tests aren't affected.
Signed-off-by: Joe Hershberger <[email protected]>
|
|
There's not much point in having a failure count if we always give up on
the first failure. Also stop clearing the entire state between tests.
Make sure that any failures are still passed out to the command line.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Make all unit tests selectable as a menu of test suites instead of just
sitting in the top-level menu individually.
Signed-off-by: Joe Hershberger <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Unify the command for running unit tests further by moving the "dm test"
command over to "ut dm".
Signed-off-by: Joe Hershberger <[email protected]>
Acked-by: Simon Glass <[email protected]>
|
|
Separate the ability to define tests and assert status of test functions
from the dm tests so they can be used more consistently throughout all
tests.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
Use a regular expression to apply the default formatting flags for all
ethaddr env vars.
Signed-off-by: Joe Hershberger <[email protected]>
Reviewed-by: Simon Glass <[email protected]>
|
|
The file test.dts from driver model test directory,
was compiled by call dtc in script: test/dm/test-dm.sh.
This doesn't allow for including of dtsi files and using
of C preprocessor routines in this dts file.
Since the mentioned script builds U-Boot before tests,
then moving the test.dts file into sandbox dts directory
is reasonable.
Signed-off-by: Przemyslaw Marczak <[email protected]>
Acked-by: Simon Glass <[email protected]>
Tested on sandbox:
Tested-by: Simon Glass <[email protected]>
|
|
This change adds new file to sandbox driver model test environment.
The file is: test/dm/power.c, and it includes tests for PMIC framework,
which includes PMIC uclass and REGULATOR uclass.
All tests are based od Sandbox PMIC emulated device. Some test constants for
this device are defined in the header: include/power/sandbox_pmic.h
PMIC tests includes:
- pmic get - tests, that pmic_get() returns the requested device
- pmic I/O - tests I/O by writing and reading some values to PMIC's registers
and then compares, that the write/read values are equal.
The regulator tests includes:
- Regulator get by devname/platname
- Voltage set/get
- Current set/get
- Enable set/get
- Mode set/get
- Autoset
- List autoset
For the regulator 'get' test, the returned device pointers are compared,
and their names are also compared to the requested one.
Every other test, first sets the given attribute and next try to get it.
The test pass, when the set/get values are equal.
Signed-off-by: Przemyslaw Marczak <[email protected]>
Acked-by: Simon Glass <[email protected]>
Tested on sandbox:
Tested-by: Simon Glass <[email protected]>
|
|
Add some simple tests to verify that the RTC uclass works correctly in
U-Boot.
Signed-off-by: Simon Glass <[email protected]>
|