From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6554383441176035328 X-Received: by 2002:a19:b5d9:: with SMTP id g86-v6mr190836lfk.1.1526061319552; Fri, 11 May 2018 10:55:19 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a2e:868c:: with SMTP id l12-v6ls1219814lji.4.gmail; Fri, 11 May 2018 10:55:18 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoOqFTcnLzxTN9mJQdiJtHTgV7RPbenvzbJyIn2FIhNff+RF6HqWwvM8NbjN0/q8gWJqxWs X-Received: by 2002:a2e:320d:: with SMTP id y13-v6mr435637ljy.42.1526061318974; Fri, 11 May 2018 10:55:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526061318; cv=none; d=google.com; s=arc-20160816; b=FMH1Iy3px34uT/8GNCAeuGVQoIThyn5TuHtT6iAEYDYBeQbLeeugv2ATZBooCms+A4 hZzlE6bansaL8zVQXASQK6o4q0ISQtWTEuOazH4tHFIf6eFN0ibUj2VR+9AaSxb5R1Ad dqJelVBeQezK5uHXlvSDOO/hy/Ut44c+ahK4QPZL5axNK2CROMvFV3PX5AEDZX41vYlw 4dIi74pkCn8S+BpxYJiZOkkRIURscdZn3T5iWYf/yLCoTvBdqZ/WV9Y+7KB7vKTSIkbd ZMNb6yAi8/B8Ly26bbsnmSUmtfmZjG2KLcTzaxHLXuK7WwdiI4BxBeiqfdTxQVZay3rl 7DOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=20TCwqioKZdWhNOiF8tAtxzESk4UQDr0LWBcXox7jrc=; b=t/zVnz/28VNu7+ta2Jo9XoWD6+cedkDE+gVA2gJRO8yZnIJfYB1HE67i5+IDLhEmXu SO1RzVgwc1iE0xL2JbVaeJTmUqIMWoQh5ABMNSe+dJwU0xIOwrBYdooiF09ybrGZ75+F BjykcVx7NvoFiT78e+AjWjA/fMlCUQZj2GNLYRPgA3UegbvT4N5lS1v51TO43J30mC7B AxjCIXdM2QFXdep1t073CkZWJCPquImjd94W4ff/5aDUYqkFwMMbMmZboD/3EaSQK0yW IrevUrw3u68CUWDvtoQZR41jp5ua9nSItum3t67blf3IVEF8kEPACI2/62zONCj5X1fN o9BQ== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Return-Path: Received: from aqmola.ilbers.de (aqmola.ilbers.de. [85.214.62.211]) by gmr-mx.google.com with ESMTPS id z20-v6si138691lfd.2.2018.05.11.10.55.18 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 May 2018 10:55:18 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) client-ip=85.214.62.211; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: best guess record for domain of asmirnov@ilbers.de designates 85.214.62.211 as permitted sender) smtp.mailfrom=asmirnov@ilbers.de Received: from localhost.localdomain ([188.227.110.165]) (authenticated bits=0) by aqmola.ilbers.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id w4BHsxMB002481 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 11 May 2018 19:55:06 +0200 From: Alexander Smirnov To: isar-users@googlegroups.com Cc: Alexander Smirnov Subject: [PATCH 2/2] vm_smoke_test: Add parameters Date: Fri, 11 May 2018 20:54:53 +0300 Message-Id: <20180511175453.16173-2-asmirnov@ilbers.de> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20180511175453.16173-1-asmirnov@ilbers.de> References: <20180511175453.16173-1-asmirnov@ilbers.de> X-TUID: vKVeCFvX6sHr Drop hardcoded settings from smoke test script. This provides possibility to tune it and run on various hosts without script modification. Signed-off-by: Alexander Smirnov --- scripts/vm_smoke_test | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/scripts/vm_smoke_test b/scripts/vm_smoke_test index 1524603..a88d127 100755 --- a/scripts/vm_smoke_test +++ b/scripts/vm_smoke_test @@ -6,6 +6,7 @@ CONSOLE_OUTPUT=/tmp/isar_console PID_FILE=/tmp/qemu.pid VERBOSE=1 +TIMEOUT=60 # Error codes: ES_OK=0 @@ -65,7 +66,7 @@ run_test () { start_vm -a $ARCH -d $DISTRO -o $CONSOLE_OUTPUT -p $PID_FILE echo "\n8<--" else - sleep 60 + sleep $TIMEOUT kill `cat $PID_FILE` FAIL=0 @@ -89,9 +90,15 @@ show_help() { echo " $0 [params]" echo echo "Parameters:" + echo " -o,--output FILE specify file to store console output." + echo " The default is: /tmp/isar_console" + echo " -p,--pid-file FILE specify file to store QEMU process PID." + echo " The default is: /tmp/qemu.pid" echo " -q, --quite do not display boot logs for all the targets." echo " If test failed for the specific configuration," echo " the respective boot log will be printed anyway." + echo " -t,--timeout SEC specify time in seconds to wait before stop QEMU." + echo " The default is: 60" echo " -h, --help display this message and exit." echo echo "Exit status:" @@ -110,9 +117,21 @@ do show_help exit 0 ;; + -o|--output) + CONSOLE_OUTPUT=$2 + shift + ;; + -p|--pid-file) + PID_FILE=$2 + shift + ;; -q|--quite) VERBOSE=0 ;; + -t|--timeout) + TIMEOUT=$2 + shift + ;; *) echo "error: invalid parameter '$key', please try '--help' to get list of supported parameters" exit $ES_BUG -- 2.1.4