[U-Boot] [PATCH 5/5] dm: test: Don't clear global_data in dm_test_uclass_before_ready()

Simon Glass sjg at chromium.org
Wed Apr 22 20:01:41 CEST 2015


On 21 April 2015 at 10:00, Joe Hershberger <joe.hershberger at gmail.com> wrote:
> Hi Simon,
>
> On Sun, Apr 19, 2015 at 8:21 AM, Simon Glass <sjg at chromium.org> wrote:
>> We must not clear global_data even in tests, since the ram_buffer (which
>> is used by malloc()) will also be lost, and subsequent tests will fail.
>>
>> Zero only the global_data fields that are required for the test to function.
>>
>> Signed-off-by: Simon Glass <sjg at chromium.org>
>
> For me, this fixed:
>
> """
> Test: dm_test_usb_base
> /home/joe/u-boot/test/dm/test-main.c:27, dm_test_init(): 0 ==
> dm_init(): Expected 0, got -12
> /home/joe/u-boot/test/dm/test-main.c:93, dm_test_main(): 0 ==
> dm_test_init(dms): Expected 0, got -1
> """
>
> Reviewed-by: Joe Hershberger <joe.hershberger at ni.com>
> Tested-by: Joe Hershberger <joe.hershberger at ni.com>

Applied to u-boot-dm.


More information about the U-Boot mailing list