test: reset: Extend base reset test to catch error
authorNeil Armstrong <narmstrong@baylibre.com>
Tue, 20 Apr 2021 08:42:25 +0000 (10:42 +0200)
committerStefan Roese <sr@denx.de>
Wed, 28 Apr 2021 08:05:13 +0000 (10:05 +0200)
commit49f352dc331dc5dd91bd1120d08ff46b07d4994b
treee80b80714ea311a9f0373667b497f02371ca2ef7
parentb104caa9a497b7d6f3a3df3462f37bf92265e26f
test: reset: Extend base reset test to catch error

With this extended test, we get the following failure :

=> ut dm reset_base
Test: dm_test_reset_base: reset.c
test/dm/reset.c:52, dm_test_reset_base(): reset_method3.id == reset_method3_1.id: Expected 0x14 (20), got 0x2 (2)
Test: dm_test_reset_base: reset.c (flat tree)
test/dm/reset.c:52, dm_test_reset_base(): reset_method3.id == reset_method3_1.id: Expected 0x14 (20), got 0x2 (2)
Failures: 2

A fix is needed in reset_get_by_index_nodev() when introduced in [1].

[1] ea9dc35aab ("reset: Get the RESET by index without device")

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
arch/sandbox/dts/test.dts
test/dm/reset.c