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)
Provide a Python function that creates a small block device for the
purpose of testing the cmd/gpt.c or cmd/part.c functions in the u-boot
sandbox.
Change-Id: I620c2f97c7b6533d8cb607e365e719246cdb7acd
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 bf6d76b84ae13b463c0dca556118047e2d046f33)
This allows to scan the DT including all "clocks" node's sub-nodes
in which fixed-clock are defined.
All fixed-clock should be defined inside a clocks node which collect all
external oscillators. Until now, all clocks sub-nodes can't be binded except
if the "simple-bus" compatible string is added which is a hack.
Update test.dts by moving clk_fixed node inside clocks.
Change-Id: I9c346d812b0ee270f9b6fc6b6f60af7c28ebb46e
Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Kever Yang <kever.yang@rock-chips.com>
(cherry picked from commit ee87a097b0f66158ce2985940a5f28ba15a3552d)
Enter bootrom download mode by command: rktest brom_dnl
Change-Id: I6120a885e5514a57c81fd469ce27a2472009c4fd
Signed-off-by: Andy Yan <andy.yan@rock-chips.com>
Support reading start LBA from test command and so that
the developer could understand which area is cleared by
the emmc write test, and he/she recovery the image respectively
from the flashing tool by looking into the parameter file.
Change-Id: Ie050c44bb7ef5c4f0edd5f80370da12420500f08
Suggested-by: Joseph Chen <chenjh@rock-chips.com>
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
This is more flexible for users to determine exit or not
Change-Id: Idcd9ad605b8615062fafae485cd2f297ed021fee
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>