diff mbox series

[kvm-unit-tests,v1,1/1] run_tests: fix verbose

Message ID 20230712150645.76746-1-imbrenda@linux.ibm.com (mailing list archive)
State New, archived
Headers show
Series [kvm-unit-tests,v1,1/1] run_tests: fix verbose | expand

Commit Message

Claudio Imbrenda July 12, 2023, 3:06 p.m. UTC
The "v" and "verbose" options in getopt grew an extra :, which breaks it.

$ ./run_tests.sh -v
getopt: option requires an argument -- v
$ ./run_tests.sh --verbose
getopt: option --verbose requires an argument

Remove the unnecessary :

Fixes: 15e441c4 ("run_tests: add list tests name option on command line")
Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
---
 run_tests.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Jones July 12, 2023, 5:06 p.m. UTC | #1
On Wed, Jul 12, 2023 at 05:06:45PM +0200, Claudio Imbrenda wrote:
> The "v" and "verbose" options in getopt grew an extra :, which breaks it.
> 
> $ ./run_tests.sh -v
> getopt: option requires an argument -- v
> $ ./run_tests.sh --verbose
> getopt: option --verbose requires an argument
> 
> Remove the unnecessary :
> 
> Fixes: 15e441c4 ("run_tests: add list tests name option on command line")
> Signed-off-by: Claudio Imbrenda <imbrenda@linux.ibm.com>
> ---
>  run_tests.sh | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/run_tests.sh b/run_tests.sh
> index baf8e461..abb0ab77 100755
> --- a/run_tests.sh
> +++ b/run_tests.sh
> @@ -44,7 +44,7 @@ fi
>  
>  only_tests=""
>  list_tests=""
> -args=$(getopt -u -o ag:htj:v:l -l all,group:,help,tap13,parallel:,verbose:,list -- $*)
> +args=$(getopt -u -o ag:htj:vl -l all,group:,help,tap13,parallel:,verbose,list -- $*)
>  [ $? -ne 0 ] && exit 2;
>  set -- $args;
>  while [ $# -gt 0 ]; do
> -- 
> 2.41.0
>

Pushed, thanks!

drew
diff mbox series

Patch

diff --git a/run_tests.sh b/run_tests.sh
index baf8e461..abb0ab77 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -44,7 +44,7 @@  fi
 
 only_tests=""
 list_tests=""
-args=$(getopt -u -o ag:htj:v:l -l all,group:,help,tap13,parallel:,verbose:,list -- $*)
+args=$(getopt -u -o ag:htj:vl -l all,group:,help,tap13,parallel:,verbose,list -- $*)
 [ $? -ne 0 ] && exit 2;
 set -- $args;
 while [ $# -gt 0 ]; do