From nobody Mon Feb 9 02:14:23 2026 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=oracle.com ARC-Seal: i=1; a=rsa-sha256; t=1607455634; cv=none; d=zohomail.com; s=zohoarc; b=bLuGyzn+0P0hpDwQxUjkOy154m0dvnS5Oke3IN2MKA5glIV2rIfqo4yGp4p6rSdY0oEzRFRPJ6Xy/nwfz9fefzbVZBhAQHNrjba7oexQmzhZoZSa+fzUZyim669x+FYcNSY9orUaNyVFiYdvOMiQQUA+cdFrULLC9R3scr1+ZYs= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1607455634; h=Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:References:Sender:Subject:To; bh=hEapBxrb93rMy2MDuYbpH09EASrOKbuHVY2y3SczyCA=; b=g2DRQrn7HloLfizMk/VTV2mqI1shTQgX7lCxWHRmeDR0bUL8wS+nP3hNFvfbJTLraCYfdj8cuLFh/eFfdyFEsuiiPZSRpr5sOsLKPjsor7sWLJp/edeUufFQr3uyxg8xsC1uzGDUc1TS8DUJ9Ny6cRpApOWcnP0D7F5wGdkFbHw= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1607455634233612.1944752532346; Tue, 8 Dec 2020 11:27:14 -0800 (PST) Received: from localhost ([::1]:43780 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kmidl-0007Cx-1r for importer@patchew.org; Tue, 08 Dec 2020 14:27:13 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:44314) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmiTy-0000HR-Tg for qemu-devel@nongnu.org; Tue, 08 Dec 2020 14:17:08 -0500 Received: from aserp2130.oracle.com ([141.146.126.79]:38712) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kmiTu-0007om-VY for qemu-devel@nongnu.org; Tue, 08 Dec 2020 14:17:06 -0500 Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B8J9J4k107124; Tue, 8 Dec 2020 19:17:01 GMT Received: from userp3020.oracle.com (userp3020.oracle.com [156.151.31.79]) by aserp2130.oracle.com with ESMTP id 357yqbvp10-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Tue, 08 Dec 2020 19:17:01 +0000 Received: from pps.filterd (userp3020.oracle.com [127.0.0.1]) by userp3020.oracle.com (8.16.0.42/8.16.0.42) with SMTP id 0B8JAeGs015803; Tue, 8 Dec 2020 19:15:00 GMT Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by userp3020.oracle.com with ESMTP id 358kytcvb8-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 08 Dec 2020 19:15:00 +0000 Received: from abhmp0015.oracle.com (abhmp0015.oracle.com [141.146.116.21]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id 0B8JExew028398; Tue, 8 Dec 2020 19:15:00 GMT Received: from ban25x6uut148.us.oracle.com (/10.153.73.148) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Tue, 08 Dec 2020 11:14:59 -0800 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references; s=corp-2020-01-29; bh=hEapBxrb93rMy2MDuYbpH09EASrOKbuHVY2y3SczyCA=; b=M4Q5ImuyFU4a/GVoDKXEQU5dkqiytNRHjTVZTAGbXSp2dmWz+hE1wQcW6YL8E2hdH5sr DMenb4Wjh+46zsL6pKJRtyFkfSfM9LhCTbP93rrpIAoqGR3DGUrGrAqpm4+OZ9EaGRqh uolOE/ras2BGdMzRJu54A0pQZPdeXFXs9iNzRNjogKX6iR6Z5mnAj2CEcDJhhrMGSKy9 VJej5GagcGGQ3es71rhP38XmYURtv3ig8RCwc4tgjqwC/jr4TaG7FqEDE/uvbDsMbN9b H8DJg0CoFT5jJOuuAVJstGp5oCo7ouexYWS6p0kYZavWPEMs0SO22NqMvxU/Ppmb+3i+ Nw== From: Alejandro Jimenez To: qemu-devel@nongnu.org Subject: [PATCH 4/4] qtest/pvpanic: Test panic option that allows VM to continue Date: Tue, 8 Dec 2020 14:14:50 -0500 Message-Id: <1607454890-3339-5-git-send-email-alejandro.j.jimenez@oracle.com> X-Mailer: git-send-email 1.8.3.1 In-Reply-To: <1607454890-3339-1-git-send-email-alejandro.j.jimenez@oracle.com> References: <1607454890-3339-1-git-send-email-alejandro.j.jimenez@oracle.com> X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9829 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 adultscore=0 spamscore=0 mlxscore=0 malwarescore=0 suspectscore=1 mlxlogscore=999 bulkscore=0 phishscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012080117 X-Proofpoint-Virus-Version: vendor=nai engine=6000 definitions=9829 signatures=668683 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=1 mlxlogscore=999 clxscore=1015 malwarescore=0 bulkscore=0 phishscore=0 adultscore=0 spamscore=0 priorityscore=1501 mlxscore=0 lowpriorityscore=0 impostorscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2009150000 definitions=main-2012080117 Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=141.146.126.79; envelope-from=alejandro.j.jimenez@oracle.com; helo=aserp2130.oracle.com X-Spam_score_int: -43 X-Spam_score: -4.4 X-Spam_bar: ---- X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, UNPARSEABLE_RELAY=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: pbonzini@redhat.com Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: pass (identity @oracle.com) Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Test the scenario where the -action panic=3Dnone parameter is used to signal that the VM must continue executing after a guest panic occurs. Suggested-by: Paolo Bonzini Signed-off-by: Alejandro Jimenez Reviewed-by: David Edmondson Reviewed-by: Liam Merwick --- tests/qtest/pvpanic-test.c | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/tests/qtest/pvpanic-test.c b/tests/qtest/pvpanic-test.c index 016b32e..6dcad2d 100644 --- a/tests/qtest/pvpanic-test.c +++ b/tests/qtest/pvpanic-test.c @@ -11,13 +11,36 @@ #include "libqos/libqtest.h" #include "qapi/qmp/qdict.h" =20 +static void test_panic_nopause(void) +{ + uint8_t val; + QDict *response, *data; + QTestState *qts; + + qts =3D qtest_init("-device pvpanic -action panic=3Dnone"); + + val =3D qtest_inb(qts, 0x505); + g_assert_cmpuint(val, =3D=3D, 3); + + qtest_outb(qts, 0x505, 0x1); + + response =3D qtest_qmp_eventwait_ref(qts, "GUEST_PANICKED"); + g_assert(qdict_haskey(response, "data")); + data =3D qdict_get_qdict(response, "data"); + g_assert(qdict_haskey(data, "action")); + g_assert_cmpstr(qdict_get_str(data, "action"), =3D=3D, "run"); + qobject_unref(response); + + qtest_quit(qts); +} + static void test_panic(void) { uint8_t val; QDict *response, *data; QTestState *qts; =20 - qts =3D qtest_init("-device pvpanic"); + qts =3D qtest_init("-device pvpanic -action panic=3Dpause"); =20 val =3D qtest_inb(qts, 0x505); g_assert_cmpuint(val, =3D=3D, 3); @@ -40,6 +63,7 @@ int main(int argc, char **argv) =20 g_test_init(&argc, &argv, NULL); qtest_add_func("/pvpanic/panic", test_panic); + qtest_add_func("/pvpanic/panic-nopause", test_panic_nopause); =20 ret =3D g_test_run(); =20 --=20 1.8.3.1