cmdlib: Update exists function to exit with TCONF
PATCH 1/1 cmdlib: Update exists function to exit with TCONF
The exists function which tests the existence of a command was returning an error.
Update it to return TCONF and exit with the value 32.
Signed-off-by Kory Maincent <[email protected]>
---
This function is only used by ftp01.sh test.
The real effort should be to rewrite ftp01 test to the new API, but I did not manage to do it properly and makes it compatible with the other ftp clients.
testcases/lib/cmdlib.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/lib/cmdlib.sh +2 -2
@@ -103,8 +103,8 @@ exists() { for cmd in $*; do if ! command -v $cmd >/dev/null 2>&1; then - end_testcase "$cmd: command not found" - exit 1 + tst_brkm TCONF NULL "$1: command $2 not found." + exit 32 fi done }
Signature · 1 line
2.17.1
PATCH 1/1 cmdlib: Update exists function to exit with TCONF
Hi!
testcases/lib/cmdlib.sh exists() · line 107
Quoted 2 lines
testcases/lib/cmdlib.sh +2
-0+ tst_brkm TCONF NULL "$1: command $2 not found." + exit 32
I've changed this to tst_resm, since it does not make any sense to use the tst_brkm from apicmds and it only makes the code more confusing with parameters that are not used at all.
And pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]