[U-Boot] [PATCH v3 4/4] sandbox: Add basic test for command execution
Simon Glass
sjg at chromium.org
Wed Apr 4 09:18:30 CEST 2012
Hi Mike,
On Sun, Apr 1, 2012 at 12:53 PM, Mike Frysinger <vapier at gentoo.org> wrote:
> On Saturday 31 March 2012 03:30:58 Simon Glass wrote:
>> --- /dev/null
>> +++ b/test/Makefile
>>
>> +include $(TOPDIR)/config.mk
>> +
>> +LIB = $(obj)libtest.o
>> +
>> +COBJS-$(CONFIG_SANDBOX) += command_ut.o
>> +
>> +COBJS := $(sort $(COBJS-y))
Not yet :-) I like what it does to object files, but it is pointless
at least for now. Will drop it.
>
> that sort actually needed ?
>
>> +SRCS := $(COBJS:.o=.c)
>> +OBJS := $(addprefix $(obj),$(COBJS))
>> +
>> +all: $(LIB) $(XOBJS)
>
> $(XOBJS) is dead code
Removed
>
>> --- /dev/null
>> +++ b/test/command_ut.c
>>
>> +#define DEBUG
>
> should comment why you've always defined this
done
>
>> +static const char test_cmd[] = "setenv list 1\n setenv list ${list}2; "
>> + "setenv list ${list}3\0"
>> + "setenv list ${list}4";
>
> i'd put the first string on a new line too to make it easier to read
Done
>
>> +static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const
>
> what is "ut" supposed to stand for ?
Unit test, as normally needed by code that is utterly tortuous.
> -mike
Regards,
Simon
More information about the U-Boot
mailing list