just another one of my rumblings
Cristian Ionescu-Idbohrn
cristian.ionescu-idbohrn at axis.com
Fri Apr 25 19:37:47 UTC 2008
On Fri, 25 Apr 2008, Denys Vlasenko wrote:
> Like this?
>
> - test $? = 0 || status=1
> + test $? -eq 0 || status=1
>
> Why is it an improvement?
Seems reasonable to use arithmetic conditions in arithmetic context?
> > and replaces
> > 'echo ... | grep ...' with 'expr' and some more.
> >
> > It also may introduce new bugs which I dont't know of just yet ;-)
>
> -# echo "Running test ${tsdir:-.}/${applet}.tests"
>
> This line is VERY useful. When one has a regression,
> uncommenting it is shows you what test is run.
> Deleting one char is way faster than retyping the whole
> line again.
Sorry. I've failed again :( I thought it was just a leftover. Still, it
could be improved anyway ;-) What about:
# echo "Running test ${tsdir:-.}/$applet.tests"
instead?
> - mkdir -p ".tmpdir.$applet"
> + mkdir -p ".tmpdir.$applet" || return 1
>
> mkdir may report error when dir already exist - which
> should be ignored.
Ok. I've sinned :(
mkdir -p ".tmpdir.$applet" || :
then?
> I want to also ask you to generally avoid changes
> which don't really change anything, like this one:
>
> - d="$tsdir" sh -x -e "$testcase" >"$testname.stdout.txt" 2>&1
> + d="$tsdir" sh -x -e "$testcase" > "$testname.stdout.txt" 2>&1
Alright. Point taken.
Cheers,
--
Cristian
More information about the busybox
mailing list