From 1cae9fe4e16b807ae92658a82c747ffcd02dd174 Mon Sep 17 00:00:00 2001 From: Dmitry Fomichev Date: Wed, 27 Jan 2021 13:19:45 +0900 Subject: [PATCH] t/zbd: avoid looping on invalid command line options t/zbd/test-zbd-support loops indefinitely if an unrecognized option is specified in the command line. Add a switch case to display usage and exit the script. Signed-off-by: Dmitry Fomichev Reviewed-by: Shin'ichiro Kawasaki Signed-off-by: Jens Axboe --- t/zbd/test-zbd-support | 1 + 1 file changed, 1 insertion(+) diff --git a/t/zbd/test-zbd-support b/t/zbd/test-zbd-support index 05c00900..1658dc25 100755 --- a/t/zbd/test-zbd-support +++ b/t/zbd/test-zbd-support @@ -1178,6 +1178,7 @@ while [ "${1#-}" != "$1" ]; do -q) quit_on_err=1; shift;; -z) zbd_debug=1; shift;; --) shift; break;; + *) usage; exit 1;; esac done -- 2.25.1