[CRIU] [PATCH 12/12] test/zdtm.sh: check for extra arguments

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


After parsing options we expect either 0 or 1 arguments, no more.

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

diff --git a/test/zdtm.sh b/test/zdtm.sh
index f5fa063..3343788 100755
--- a/test/zdtm.sh
+++ b/test/zdtm.sh
@@ -707,6 +707,11 @@ while :; do
 	esac
 done
 
+if [ $# -gt 1 ]; then
+	echo "Too many arguments: $*" 1>&2
+	exit 1
+fi
+
 if [ $COMPILE_ONLY -eq 0 ]; then
 	check_criu || exit 1
 fi
-- 
1.8.1.4



More information about the CRIU mailing list