[U-Boot] [PATCH v3 18/26] test: dm: eth: Handle failed test env cleanup

Simon Glass sjg at chromium.org
Wed May 6 17:59:04 CEST 2015


Hi Joe,

On 6 May 2015 at 09:39, Joe Hershberger <joe.hershberger at gmail.com> wrote:
>
> Hi Simon,
>
> On Wed, May 6, 2015 at 10:11 AM, Simon Glass <sjg at chromium.org> wrote:
> > Hi Joe,
> >
> > On 5 May 2015 at 17:39, Joe Hershberger <joe.hershberger at gmail.com> wrote:
> >> Hi Simon,
> >>
> >> On Tue, May 5, 2015 at 3:56 PM, Simon Glass <sjg at chromium.org> wrote:
> >>> Hi Joe,
> >>>
> >>> On 3 May 2015 at 14:12, Joe Hershberger <joe.hershberger at ni.com> wrote:
> >>>> Make sure that the env gets cleaned up after a test fails so that other
> >>>> tests aren't affected.
> >>>>
> >>>> Signed-off-by: Joe Hershberger <joe.hershberger at ni.com>
> >>>> ---
> >>>>
> >>>> Changes in v3:
> >>>> -New for version 3
> >>>>
> >>>> Changes in v2: None
> >>>>
> >>>>  test/dm/eth.c | 79 +++++++++++++++++++++++++++++++++++++++++------------------
> >>>>  1 file changed, 55 insertions(+), 24 deletions(-)
> >>>
> >>> With this commit I get quite a few errors, like:
> >>>
> >>> 19: test: dm: eth: Handle failed test env cleanup
> >>>    sandbox:  +   sandbox
> >>> +  int retval;
> >>> +      ^
> >>> +test/dm/built-in.o: In function `dm_test_bus_children':
> >>> +build/../test/dm/bus.c:121: undefined reference to `ut_failf'
> >>> +build/../test/dm/bus.c:123: undefined reference to `ut_fail'
> >>> +test/dm/built-in.o: In function `dm_test_bus_children_funcs':
> >>> +build/../test/dm/bus.c:143: undefined reference to `ut_failf'
> >>> +build/../test/dm/bus.c:168: undefined reference to `ut_failf'
> >>> +build/../test/dm/bus.c:169: undefined reference to `ut_fail'
> >>
> >> Are you sure it's this commit? This touches nothing it test/dm/bus.c
> >> and nothing in test/ut.c (where those functions are defined). Is is
> >> maybe a dirty build error?
> >
> > buildman does not lie :-) Well, so far as I know...it retries if it
> > sees any errors and warnings, after doing a full mrproper.
> >
> > Just to be sure I tried a separate sandbox build and got the same errors.
> >
> > I pushed the tree to u-boot-dm branch 'env-working' - perhaps I've
> > applied something incorrectly?
>
> I fetched down your branch and it builds fine for me. Can you paste
> the entire error log from your attempted build?

Did you build this commit?


19: test: dm: eth: Handle failed test env cleanup
   sandbox:  +   sandbox
+  int retval;
+      ^
+test/dm/built-in.o: In function `dm_test_bus_children':
+build/../test/dm/bus.c:121: undefined reference to `ut_failf'
+build/../test/dm/bus.c:123: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_bus_children_funcs':
+build/../test/dm/bus.c:143: undefined reference to `ut_failf'
+build/../test/dm/bus.c:168: undefined reference to `ut_failf'
+build/../test/dm/bus.c:169: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_bus_children_iterators':
+build/../test/dm/bus.c:198: undefined reference to `ut_failf'
+build/../test/dm/bus.c:199: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_bus_child_post_bind':
+build/../test/dm/bus.c:454: undefined reference to `ut_fail'
+build/../test/dm/bus.c:458: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_bus_child_post_bind_uclass':
+build/../test/dm/bus.c:477: undefined reference to `ut_fail'
+build/../test/dm/bus.c:481: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `test_bus_parent_data':
+build/../test/dm/bus.c:217: undefined reference to `ut_failf'
+build/../test/dm/bus.c:232: undefined reference to `ut_fail'
+build/../test/dm/bus.c:242: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_bus_parent_ops':
+build/../test/dm/bus.c:308: undefined reference to `ut_failf'
+build/../test/dm/bus.c:329: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_bus_child_pre_probe_uclass':
+build/../test/dm/bus.c:508: undefined reference to `ut_failf'
+build/../test/dm/bus.c:512: undefined reference to `ut_fail'
+build/../test/dm/bus.c:517: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_bus_parent_data_uclass':
+build/../test/dm/bus.c:282: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `test_bus_parent_platdata':
+build/../test/dm/bus.c:366: undefined reference to `ut_failf'
+build/../test/dm/bus.c:400: undefined reference to `ut_fail'
+build/../test/dm/bus.c:404: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_bus_parent_platdata_uclass':
+build/../test/dm/bus.c:425: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `test_unbind':
+build/../test/dm/test-driver.c:69: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `test_remove':
+build/../test/dm/test-driver.c:60: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `test_probe':
+build/../test/dm/test-driver.c:50: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `test_bind':
+build/../test/dm/test-driver.c:39: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_fdt_uclass_seq':
+build/../test/dm/test-fdt.c:234: undefined reference to `ut_failf'
+build/../test/dm/test-fdt.c:235: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_fdt_offset':
+build/../test/dm/test-fdt.c:252: undefined reference to `ut_failf'
+build/../test/dm/test-fdt.c:262: undefined reference to `ut_fail'
+build/../test/dm/test-fdt.c:263: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_fdt_pre_reloc':
+build/../test/dm/test-fdt.c:177: undefined reference to `ut_fail'
+build/../test/dm/test-fdt.c:180: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_check_devices':
+build/../test/dm/test-fdt.c:129: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_fdt':
+build/../test/dm/test-fdt.c:159: undefined reference to `ut_fail'
+build/../test/dm/test-fdt.c:162: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_main':
+build/../test/dm/test-main.c:87: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_init':
+build/../test/dm/test-main.c:30: undefined reference to `ut_failf'
+build/../test/dm/test-main.c:97: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_destroy':
+build/../test/dm/test-main.c:65: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `test_post_probe':
+build/../test/dm/test-uclass.c:87: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `test_init':
+build/../test/dm/test-uclass.c:104: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `test_pre_probe':
+build/../test/dm/test-uclass.c:61: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `test_post_bind':
+build/../test/dm/test-uclass.c:39: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_autobind':
+build/../test/dm/core.c:120: undefined reference to `ut_failf'
+build/../test/dm/core.c:127: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_uclass':
+build/../test/dm/core.c:505: undefined reference to `ut_fail'
+build/../test/dm/core.c:509: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_autobind_uclass_pdata_alloc':
+build/../test/dm/core.c:140: undefined reference to `ut_failf'
+build/../test/dm/core.c:155: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_autobind_uclass_pdata_valid':
+build/../test/dm/core.c:181: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_autoprobe':
+build/../test/dm/core.c:198: undefined reference to `ut_fail'
+build/../test/dm/core.c:215: undefined reference to `ut_failf'
+build/../test/dm/core.c:246: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_pre_reloc':
+build/../test/dm/core.c:643: undefined reference to `ut_failf'
+build/../test/dm/core.c:647: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_remove':
+build/../test/dm/core.c:452: undefined reference to `ut_fail'
+build/../test/dm/core.c:455: undefined reference to `ut_failf'
+build/../test/dm/core.c:456: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_lifecycle':
+build/../test/dm/core.c:313: undefined reference to `ut_fail'
+build/../test/dm/core.c:324: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_ordering':
+build/../test/dm/core.c:376: undefined reference to `ut_fail'
+build/../test/dm/core.c:380: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_uclass_before_ready':
+build/../test/dm/core.c:658: undefined reference to `ut_failf'
+build/../test/dm/core.c:664: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_uclass_devices_find_by_name':
+build/../test/dm/core.c:713: undefined reference to `ut_failf'
+build/../test/dm/core.c:714: undefined reference to `ut_fail'
+build/../test/dm/core.c:716: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_uclass_devices_get_by_name':
+build/../test/dm/core.c:773: undefined reference to `ut_failf'
+build/../test/dm/core.c:775: undefined reference to `ut_fail'
+build/../test/dm/core.c:777: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_device_get_uclass_id':
+build/../test/dm/core.c:789: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_uclass_devices_find':
+build/../test/dm/core.c:678: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_platdata':
+build/../test/dm/core.c:264: undefined reference to `ut_failf'
+build/../test/dm/core.c:265: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_uclass_devices_get':
+build/../test/dm/core.c:733: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `create_children':
+build/../test/dm/core.c:536: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_children':
+build/../test/dm/core.c:627: undefined reference to `ut_failf'
+build/../test/dm/core.c:629: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_leak_check_end':
+build/../test/dm/core.c:93: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_leak':
+build/../test/dm/core.c:490: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_check_operations':
+build/../test/dm/core.c:396: undefined reference to `ut_fail'
+build/../test/dm/core.c:408: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_operations':
+build/../test/dm/core.c:427: undefined reference to `ut_failf'
+build/../test/dm/core.c:437: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_eth':
+build/../test/dm/eth.c:34: undefined reference to `ut_failf'
+build/../test/dm/eth.c:35: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_eth_alias':
+build/../test/dm/eth.c:58: undefined reference to `ut_failf'
+build/../test/dm/eth.c:59: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_eth_prime':
+build/../test/dm/eth.c:78: undefined reference to `ut_failf'
+test/dm/built-in.o:build/../test/dm/eth.c:79: more undefined
references to `ut_failf' follow
+test/dm/built-in.o: In function `dm_test_gpio':
+build/../test/dm/gpio.c:45: undefined reference to `ut_fail'
+build/../test/dm/gpio.c:98: undefined reference to `ut_failf'
+build/../test/dm/gpio.c:99: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_gpio_requestf':
+build/../test/dm/gpio.c:138: undefined reference to `ut_failf'
+build/../test/dm/gpio.c:139: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_gpio_copy':
+build/../test/dm/gpio.c:160: undefined reference to `ut_failf'
+test/dm/built-in.o:build/../test/dm/gpio.c:161: more undefined
references to `ut_failf' follow
+test/dm/built-in.o: In function `dm_test_rtc_reset':
+build/../test/dm/rtc.c:130: undefined reference to `ut_fail'
+build/../test/dm/rtc.c:139: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_rtc_set_get':
+build/../test/dm/rtc.c:62: undefined reference to `ut_failf'
+build/../test/dm/rtc.c:65: undefined reference to `ut_fail'
+test/dm/built-in.o: In function `dm_test_rtc_dual':
+build/../test/dm/rtc.c:161: undefined reference to `ut_fail'
+build/../test/dm/rtc.c:171: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_spi_flash':
+build/../test/dm/sf.c:31: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_spi_find':
+build/../test/dm/spi.c:36: undefined reference to `ut_failf'
+build/../test/dm/spi.c:84: undefined reference to `ut_failf'
+test/dm/built-in.o: In function `dm_test_spi_xfer':
+build/../test/dm/spi.c:108: undefined reference to `ut_failf'
+test/dm/built-in.o:build/../test/dm/usb.c:21: more undefined
references to `ut_failf' follow
+collect2: error: ld returned 1 exit status
+make[1]: *** [u-boot] Error 1
+make: *** [sub-make] Error 2
w+../test/dm/eth.c: In function ‘dm_test_net_retry’:
w+../test/dm/eth.c:180:6: warning: variable ‘retval’ set but not used
[-Wunused-but-set-variable]
20: test: Return values from the asserts compatible with cmds



Regards,
Simon


More information about the U-Boot mailing list