All of these host tools are apparently written for Python2,
not Python3.
Use 'python2' in the shebang line according to PEP 394
(https://www.python.org/dev/peps/pep-0394/).
Change-Id: Ie56e538b0f4a234fccb460adbfd863db0712a1b0
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Tao Huang <huangtao@rock-chips.com>
(cherry picked from commit 94b13bbae90bfb94204b8fe9c531bc163e746a9f)
Add clk_valid() to check for optional clocks are valid.
Call clk_valid() in test/dm/clk.c and add relevant test routine to
sandbox clk tests.
Signed-off-by: Fabrice Gasnier <fabrice.gasnier@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: David Wu <david.wu@rock-chips.com>
Change-Id: I78b1edea1f8ef54d3aa3f7610d39d79dd994d1bf
This uclass is intended for devices that do not need any features from the
uclass, including binding children.
This will typically be used by devices that are used to bind child devices
but do not use dm_scan_fdt_dev() to do it. That is for example the case of
several USB wrappers that have 2 child devices (1 for device and 1 for
host) but bind only one at a any given time.
Change-Id: Iad9ba5f368bd2de9940cf069baf9bec9d668920c
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 07e33711fec4f1106f36805b5dc830da07c783c5)
This patch adds the bulk clock API tests for the sandbox test suite.
It's very similar to the main test but only uses the _bulk() API and
checks if the clocks are correctly enabled/disabled.
Change-Id: Ibfd7ea033e9a1c2ca76d88be8ca562a660f30448
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 65388d0dc5a36fc86718ffcdf08ac5671ae27b5d)
This patch adds the bulk reset API tests for the sandbox test suite.
Unlike the main test, it also check the "other" reset signal using the bulk API
and checks if the resets are correctly asserted/deasserted.
To allow the bulk API to work, and avoid changing the DT, the number of resets
of the sandbox reset controller has been bumped to 101 for the "other" reset
line to be valid.
Change-Id: Iac62a1c6ee5637695f7d0dd77b35f047eca641a9
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Frank Wang <frank.wang@rock-chips.com>
(cherry picked from commit 91f5f8b73ccba5bf591912fe6e8c500a7d51eb93)
1.Support RKNANDC_NAND, RKSFC_NAND and RKSFC_NOR;
2.Adjust Userdata part size to reasonable value.
Change-Id: I20a4264848ba4ccd8385e9dee36cd16391cd517e
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
If the board do not have the 'devnum', the env_get() returns NULL
and strcmp will lead to "data abort".
Change-Id: I329237b61fc96bc90e7a07653b665192d6a9d7b8
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The 'rktest all v2/3' do not really pass arg to sub cmd, always set argc
for 'rktest all *' cmd to 1 for sub commands.
Change-Id: I2d69ad25aaca074f52bfd2e69be4c33bc41186df
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
free() is using pointer while sysmem_free() is not using pointer,
so they can not use the same parameter.
Change-Id: Ib68319bda2ba1a400f2436e21d5864a0e2511fad
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
1. add default dhcp cmd for test
2. fix the argc(has -1 in test-rockchip)
3. fix return value for FAIL case(return value is '1').
Change-Id: If55a3a8d29240be98febbf4649a23964a74452b6
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Not test display and misc for upstream U-Boot, replace local APIs with
upstream APIs.
Use CONFIG_RKIMG_BOOTLOADER to identify the rockchip local U-Boot.
Change-Id: I65b69eca8262d8aa0cb621c90d4ff1f2756368ba
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Use module Macro for APIs from different module.
Change-Id: I765150f21bc9118e5ad0e661bb2b4ae12af77342
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Add support to test usb disk like other blk device,
update api to get correct blk_desc.
Change-Id: I6b9cbce42ef16f207ad9d41ca55fa0e58f273ec7
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
The LAVA system need message from log to show the test result.
"<LAVA_SIGNAL_*>" for start, end, test case result key;
"<LAVA_TEST_RUNNER>: exiting" for test complete key
Change-Id: I13522bf82da69f105f439853fa5c4b32c9f3d1ff
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
It is useful to obtain the block-protect setting of the SPI flash, so we
know whether it is fully open or (perhaps partially) write-protected. Add
a method for this. Update the sandbox driver to process this operation and
add a test.
Signed-off-by: Simon Glass <sjg@chromium.org
Change-Id: I8e8abe197ab483a26622f02666cc234a1544e642
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit a58986ca8b53d8c7a441397082f84edc7f47d19f)
Update the parameters sandbox_sf_bind_emul to support livetree.
Change-Id: Iec83b813c8cddd750f7061d697304fa05556c5fb
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Jon Lin <jon.lin@rock-chips.com>
(cherry picked from commit 008dcddf9937bd2576f98b48eb5bf0f60ad36014)
Usually, we test the eMMC speed by reading and writing several times
and then taking the average. So add parameter count.
Change-Id: I0a01804b4b35b4a6d9dc8c96ac2bce6a4607301b
Signed-off-by: Jason Zhu <jason.zhu@rock-chips.com>
=> rktest
Command: rktest [module] [args...]
- module: timer|key|emmc|rknand|regulator|eth|ir|brom|vendor
- args: depends on module, try 'rktest [module]' for test or more help
- Enabled modules:
- timer: test timer and interrupt
- brom: enter bootrom download mode
- key: test board keys
- emmc: test emmc read/write speed
- rknand: test rknand read/write speed
- regulator: test regulator volatge set and show regulator status
- vendor: test vendor storage partition read/write
Change-Id: I1f58dd65f7ffb229970cb86cb2f568cbca933336
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
1. dump all regulator fdt configure and current status;
2. only adjudst voltage for bucks;
Change-Id: Ib1b1730e0eb8157a9c979e3552932b2c80f40458
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
add header file for cli;
use simplg_strtoul() instead of strtoul();
Change-Id: I274710be24132fd9188be4b2283bea747bcfe667
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
Each uclass has a driver name which we can use to look up the uclass. This
is useful for logging, where the uclass ID is used as the category.
Add a function to handle this, as well as a test.
Change-Id: Id221809d6f9f818b52a5bf88f4e12d409a070f05
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 6e43d1b19982b1756b7c607569d1778e556d6577)
After adding our small zynq uboot which has hush parser off same
variable tests start to failed. Use quotes only when hush is enabled.
Change-Id: I9aee385346129dee480aa04aa68f420aa172aaa7
Reported-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 3e229a83bd4190f99731992d3a56983f29313899)
This patch extends pmic_bind_children prefix matching. In addition to
the node name the property regulator-name is used while trying to match
prefixes. This allows assigning different drivers to regulator nodes
named regulator@1 and regulator@10 for example.
I have discarded the idea of using other properties then regulator-name
as I do not see any benefit in using property compatible or even
regulator-compatible. Of course I am open to change this if there are
good reasons to do so.
Change-Id: Ifedf2c0a51cb725ddb290ee9dfd54a3fea45df70
Signed-off-by: Felix Brack <fb@ltec.ch>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit bf802f5d544f85c03b4097ab23d078be43c61855)
Add a test which tries out various filters and options to make sure that
logging works as expected.
Change-Id: Ibbaf607e128356e78769b9db9d6bda235c74ead2
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 20faa27c2bc32b1442970cfe98a3006cf8eac063)
Add a command which exercises the logging system.
Change-Id: I4eb139b69937c752d7f6fc42dde3f757260b832b
Signed-off-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ef11ed8239bf02b347e7fb9fc6d980aec0c7810a)
It can be useful to record how long tests take; this can help debug slow
running test systems or track changes in performance over time. Enhance
the test system to record timestamps while running test:
- Whenever a new log file section is started.
- After U-Boot is started and communication has been established.
- After each host or U-Boot command is executed.
Change-Id: I1db02bfc1d69c8d6a4c390a778ae433bbd858a9d
Signed-off-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 9679d339ad2d4c495d734bad3a0fb7be6c4215eb)
run_command does not have a parameter wait_for_each.
Change-Id: I5b6bb3ed1b732c3ebc307f0618282caea9190b83
Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit cd3e8a72a6fb1fe758c5f73b394527609afe26cc)
fdt_getprop_u32 is not exported and it's different than what the
unit test uses. Rename u32 prop access methods to something that's
unit test specific.
Change-Id: I0256118c7ae7b6709c4ef0791c53093e3117f23e
Signed-off-by: Pantelis Antoniou <pantelis.antoniou@konsulko.com>
Acked-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit 706708d3b2e7ade443836e7a14802a5a63b59713)
Add unit tests for the 'gpt rename' and 'gpt swap' commands that
rely on the block device created by test/py/make_test_disk.py.
Add CONFIG_CMD_GPT_RENAME to the sandbox_defconfig. Remove the
testdisk.raw test device at the end of the tests.
Change-Id: I1c5b963a1f84168d4979ad1591f68a5f2a259935
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit c5772188ede914b0e67c2a58ae179039a582afe0)
Run unit tests for the 'gpt guid' command, making use of the block
device created by test/py/make_test_disk.py. Remove this device at
the end of the tests.
Change-Id: I315989b993388fdce6f0b263376463a3532d154b
Signed-off-by: Alison Chaiken <alison@peloton-tech.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit a2f422555fc80144aea418c0d8e95341acfe6868)