summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2019-01-15 22:05:34 -0500
committerTom Rini <trini@konsulko.com>2019-01-15 22:05:34 -0500
commitaac0c29d4b8418c5c78b552070ffeda022b16949 (patch)
tree1f539113f2121d84b6f62421a066505d753a2fdc /test
parentf4cfd73943032729c9ad6ddd054bcf2ff8205b6d (diff)
parentf51f6715a5013f37620c38f0430e21d4736e235a (diff)
Merge tag 'dm-pull-15jan19' of git://git.denx.de/u-boot-dm
Fix recent changes to serial API for driver model Buildman clang support and a few fixes Small fixes to 'dm tree' and regmap test Improve sandbox build compatibility A few other minor fixes
Diffstat (limited to 'test')
-rw-r--r--test/dm/regmap.c7
-rw-r--r--test/dm/serial.c19
-rw-r--r--test/py/tests/test_bind.py3
3 files changed, 17 insertions, 12 deletions
diff --git a/test/dm/regmap.c b/test/dm/regmap.c
index 9a70c159dd..82de295cb8 100644
--- a/test/dm/regmap.c
+++ b/test/dm/regmap.c
@@ -160,9 +160,10 @@ static int dm_test_regmap_poll(struct unit_test_state *uts)
start = get_timer(0);
ut_asserteq(-ETIMEDOUT,
- regmap_read_poll_timeout(map, 0, reg,
- (reg == 0xcacafafa),
- 1, 5 * CONFIG_SYS_HZ));
+ regmap_read_poll_timeout_test(map, 0, reg,
+ (reg == 0xcacafafa),
+ 1, 5 * CONFIG_SYS_HZ,
+ 5 * CONFIG_SYS_HZ));
ut_assert(get_timer(start) > (5 * CONFIG_SYS_HZ));
diff --git a/test/dm/serial.c b/test/dm/serial.c
index 19a15d5d95..3d741a8c36 100644
--- a/test/dm/serial.c
+++ b/test/dm/serial.c
@@ -23,23 +23,24 @@ static int dm_test_serial(struct unit_test_state *uts)
* test with default config which is the only one supported by
* sandbox_serial driver
*/
- ut_assertok(serial_setconfig(SERIAL_DEFAULT_CONFIG));
- ut_assertok(serial_getconfig(&value_serial));
+ ut_assertok(serial_setconfig(dev_serial, SERIAL_DEFAULT_CONFIG));
+ ut_assertok(serial_getconfig(dev_serial, &value_serial));
ut_assert(value_serial == SERIAL_DEFAULT_CONFIG);
- ut_assertok(serial_getinfo(&info_serial));
+ ut_assertok(serial_getinfo(dev_serial, &info_serial));
ut_assert(info_serial.type == SERIAL_CHIP_UNKNOWN);
ut_assert(info_serial.addr == SERIAL_DEFAULT_ADDRESS);
/*
* test with a parameter which is NULL pointer
*/
- ut_asserteq(-EINVAL, serial_getconfig(NULL));
- ut_asserteq(-EINVAL, serial_getinfo(NULL));
+ ut_asserteq(-EINVAL, serial_getconfig(dev_serial, NULL));
+ ut_asserteq(-EINVAL, serial_getinfo(dev_serial, NULL));
/*
* test with a serial config which is not supported by
* sandbox_serial driver: test with wrong parity
*/
ut_asserteq(-ENOTSUPP,
- serial_setconfig(SERIAL_CONFIG(SERIAL_PAR_ODD,
+ serial_setconfig(dev_serial,
+ SERIAL_CONFIG(SERIAL_PAR_ODD,
SERIAL_8_BITS,
SERIAL_ONE_STOP)));
/*
@@ -47,7 +48,8 @@ static int dm_test_serial(struct unit_test_state *uts)
* sandbox_serial driver: test with wrong bits number
*/
ut_asserteq(-ENOTSUPP,
- serial_setconfig(SERIAL_CONFIG(SERIAL_PAR_NONE,
+ serial_setconfig(dev_serial,
+ SERIAL_CONFIG(SERIAL_PAR_NONE,
SERIAL_6_BITS,
SERIAL_ONE_STOP)));
@@ -56,7 +58,8 @@ static int dm_test_serial(struct unit_test_state *uts)
* sandbox_serial driver: test with wrong stop bits number
*/
ut_asserteq(-ENOTSUPP,
- serial_setconfig(SERIAL_CONFIG(SERIAL_PAR_NONE,
+ serial_setconfig(dev_serial,
+ SERIAL_CONFIG(SERIAL_PAR_NONE,
SERIAL_8_BITS,
SERIAL_TWO_STOP)));
diff --git a/test/py/tests/test_bind.py b/test/py/tests/test_bind.py
index 6e1feb80ae..ccf6d62ea8 100644
--- a/test/py/tests/test_bind.py
+++ b/test/py/tests/test_bind.py
@@ -13,7 +13,8 @@ def in_tree(response, name, uclass, drv, depth, last_child):
else:
leaf = leaf + '`'
leaf = leaf + '-- ' + name
- line = ' *{:10.10} [0-9]* \[ [ +] \] {:20.20} {}$'.format(uclass, drv, leaf)
+ line = (' *{:10.10} [0-9]* \[ [ +] \] {:20.20} {}$'
+ .format(uclass, drv, leaf))
prog = re.compile(line)
for l in lines:
if prog.match(l):