From nobody Sat Apr 27 01:05:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) client-ip=207.211.31.81; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.81 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=linux.ibm.com Return-Path: Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [207.211.31.81]) by mx.zohomail.com with SMTPS id 1580745592371394.6401387069096; Mon, 3 Feb 2020 07:59:52 -0800 (PST) Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-293-JjH9lVNuNyS8DKKCWcnscg-1; Mon, 03 Feb 2020 10:59:48 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 1207F1005502; Mon, 3 Feb 2020 15:59:39 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E0072100EBB2; Mon, 3 Feb 2020 15:59:38 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 7634B81737; Mon, 3 Feb 2020 15:59:38 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 013Fxav1013432 for ; Mon, 3 Feb 2020 10:59:36 -0500 Received: by smtp.corp.redhat.com (Postfix) id 579D7A318C; Mon, 3 Feb 2020 15:59:36 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast03.extmail.prod.ext.rdu2.redhat.com [10.11.55.19]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 533D89C632 for ; Mon, 3 Feb 2020 15:59:36 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 39EC9801022 for ; Mon, 3 Feb 2020 15:59:36 +0000 (UTC) Received: from mx0a-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-394-y-mtkPqGO5qcS2QuqdzK0g-1; Mon, 03 Feb 2020 10:59:32 -0500 Received: from pps.filterd (m0098417.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 013Fik3u031003; Mon, 3 Feb 2020 10:59:30 -0500 Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xxhf6usa9-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Feb 2020 10:59:30 -0500 Received: from m0098417.ppops.net (m0098417.ppops.net [127.0.0.1]) by pps.reinject (8.16.0.36/8.16.0.36) with SMTP id 013FuFkH000881; Mon, 3 Feb 2020 10:59:29 -0500 Received: from ppma01wdc.us.ibm.com (fd.55.37a9.ip4.static.sl-reverse.com [169.55.85.253]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xxhf6us9v-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Feb 2020 10:59:29 -0500 Received: from pps.filterd (ppma01wdc.us.ibm.com [127.0.0.1]) by ppma01wdc.us.ibm.com (8.16.0.27/8.16.0.27) with SMTP id 013FpbFH001552; Mon, 3 Feb 2020 15:59:29 GMT Received: from b03cxnp08028.gho.boulder.ibm.com (b03cxnp08028.gho.boulder.ibm.com [9.17.130.20]) by ppma01wdc.us.ibm.com with ESMTP id 2xw0y5t141-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 03 Feb 2020 15:59:28 +0000 Received: from b03ledav004.gho.boulder.ibm.com (b03ledav004.gho.boulder.ibm.com [9.17.130.235]) by b03cxnp08028.gho.boulder.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 013FxRGf53477854 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Mon, 3 Feb 2020 15:59:27 GMT Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id CDC707805E; Mon, 3 Feb 2020 15:59:27 +0000 (GMT) Received: from b03ledav004.gho.boulder.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 733397805F; Mon, 3 Feb 2020 15:59:27 +0000 (GMT) Received: from newfield.pok.ibm.com (unknown [9.47.158.66]) by b03ledav004.gho.boulder.ibm.com (Postfix) with ESMTP; Mon, 3 Feb 2020 15:59:27 +0000 (GMT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580745591; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=mnwmO6IXVVpbT6tktTrADrg5YBrogVPCjLZPPYDTVPk=; b=DKekkSnbh0V3F+S7nFfya0MYp3aFDVFdBZIAK5t0afukusHGEoEXNQTags1bmETwVM930+ mbz2ah3MbEh8+o6kaUrG6LC6JJEE1dTwmb4SljWBkv3qEHy4P7pGYHobdCtcYj1GdmwGTi kjWUez+bWckV4RraTRSL6wp4XC2Ipek= From: Stefan Berger To: libvir-list@redhat.com Subject: [PATCH v2 6/6] tests: Add test for domain XML with tpm-spapr TPM device model Date: Mon, 3 Feb 2020 10:59:21 -0500 Message-Id: <20200203155921.127300-7-stefanb@linux.ibm.com> In-Reply-To: <20200203155921.127300-1-stefanb@linux.ibm.com> References: <20200203155921.127300-1-stefanb@linux.ibm.com> MIME-Version: 1.0 X-TM-AS-GCONF: 00 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138, 18.0.572 definitions=2020-02-03_05:2020-02-02, 2020-02-03 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 mlxscore=0 priorityscore=1501 clxscore=1015 mlxlogscore=999 spamscore=0 malwarescore=0 phishscore=0 bulkscore=0 impostorscore=0 suspectscore=1 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1911200001 definitions=main-2002030118 X-MIME-Autoconverted: from 8bit to quoted-printable by mx0a-001b2d01.pphosted.com id 013Fik3u031003 X-MC-Unique: y-mtkPqGO5qcS2QuqdzK0g-1 X-MC-Unique: JjH9lVNuNyS8DKKCWcnscg-1 X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-MIME-Autoconverted: from quoted-printable to 8bit by lists01.pubmisc.prod.ext.phx2.redhat.com id 013Fxav1013432 X-loop: libvir-list@redhat.com Cc: aik@ozlabs.ru, marcandre.lureau@redhat.com, Stefan Berger , jtomko@redhat.com, david@gibson.dropbear.id.au X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) Content-Type: text/plain; charset="utf-8" This patch adds a test case for domain XML with the tpm-spapr TPM device model. Signed-off-by: Stefan Berger Reviewed-by: Marc-Andr=C3=A9 Lureau --- .../tpm-emulator-spapr.ppc64-latest.args | 45 ++++++++++++++ tests/qemuxml2argvdata/tpm-emulator-spapr.xml | 60 +++++++++++++++++++ tests/qemuxml2argvtest.c | 4 ++ 3 files changed, 109 insertions(+) create mode 100644 tests/qemuxml2argvdata/tpm-emulator-spapr.ppc64-latest.= args create mode 100644 tests/qemuxml2argvdata/tpm-emulator-spapr.xml diff --git a/tests/qemuxml2argvdata/tpm-emulator-spapr.ppc64-latest.args b/= tests/qemuxml2argvdata/tpm-emulator-spapr.ppc64-latest.args new file mode 100644 index 0000000000..f4c8a062c1 --- /dev/null +++ b/tests/qemuxml2argvdata/tpm-emulator-spapr.ppc64-latest.args @@ -0,0 +1,45 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-TPM-VM \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-TPM-VM/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-TPM-VM/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-TPM-VM/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-ppc64 \ +-name guest=3DTPM-VM,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-TPM-VM/master-key.aes \ +-machine pseries-5.0,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu POWER9 \ +-m 2048 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 11d7cd22-da89-3094-6212-079a48a309a1 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot menu=3Don,strict=3Don \ +-device pci-ohci,id=3Dusb,bus=3Dpci.0,addr=3D0x1 \ +-device spapr-vscsi,id=3Dscsi0,reg=3D0x00002000 \ +-device spapr-vscsi,id=3Dscsi1,reg=3D0x00003000 \ +-drive file=3D/tmp/scsidisk.img,format=3Draw,if=3Dnone,id=3Ddrive-scsi1-0-= 0-0 \ +-device scsi-hd,bus=3Dscsi1.0,channel=3D0,scsi-id=3D0,lun=3D0,\ +device_id=3Ddrive-scsi1-0-0-0,drive=3Ddrive-scsi1-0-0-0,id=3Dscsi1-0-0-0,b= ootindex=3D1 \ +-chardev pty,id=3Dcharserial0 \ +-device spapr-vty,chardev=3Dcharserial0,id=3Dserial0,reg=3D0x30000000 \ +-chardev pty,id=3Dcharserial1 \ +-device spapr-vty,chardev=3Dcharserial1,id=3Dserial1,reg=3D0x30001000 \ +-tpmdev emulator,id=3Dtpm-tpm0,chardev=3Dchrtpm \ +-chardev socket,id=3Dchrtpm,path=3D/dev/test \ +-device tpm-spapr,tpmdev=3Dtpm-tpm0,id=3Dtpm0,reg=3D0x00005000 \ +-global spapr-nvram.reg=3D0x4000 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/tpm-emulator-spapr.xml b/tests/qemuxml2= argvdata/tpm-emulator-spapr.xml new file mode 100644 index 0000000000..f9cda19727 --- /dev/null +++ b/tests/qemuxml2argvdata/tpm-emulator-spapr.xml @@ -0,0 +1,60 @@ + + TPM-VM + 11d7cd22-da89-3094-6212-079a48a309a1 + 2097152 + 512288 + 1 + + hvm + + + + + + + + destroy + restart + destroy + + /usr/bin/qemu-system-ppc64 + +
+ + + + +
+ + +
+ + + + + + + +
+ + + + +
+ + +
+ + + +
+ + + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index a36183bf34..5691317bad 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -738,6 +738,9 @@ mymain(void) # define DO_TEST_CAPS_VER(name, ver) \ DO_TEST_CAPS_ARCH_VER(name, "x86_64", ver) =20 +# define DO_TEST_CAPS_LATEST_PPC64(name) \ + DO_TEST_CAPS_ARCH_LATEST(name, "ppc64") + # define DO_TEST_CAPS_ARCH_LATEST_FAILURE(name, arch) \ DO_TEST_CAPS_ARCH_LATEST_FULL(name, arch, \ ARG_FLAGS, FLAG_EXPECT_FAILURE) @@ -2193,6 +2196,7 @@ mymain(void) DO_TEST_CAPS_LATEST("tpm-emulator"); DO_TEST_CAPS_LATEST("tpm-emulator-tpm2"); DO_TEST_CAPS_LATEST("tpm-emulator-tpm2-enc"); + DO_TEST_CAPS_LATEST_PPC64("tpm-emulator-spapr"); =20 DO_TEST_PARSE_ERROR("pci-domain-invalid", NONE); DO_TEST_PARSE_ERROR("pci-bus-invalid", NONE); --=20 2.17.1