95e11069 | 03-Aug-2018 |
Bin Meng <bmeng.cn@gmail.com> |
test: dm: pci: Add cases for finding PCI capability APIs
Add several PCI capability and extended capability ID registers in the swap_case driver, so that we can add test case for dm_pci_find_capabil
test: dm: pci: Add cases for finding PCI capability APIs
Add several PCI capability and extended capability ID registers in the swap_case driver, so that we can add test case for dm_pci_find_capability() and dm_pci_find_ext_capability().
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
3ed214ac | 03-Aug-2018 |
Bin Meng <bmeng.cn@gmail.com> |
test: dm: pci: Add tests for mixed static and dynamic devices on the same bus
In the Sandbox test configuration, PCI bus#0 only has static devices while bus#1 only has dynamic devices. Create a bus#
test: dm: pci: Add tests for mixed static and dynamic devices on the same bus
In the Sandbox test configuration, PCI bus#0 only has static devices while bus#1 only has dynamic devices. Create a bus#2 that has both types of devices and test such.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
3839b4e8 | 03-Aug-2018 |
Bin Meng <bmeng.cn@gmail.com> |
test: dm: pci: Add tests for configuration space access
So far we missed the testing for PCI configuration space access. This adds tests for it, as well as removing some redundant asserts.
Signed-o
test: dm: pci: Add tests for configuration space access
So far we missed the testing for PCI configuration space access. This adds tests for it, as well as removing some redundant asserts.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
dee4d752 | 03-Aug-2018 |
Bin Meng <bmeng.cn@gmail.com> |
test: dm: pci: Test more than one PCI host controller
So far there is only one PCI host controller in the sandbox test configuration. This is normally the case for x86, but it can be common on other
test: dm: pci: Test more than one PCI host controller
So far there is only one PCI host controller in the sandbox test configuration. This is normally the case for x86, but it can be common on other architectures like ARM/PPC to have more than one PCI host controller in the system.
This updates the case to cover such scenario.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
2db7f2b7 | 03-Aug-2018 |
Bin Meng <bmeng.cn@gmail.com> |
test: dm: pci: Test more than one device on the same bus
It's quite common to have more than one device on the same PCI bus. This updates the test case to test such scenario.
Signed-off-by: Bin Men
test: dm: pci: Test more than one device on the same bus
It's quite common to have more than one device on the same PCI bus. This updates the test case to test such scenario.
Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
show more ...
|
b7a7c411 | 09-Jul-2018 |
Quentin Schulz <quentin.schulz@bootlin.com> |
test/py: add test for whitelist of variables while importing environment
This tests that the importing of an environment with a specified whitelist works as intended.
If there are variables passed
test/py: add test for whitelist of variables while importing environment
This tests that the importing of an environment with a specified whitelist works as intended.
If there are variables passed as parameter to the env import command, those only should be imported in the current environment.
For each variable passed as parameter, if - foo is bar in current env and bar2 in exported env, after importing exported env, foo shall be bar2, - foo does not exist in current env and foo is bar2 in exported env, after importing exported env, foo shall be bar2, - foo is bar in current env and does not exist in exported env (but is passed as parameter), after importing exported env, foo shall be empty ONLY if the -d option is passed to env import, otherwise foo shall be bar,
Any variable not passed as parameter should be left untouched.
Two other tests are made to test that size cannot be '-' if the checksum protection is enabled.
Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
f4eef40b | 09-Jul-2018 |
Quentin Schulz <quentin.schulz@bootlin.com> |
test/py: remove hacks for non-zero RAM base address in tests
Some functions have different behaviour when the given address is 0 (assumed to be NULL by the function).
find_ram_base() does not retur
test/py: remove hacks for non-zero RAM base address in tests
Some functions have different behaviour when the given address is 0 (assumed to be NULL by the function).
find_ram_base() does not return 0 anymore so it's safe to remove those offsets.
Suggested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Quentin Schulz <quentin.schulz@bootlin.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Tested-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
8793631e | 14-Sep-2017 |
Paul Burton <paul.burton@imgtec.com> |
test/py: vboot: Remove stderr redirect from openssl command
The openssl command specified in test_with_algo() ultimately ends up being run by RunAndLog::run(), which uses it to construct a Popen obj
test/py: vboot: Remove stderr redirect from openssl command
The openssl command specified in test_with_algo() ultimately ends up being run by RunAndLog::run(), which uses it to construct a Popen object with the default shell=False. The stderr redirect in the command is therefore simply passed to openssl as an argument. With at least openssl 1.1.0f this causes openssl, and therefore test_vboot, to fail with:
genpkey: Use -help for summary. Exit code: 1
Any stderr output ought to be captured & stored in the RunAndLog object's output field and returned from run() via run_and_log() to test_with_algo() which then ignores it anyway, so we can drop the shell-like redirection with no ill effects. With this fix test_vboot now passes for me.
Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
9f9e8a4d | 14-Sep-2017 |
Paul Burton <paul.burton@imgtec.com> |
test/py: hush_if_test: Use open() in place of file()
In python 3.x the file() function has been removed. Use open() instead, which works on both python 2.x & 3.x, and is described as the preferred m
test/py: hush_if_test: Use open() in place of file()
In python 3.x the file() function has been removed. Use open() instead, which works on both python 2.x & 3.x, and is described as the preferred method of opening a file by python 2.x documentation anyway.
Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
57bf9bea | 14-Sep-2017 |
Paul Burton <paul.burton@imgtec.com> |
test/py: fit: Open files as binary files
The read_file() function in test_fit is used with files that are not text files, as well as some that are. It is never used in a way that requires it to deco
test/py: fit: Open files as binary files
The read_file() function in test_fit is used with files that are not text files, as well as some that are. It is never used in a way that requires it to decode text files to characters, so open all files in binary mode such that read() doesn't attempt to decode characters for files which are not text files.
Without this test_fit fails on python 3.x when reading an FDT in run_fit_test() with:
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xd0 in position 0: invalid continuation byte
Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
show more ...
|
052ca37d | 14-Sep-2017 |
Paul Burton <paul.burton@imgtec.com> |
test/py: Import 'configparser' lower case to be python 3.x safe
In python 3.x the configparser module is named with all lower case. Import it as such in order to avoid errors when running on python
test/py: Import 'configparser' lower case to be python 3.x safe
In python 3.x the configparser module is named with all lower case. Import it as such in order to avoid errors when running on python 3.x, and fall back to the CamelCase version in order to keep working with python 2.x.
Signed-off-by: Paul Burton <paul.burton@imgtec.com> Reviewed-by: Stephen Warren <swarren@nvidia.com>
show more ...
|