From 9407a7a3381f9fb098448af3047c8218bcfe8340 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 12 Apr 2021 14:46:12 +0200 Subject: [PATCH] tests: rbd ns: exit cleanly on help, and allow short-opt -h Signed-off-by: Thomas Lamprecht --- test/rbd_namespace.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/rbd_namespace.pl b/test/rbd_namespace.pl index 5798bf1..1609d76 100755 --- a/test/rbd_namespace.pl +++ b/test/rbd_namespace.pl @@ -47,12 +47,15 @@ GetOptions ( "use-existing" => \$use_existing, "namespace=s" => \$namespace, "vmid=i" => \$vmid, - "help" => \$showhelp, + "h|help" => \$showhelp, "cleanup" => \$cleanup, "debug" => \$DEBUG, ) or die ($helpstring); -die $helpstring if $showhelp; +if ($showhelp) { + warn $helpstring; + exit(0); +} my $storage_name = "${pool}-${namespace}"; -- 2.39.2