[LTP] [PATCH 1/1] tst_test.sh: Add test cmd helper tst_test_cmds()

Cyril Hrubis chrubis@suse.cz
Mon Apr 9 15:18:52 CEST 2018


Hi!
> > +		which $1 > /dev/null 2>&1 || return 1
> Pedantic version would check $? for 127 (indicating which itself it's not found).
> Probably worth of adding it.

Are you sure?

$ which foo
...
$ echo $?
1

Also:

$ busybox which foo
$ echo $?
1


-- 
Cyril Hrubis
chrubis@suse.cz


More information about the ltp mailing list