| 5508f10a | 15-Jan-2016 |
Simon Glass <sjg@chromium.org> |
video: Handle the 'bell' character
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 <sjg@chro
video: Handle the 'bell' character
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 <sjg@chromium.org>
show more ...
|
| f2661786 | 15-Jan-2016 |
Simon Glass <sjg@chromium.org> |
video: Use fractional units for X coordinates
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 pi
video: Use fractional units for X coordinates
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 <sjg@chromium.org> [agust: rebased] Signed-off-by: Anatolij Gustschin <agust@denx.de>
show more ...
|
| 26db3a61 | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: dfu: allow boardenv to specify test sizes
Allow the env__dfu_configs boardenv data to specify the set of DFU transfer sizes to test. Manually specifying test sizes is useful if you wish to
test/py: dfu: allow boardenv to specify test sizes
Allow the env__dfu_configs boardenv data to specify the set of DFU transfer sizes to test. Manually specifying test sizes is useful if you wish to test multiple DFU configurations (e.g. SD card ext4 filesystem, SD card whole raw partition, RAM, etc.), but don't want to test every single transfer size on each, to avoid bloating the overall time taken by testing. If the boardenv doesn't specify a set of sizes, the built-in list is used as a default, preserving backwards-compatibility.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| db261f00 | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: fix a couple typos in comments
s/updata/update/.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> |
| d27f2fc1 | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: run sandbox in source directory
Some unit tests expect the cwd of the sandbox process to be the root of the source tree. Ensure that requirement is met.
Signed-off-by: Stephen Warren <swar
test/py: run sandbox in source directory
Some unit tests expect the cwd of the sandbox process to be the root of the source tree. Ensure that requirement is met.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 77bcb22d | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: pass test DTB to sandbox
This is required for at least "ut dm" to operate correctly.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org> |
| 78b39cc3 | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: correctly log xfail/xpass tests
Tests can complete in passed, skipped, xpass, xfailed, or failed, states. Currently the U-Boot log generation code doesn't handle the xfailed or xpass states
test/py: correctly log xfail/xpass tests
Tests can complete in passed, skipped, xpass, xfailed, or failed, states. Currently the U-Boot log generation code doesn't handle the xfailed or xpass states since they aren't used. Add support for the remaining states. Without this, tests that xfail end up being reported as skipped.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 9129d9f5 | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: detect another "bad pattern" in console output
Many error situations in U-Boot print the message: ### ERROR ### Please RESET the board ###
Add this to the list of bad patterns the test
test/py: detect another "bad pattern" in console output
Many error situations in U-Boot print the message: ### ERROR ### Please RESET the board ###
Add this to the list of bad patterns the test system detects. One practical advantage of this change is to detect the case where sandbox is told to use a particular DTB file, and the file cannot be opened.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 0c6189b5 | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: check for bad patterns everywhere we wait
Currently, bad patterns are only honored when executing a shell command. Other cases, such as the initial boot-up of U-Boot or when interacting wit
test/py: check for bad patterns everywhere we wait
Currently, bad patterns are only honored when executing a shell command. Other cases, such as the initial boot-up of U-Boot or when interacting with command output rather than gathering all output prior to the shell prompt, do not currently look for bad patterns in console output. This patch makes sure that bad patterns are honored everywhere.
One benefit of this change is that if U-Boot sandbox fails to start up, the error message it emits can be caught immediately, rather than relying on a (long) timeout when waiting for the expected signon message and/or command prompt.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| e4119ebb | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test.py: calculate bad patterns on change only
A future patch will use the bad_patterns array in multiple places. Rather than duplicating the code to calculate it, or even sharing it in a function a
test.py: calculate bad patterns on change only
A future patch will use the bad_patterns array in multiple places. Rather than duplicating the code to calculate it, or even sharing it in a function and simply calling it redundantly when nothing has changed, only re-calculate the list when some change is made to it. This reduces work.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 44ac762b | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: fix spawn.expect multiple match handling
Multiple patterns may be passed to spawn.expect(). The pattern which matches at the earliest position should be designated as the match. This aspect
test/py: fix spawn.expect multiple match handling
Multiple patterns may be passed to spawn.expect(). The pattern which matches at the earliest position should be designated as the match. This aspect works correctly. When multiple patterns match at the same position, priority should be given the the earliest entry in the list of patterns. This aspect does not work correctly. This patch fixes it.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 26e1becc | 28-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/dm: clear unit test failure count each run
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 print
test/dm: clear unit test failure count each run
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 <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| d20e5e97 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: Provide custom IDs when parametrizing tests
When pytest generates the name for parametrized tests, simple parameter values (ints, strings) get used directly, but more complex values such as
test/py: Provide custom IDs when parametrizing tests
When pytest generates the name for parametrized tests, simple parameter values (ints, strings) get used directly, but more complex values such as dicts are not handled. This yields test names such as:
dfu[env__usb_dev_port0-env__dfu_config0] dfu[env__usb_dev_port0-env__dfu_config1]
Add some code to extract a custom fixture ID from the fixture values, so that we end up with meaningful names such as:
dfu[micro_b-emmc] dfu[devport2-ram]
If the boardenv file doesn't define custom names, the code falls back to the old algorithm.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| a2ec5606 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: Quote consistency
When converting test/py from " to ', I missed a few places (or added a few inconsistencies later). Fix these.
Note that only quotes in code are converted; double-quotes i
test/py: Quote consistency
When converting test/py from " to ', I missed a few places (or added a few inconsistencies later). Fix these.
Note that only quotes in code are converted; double-quotes in comments and HTML are left as-is, since English and HTML use " not '.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| e8debf39 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: use " for docstrings
Python's coding style docs indicate to use " not ' for docstrings.
test/py has other violations of the coding style docs, since the docs specify a stranger style than
test/py: use " for docstrings
Python's coding style docs indicate to use " not ' for docstrings.
test/py has other violations of the coding style docs, since the docs specify a stranger style than I would expect, but nobody has complained about those yet:-)
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 56382a81 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: make net test aware of USB and PCI enumeration
The existing net test executes a list of commands supplied by boardenv variable env__net_pre_commands. The idea was that boardenv would know w
test/py: make net test aware of USB and PCI enumeration
The existing net test executes a list of commands supplied by boardenv variable env__net_pre_commands. The idea was that boardenv would know whether the Ethernet device was attached to USB, PCI, ... and hence was the best place to put any commands required to probe the device.
However, this approach doesn't scale well when attempting to use a single boardenv across multiple branches of U-Boot, some of which require "pci enum" to enumerate PCI and others of which don't, or don't /yet/ simply because various upstream changes haven't been merged down.
This patch updates the test to require that the boardenv state which HW features are required for Ethernet to work, and lets the test itself map that knowledge to the set of commands to execute. Since this mapping is part of the test script, which is part of the U-Boot code/branch, this approach is more scalable. It also feels cleaner, since again boardenv is only providing data, rather than test logic.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| be1df826 | 26-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: dfu: error out if USB device already exists
The DFU test requests U-Boot configure its USB controller in device mode, then waits for the host machine to enumerate the USB device and create
test/py: dfu: error out if USB device already exists
The DFU test requests U-Boot configure its USB controller in device mode, then waits for the host machine to enumerate the USB device and create a device node for it. However, this wait can be fooled if the USB device node already exists before the test starts, e.g. if some previous software stack already configured the USB controller into device mode and never de-configured it. This "previous software stack" could even be another test/py test, if U-Boot's own USB teardown does not operate correctly. If this happens, dfu-util may be run before U-Boot is ready to serve DFU commands, which may cause false test failures.
Enhance the dfu test to fail if the device node exists before it is expected to.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
| e787a58f | 25-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: make crash detection more robust
test/py contains logic to detect the target crashing and rebooting by searching the console output for a U-Boot signon message, which will presumably be emi
test/py: make crash detection more robust
test/py contains logic to detect the target crashing and rebooting by searching the console output for a U-Boot signon message, which will presumably be emitted when the system boots after the crash/reset.
Currently, this logic only searches for the exact signon message that was printed by the U-Boot version under test, upon the assumption that binary is written into flash, and hence will be the version booted after any reset. However, this is not a valid assumption; some test setups download the U-Boot-under-test into RAM and boot it from there, and in such a scenario an arbitrary U-Boot version may be located in flash and hence run after any reset.
Fix the reset detection logic to match any U-Boot signon message. This prevents false negatives.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| e5bb279f | 21-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: add a networking test
This tests: - dhcp (if indicated by boardenv file). - Static IP network setup (if provided by boardenv file). - Ping. - TFTP get.
Signed-off-by: Stephen Warren <swarr
test/py: add a networking test
This tests: - dhcp (if indicated by boardenv file). - Static IP network setup (if provided by boardenv file). - Ping. - TFTP get.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 05266103 | 21-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: move find_ram_base() into u_boot_utils
find_ram_base() is a shared utility function, not a core part of the U-Boot console interaction.
Signed-off-by: Stephen Warren <swarren@nvidia.com> A
test/py: move find_ram_base() into u_boot_utils
find_ram_base() is a shared utility function, not a core part of the U-Boot console interaction.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| f5d196d0 | 22-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: add DFU test
Add a test of DFU functionality to the Python test suite. The test starts DFU in U-Boot, waits for USB device enumeration on the host, executes dfu-util multiple times to test
test/py: add DFU test
Add a test of DFU functionality to the Python test suite. The test starts DFU in U-Boot, waits for USB device enumeration on the host, executes dfu-util multiple times to test various transfer sizes, many of which trigger USB driver edge cases, and finally aborts the DFU command in U-Boot.
This test mirrors the functionality previously available via the shell scripts in test/dfu, and hence those are removed too.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| d054f4c2 | 22-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: ums: add filesystem-based testing
Enhance the UMS test to optionally mount a partition and read/write a file to it, validating that the content written and read back are identical.
This en
test/py: ums: add filesystem-based testing
Enhance the UMS test to optionally mount a partition and read/write a file to it, validating that the content written and read back are identical.
This enhancement is backwards-compatible; old boardenv contents that don't define the new configuration data will cause the test code to perform as before.
test/ums/ is deleted since the Python test now performs the same testing that it did.
The code is also re-written to make use of the recently added utility module, and split it up into nested functions so the overall logic of the test process can be followed more easily without the details cluttering the code.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 76b46939 | 22-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: add various utility code
Add various common utility functions. These will be used by a forthcoming re-written UMS test, and a brand-new DFU test.
Signed-off-by: Stephen Warren <swarren@nvi
test/py: add various utility code
Add various common utility functions. These will be used by a forthcoming re-written UMS test, and a brand-new DFU test.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 3f2faf73 | 22-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: optionally ignore errors from shell commands
Sometimes it's useful to run shell commands and ignore any errors. One example might be cleanup logic; if a test-case experiences an error, the
test/py: optionally ignore errors from shell commands
Sometimes it's useful to run shell commands and ignore any errors. One example might be cleanup logic; if a test-case experiences an error, the cleanup logic might experience an error too, and we don't want that error to mask the original error, so we want to ignore the subsequent error.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|
| 783cbcd3 | 22-Jan-2016 |
Stephen Warren <swarren@nvidia.com> |
test/py: log when tests send CTRL-C
Write a note to the log file when a test sends CTRL-C to U-Boot. This makes it easier to follow what's happening in the logs, especially since U-Boot doesn't echo
test/py: log when tests send CTRL-C
Write a note to the log file when a test sends CTRL-C to U-Boot. This makes it easier to follow what's happening in the logs, especially since U-Boot doesn't echo the character back to its output, so there's no other signal of what's going on.
Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Simon Glass <sjg@chromium.org>
show more ...
|