Message ID | 20190607090552.12434-18-alex.bennee@linaro.org |
---|---|
State | Superseded |
Headers | show
Delivered-To: patch@linaro.org Received: by 2002:a92:9e1a:0:0:0:0:0 with SMTP id q26csp390004ili; Fri, 7 Jun 2019 02:19:25 -0700 (PDT) X-Google-Smtp-Source: APXvYqzn/XANRwanGOZlgHnXwkgg6BeWif8y2nRrbImAI4BxPVphl+oVJmSxM1zdqkbZZx6vE/13 X-Received: by 2002:ac8:e05:: with SMTP id a5mr9930449qti.53.1559899165229; Fri, 07 Jun 2019 02:19:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559899165; cv=none; d=google.com; s=arc-20160816; b=a9hHOKjX2v96GyxEnYco3d9R36nhzkUyyfcjvKq4COnfrpBAB7s144wF6dej64nFgJ FTGS3NQwLly1P7Ocv1bHPSxWdDEGVn7NHNX9f4/ugz04IT+roTxsLktvoQWtfLrTAnhD SrWRkR60eUSKa3bKXPnH9S2m1tU6hxz1C8OPK9omEPrvHb5rjSpAbxk1VCbWf8CAguHk y5CKTIrecrlBhfALyEZpyA9FuBSu2T+BAIwtzqqsRfs+oyjri1TiSmRtmPU1rUgJ5bJj AzUqbSeROtN6X8bSFJJRmfy4lkdoq11XXWqNcMcIIo7r60kolu7KruzUTBUhQJ0jpZfL JC7A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:cc:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject :content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:to:from:dkim-signature; bh=1dKkut+uCfwlAn3zScZi3hqAXXCijPCSIcimV4mZPU4=; b=mKEIOFKN+7rO7kdy9x+Z+VE//DqLSQQcWoDRZaWUFT+XW93bF/yC4+6TwAlp1StGJ2 keL6DfwyeRD4dWwjV4aG+TKh2yUwFHi+7HTt4dre221MSRExlEn28FO+1NmErLuCaTPH lyqECKEErSGn56xUyo38wkRUbaWElIRkg65gPGwkgvtlf+iaE1Afs9C+VPdXolnQZfQ+ f2zM2oh1LS9dEw0KCjExC+yz9rbsC5d6A0LqVLAwamQjQ94l226GTEWHx1MC/zM9GO7e 2/M9oV7vZcYPSxSfpGod/J2bTKDhZX3KEdxdh8K5D7yhxbNaJIM5dUQHjKjEd1Wxi/7U jNGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fQ21quUU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: <qemu-devel-bounces+patch=linaro.org@nongnu.org> Received: from lists.gnu.org (lists.gnu.org. [209.51.188.47]) by mx.google.com with ESMTPS id r42si933335qtj.42.2019.06.07.02.19.25 for <patch@linaro.org> (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 07 Jun 2019 02:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) client-ip=209.51.188.47; Authentication-Results: mx.google.com; dkim=fail header.i=@linaro.org header.s=google header.b=fQ21quUU; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.47 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:47410 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <qemu-devel-bounces+patch=linaro.org@nongnu.org>) id 1hZB1v-0006Vs-0l for patch@linaro.org; Fri, 07 Jun 2019 05:19:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:39454) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from <alex.bennee@linaro.org>) id 1hZAp5-00049e-I7 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:06:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1hZAp3-0004bE-I9 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:06:07 -0400 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]:39164) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <alex.bennee@linaro.org>) id 1hZAp1-0004Tt-N9 for qemu-devel@nongnu.org; Fri, 07 Jun 2019 05:06:04 -0400 Received: by mail-wm1-x332.google.com with SMTP id z23so1125750wma.4 for <qemu-devel@nongnu.org>; Fri, 07 Jun 2019 02:06:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=1dKkut+uCfwlAn3zScZi3hqAXXCijPCSIcimV4mZPU4=; b=fQ21quUUtSkH6czkTNF2HL8KksSz6YYwc8GIMCDUXjCPgqAFUiwFbZ9BICRDH1YB6J D1bjOB1iTrT5ntEM7XD/9K9zwWWqhVV+ND7ZwlQsVRK5KQqEbNQrZWIW/K86+OdK5XgF m8+WxuwXN0F+8lOxvPEoylggxPpqEafv/DkeesFSoGw+lLOK6W43olCYe0uSUGTUCDt4 LbZs+2UYdroMh5etp9WeQBCAh8g/1f2KQfzDQFHikggKnuF8v46OxoMAHoA+BTcW7nJK Etl4lwAFZN5SyaYN/EhgcKxznf88TItc4pUXBD2KgL5A/Xv5aMEY/kDq23pwEKCanN/T Z43g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=1dKkut+uCfwlAn3zScZi3hqAXXCijPCSIcimV4mZPU4=; b=e73fM+3pZKy+c+uYIrXiGp9s3sz0oNQu7gi1V2dYHUPZJEvdU8DKImDVrhdgDQt/Jn bppl29qEH4dJwgFgnAaKEztePIATqF0TZREP5EJCpwU/07JbuHOFZe/cBPBEvyDMiStX WLT0XrSvScdyZxxLtFidVGzXJt3nXjbK2oDJk0QBUv0Diu6M0os83PHQnUVnI3Vp1KKZ QHeW3RYVUbi5LvB6ea7WOC484aCJCcoSEZFuxb3hbmUtD3UyrFWE7b73m3P5M9ZpOypT 65s/6+P9wd4oUhAFuHA8gyZxVd2pxQDcT5Kmsy5Rk+y0UHJu9ihUmRt3mf3KvBSjBMfb YJhQ== X-Gm-Message-State: APjAAAV4KOcsyKOlti1sVk7hPu5PGvGzB05F07HwFgTPzjp8/O66nYf2 mZ1jY4TmyTBSaJciLIJnQ7RWdA== X-Received: by 2002:a7b:c144:: with SMTP id z4mr3028525wmi.50.1559898362395; Fri, 07 Jun 2019 02:06:02 -0700 (PDT) Received: from zen.linaroharston ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id o14sm1312338wrp.77.2019.06.07.02.05.56 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Fri, 07 Jun 2019 02:05:58 -0700 (PDT) Received: from zen.linaroharston. (localhost [127.0.0.1]) by zen.linaroharston (Postfix) with ESMTP id 5C0FC1FFA3; Fri, 7 Jun 2019 10:05:53 +0100 (BST) From: =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> To: peter.maydell@linaro.org Date: Fri, 7 Jun 2019 10:05:16 +0100 Message-Id: <20190607090552.12434-18-alex.bennee@linaro.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190607090552.12434-1-alex.bennee@linaro.org> References: <20190607090552.12434-1-alex.bennee@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2a00:1450:4864:20::332 Subject: [Qemu-devel] [PULL 17/52] tests/vm: proper guest shutdown X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: <qemu-devel.nongnu.org> List-Unsubscribe: <https://lists.nongnu.org/mailman/options/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=unsubscribe> List-Archive: <https://lists.nongnu.org/archive/html/qemu-devel> List-Post: <mailto:qemu-devel@nongnu.org> List-Help: <mailto:qemu-devel-request@nongnu.org?subject=help> List-Subscribe: <https://lists.nongnu.org/mailman/listinfo/qemu-devel>, <mailto:qemu-devel-request@nongnu.org?subject=subscribe> Cc: Fam Zheng <fam@euphon.net>, Thomas Huth <thuth@redhat.com>, =?utf-8?q?Philippe_Mathieu-Daud=C3=A9?= <philmd@redhat.com>, qemu-devel@nongnu.org, Gerd Hoffmann <kraxel@redhat.com>, =?utf-8?q?Alex_Benn=C3=A9e?= <alex.bennee@linaro.org> Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" <qemu-devel-bounces+patch=linaro.org@nongnu.org> |
Series |
testing, gdbstub and cputlb fixes
|
expand
|
diff --git a/tests/vm/basevm.py b/tests/vm/basevm.py index 395eefaec9..f27178f3c7 100755 --- a/tests/vm/basevm.py +++ b/tests/vm/basevm.py @@ -51,6 +51,8 @@ class BaseVM(object): name = "#base" # The guest architecture, to be overridden by subclasses arch = "#arch" + # command to halt the guest, can be overridden by subclasses + poweroff = "poweroff" def __init__(self, debug=False, vcpus=None): self._guest = None self._tmpdir = os.path.realpath(tempfile.mkdtemp(prefix="vm-test-", @@ -202,6 +204,10 @@ class BaseVM(object): def wait(self): self._guest.wait() + def graceful_shutdown(self): + self.ssh_root(self.poweroff) + self._guest.wait() + def qmp(self, *args, **kwargs): return self._guest.qmp(*args, **kwargs) @@ -278,11 +284,13 @@ def main(vmcls): traceback.print_exc() return 2 - if args.interactive: - if vm.ssh(*cmd) == 0: - return 0 + exitcode = 0 + if vm.ssh(*cmd) != 0: + exitcode = 3 + if exitcode != 0 and args.interactive: vm.ssh() - return 3 - else: - if vm.ssh(*cmd) != 0: - return 3 + + if not args.snapshot: + vm.graceful_shutdown() + + return exitcode