This makes test emit an error (and fail) on e.g. test -f and also on unimplemented options like test -c /dev/null . Signed-off-by: Uwe Kleine-König <u.kleine-koenig@xxxxxxxxxxxxxx> --- commands/test.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/test.c b/commands/test.c index c4f493860f14..ab108fc845d5 100644 --- a/commands/test.c +++ b/commands/test.c @@ -208,6 +208,11 @@ static int do_test(int argc, char *argv[]) } } + if (left < adv) { + printf("test: failed to parse arguments\n"); + return 1; + } + if (last_cmp == 0) expr = last_expr || expr; else if (last_cmp == 1) -- 2.24.0 _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox