[CRIU] [PATCH 08/12] test/zdtm.sh: move -l parsing to inside case

Kir Kolyshkin kir at openvz.org
Fri Sep 13 14:47:05 EDT 2013


It's more cleaner to have all options parsed in one place.

Signed-off-by: Kir Kolyshkin <kir at openvz.org>
---
 test/zdtm.sh | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/test/zdtm.sh b/test/zdtm.sh
index 431c7df..3058ebf 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -666,6 +666,10 @@ while :; do
 		SPECIFIED_NAME_USED=1
 		shift
 		;;
+	  -l)
+		echo $TEST_LIST | tr ' ' '\n'
+		exit 0
+		;;
 	  *)
 		break
 		;;
@@ -676,9 +680,7 @@ if [ $COMPILE_ONLY -eq 0 ]; then
 	check_criu || exit 1
 fi
 
-if [ "$1" = "-l" ]; then
-	echo $TEST_LIST | tr ' ' '\n'
-elif [ "$1" = "-h" ]; then
+if [ "$1" = "-h" ]; then
 	cat >&2 <<EOF
 This script is used for executing unit tests.
 Usage:
-- 
1.8.1.4



More information about the CRIU mailing list