From: Mike Frysinger Date: Sun, 1 Apr 2012 15:53:36 -0400 Subject: [U-Boot] [PATCH v3 4/4] sandbox: Add basic test for command execution In-Reply-To: <1333179058-19598-4-git-send-email-sjg@chromium.org> References: <1333179058-19598-1-git-send-email-sjg@chromium.org> <1333179058-19598-4-git-send-email-sjg@chromium.org> Message-ID: <201204011553.38999.vapier@gentoo.org> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de 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)) that sort actually needed ? > +SRCS := $(COBJS:.o=.c) > +OBJS := $(addprefix $(obj),$(COBJS)) > + > +all: $(LIB) $(XOBJS) $(XOBJS) is dead code > --- /dev/null > +++ b/test/command_ut.c > > +#define DEBUG should comment why you've always defined this > +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 > +static int do_ut_cmd(cmd_tbl_t *cmdtp, int flag, int argc, char * const what is "ut" supposed to stand for ? -mike -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. URL: