From nobody Tue Feb 10 04:29:41 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) client-ip=170.10.129.124; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of redhat.com designates 170.10.129.124 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=fail(p=none dis=none) header.from=nutanix.com Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.zohomail.com with SMTPS id 1649440173925159.61417771429956; Fri, 8 Apr 2022 10:49:33 -0700 (PDT) Received: from mimecast-mx02.redhat.com (mx3-rdu2.redhat.com [66.187.233.73]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-113-ADBIS3nlMk6Mcdz0o2ZKsQ-1; Fri, 08 Apr 2022 13:49:31 -0400 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.rdu2.redhat.com [10.11.54.7]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 18C8D280B06C; Fri, 8 Apr 2022 17:49:26 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com [10.30.29.100]) by smtp.corp.redhat.com (Postfix) with ESMTP id E9254145B990; Fri, 8 Apr 2022 17:49:25 +0000 (UTC) Received: from mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (localhost [IPv6:::1]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id 697001940376; Fri, 8 Apr 2022 17:49:24 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) by mm-prod-listman-01.mail-001.prod.us-east-1.aws.redhat.com (Postfix) with ESMTP id D3217193F50A for ; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: by smtp.corp.redhat.com (Postfix) id C5993404778D; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from mimecast-mx02.redhat.com (mimecast09.extmail.prod.ext.rdu2.redhat.com [10.11.55.25]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C08664047D29 for ; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from us-smtp-1.mimecast.com (us-smtp-1.mimecast.com [205.139.110.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id A28A3282B801 for ; Fri, 8 Apr 2022 17:49:23 +0000 (UTC) Received: from mx0a-002c1b01.pphosted.com (mx0a-002c1b01.pphosted.com [148.163.151.68]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-246-T_zaGL1kOnWMFU2P3cLd4A-1; Fri, 08 Apr 2022 13:49:21 -0400 Received: from pps.filterd (m0127838.ppops.net [127.0.0.1]) by mx0a-002c1b01.pphosted.com (8.16.1.2/8.16.1.2) with ESMTP id 238EMqEs009873 for ; Fri, 8 Apr 2022 10:49:19 -0700 Received: from nam11-bn8-obe.outbound.protection.outlook.com (mail-bn8nam11lp2170.outbound.protection.outlook.com [104.47.58.170]) by mx0a-002c1b01.pphosted.com (PPS) with ESMTPS id 3f6p1yp13w-6 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Fri, 08 Apr 2022 10:49:19 -0700 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) by BY5PR02MB6533.namprd02.prod.outlook.com (2603:10b6:a03:1d5::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5144.26; Fri, 8 Apr 2022 17:49:16 +0000 Received: from SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8]) by SJ0PR02MB8564.namprd02.prod.outlook.com ([fe80::b167:3939:c2e0:64e8%6]) with mapi id 15.20.5144.023; Fri, 8 Apr 2022 17:49:16 +0000 X-MC-Unique: ADBIS3nlMk6Mcdz0o2ZKsQ-1 X-Original-To: libvir-list@listman.corp.redhat.com X-MC-Unique: T_zaGL1kOnWMFU2P3cLd4A-1 From: Rohit Kumar To: libvir-list@redhat.com Subject: [PATCH v2 8/8] Add unit test to support new 'file' type NVRAM Date: Fri, 8 Apr 2022 10:48:51 -0700 Message-Id: <20220408174851.1077477-9-rohit.kumar3@nutanix.com> In-Reply-To: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> References: <20220408174851.1077477-1-rohit.kumar3@nutanix.com> X-ClientProxiedBy: SJ0PR03CA0363.namprd03.prod.outlook.com (2603:10b6:a03:3a1::8) To SJ0PR02MB8564.namprd02.prod.outlook.com (2603:10b6:a03:3f6::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c703321a-5529-4f63-ef8b-08da1988196d X-MS-TrafficTypeDiagnostic: BY5PR02MB6533:EE_ X-Microsoft-Antispam-PRVS: x-proofpoint-crosstenant: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0 X-Microsoft-Antispam-Message-Info: q0pZJijpoXb8AwB/2LyVRL+xVrWOlIPY97k+rlEU/9GPiSoF8eutzBmU2yhpfVn3OHCr5BwLn3Gtgzajb2tyx03foefjE08MOttGMyvFcVjFHA5WsrZ7qORRMsgX5OIGQSHrWkoVG1vkKkp91TKwpeWazvWy1H/DtgMFgJnw6qujxIbvrgRLqm6SvKQG6tcXKI/hH7xGuPhhuqVl6XguITl1HYKS6Oonr+qIoZqJWoZI+tQANdTdJfGQFHSMxd1t2nn7s0Le6WQC8Y4LfeWwO6WoJ1rXoCWKPCSl6ctbTcK9Tw6I5LUxJ2CH7Q4WYH8mqzrRjYEXY3NtdMThUgDKqnG9dQNN01+93qclWLhmcf+A9pqpm2M+WtZNwJN6ub0Lzi8x+994mtnwKoPKGMwO17oBYWgy14R/WZ9ONwsBxpIMd2Fxrkz7oCcVp3NrG/1y00YZQHy32v2LuSn045GkoJMHP5pEYjY24/o03XWDD1VzmQBKqmudtKhSN86kAHgjv5seogE+H2FOpvliUULNdgyOWs6dL509VrJ3nvlq2AGZH8ZvZn050/Vhk510gMigp0ppoKGgVC2EqEtgsZp8nSuOKvKiOPqAWtXJRKKVpJ+Pf0uyR3lW/GYIcZ3FUFFozJkaCt1m8bYExHA9buC7julo+aZh2dCLZ0C+wnTZ8mv21jctI7hjD/zGhrTleuirQOPSvtn9FNm0WH6d23/Scw== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR02MB8564.namprd02.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(6666004)(38350700002)(38100700002)(6486002)(83380400001)(8936002)(508600001)(2906002)(86362001)(5660300002)(66476007)(36756003)(66556008)(2616005)(107886003)(8676002)(4326008)(66946007)(6512007)(6916009)(54906003)(26005)(186003)(52116002)(6506007)(1076003)(316002); DIR:OUT; SFP:1102 X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?ygpI1MqLeglNLHhrNorhVmFZWaD0tdx/xhTnjzUJ6KwNRVj1W8DSqyKHl5+g?= =?us-ascii?Q?rv973IsSfoYZ89n18SSnf8lqy/CncAy2/IZHJ8fEeFyTRc+Itm3Vsp/tZCRL?= =?us-ascii?Q?NTVf6Uxcoh+w4eXCEz6/8m2HUn3FTGEPgtsKHRpJuINdREdMUxotl9N1KxGp?= =?us-ascii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ingcCcyAPd/?= =?us-ascii?Q?6e5lNfKj9HjoL/857eDy5wz15D7/o5Krw3dFDSCWtT5di9B2D4/NRTxu/dFw?= =?us-ascii?Q?sciQULflykHsSYk71ynEb6Se6N0CHdSiaY78mPW7SBuO/DF7Mp4XnWww5Axw?= =?us-ascii?Q?y3EQg591Ihg/nwgZqDmPtkQ5uKbEK3T1RNnAJm+1kgC5cRd3gvSs6plsHaHK?= =?us-ascii?Q?qLIT7LjkqUT153CRtr7FxRDfwgi6RS/CDgeBshdF59waaB26d0a1sDJVahW/?= =?us-ascii?Q?pK+SWCk4DLelJ3jRrra7ivJP/MOccSpxecIwPHN83kPDtqQuJDxas0k0hMo3?= =?us-ascii?Q?NDJD0UbHCkO96GnIvpDUyb3OGhz1kIrhfakTkLTFqySKSRRcRFg+ZWL3IrsO?= =?us-ascii?Q?JxlbB5ntOAmSBg+pev1tYrg53OivXSEu/OIy9gOazLT5ee/zTH6xW7sQ1gBD?= =?us-ascii?Q?+tmqOG7pMU2tx49zif6OU4lmi/2H6JElc1SQnTHm0BgsyK+dEJZZjwEslfc8?= =?us-ascii?Q?QY1OtIDYjrqh0JjkugfNrT7iapOAfseRB4WWhWhor9Ee74c1m0JTE9s5NAFN?= =?us-ascii?Q?exeAdjg1G8wvp0isrC+S8DRBGU2nmhoZeHS77Z9TCr+bZ45y8GvcA/N10gMX?= =?us-ascii?Q?kdTTkkl5SXndREpUO33sN3OohIyOARg+zfm7ewGMKb+NcawpPDSVxPCgrOdS?= =?us-ascii?Q?waRkZEYjjZMuVrb+3eiKbwBSRvjVXmk=3D?= X-OriginatorOrg: nutanix.com X-MS-Exchange-CrossTenant-Network-Message-Id: c703321a-5529-4f63-ef8b-08da1988196d X-MS-Exchange-CrossTenant-AuthSource: SJ0PR02MB8564.namprd02.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 08 Apr 2022 17:49:16.1102 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: bb047546-786f-4de1-bd75-24e5b6f79043 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: tz+7NJs++AumbRdeWuvbybG5mxgjbucSyol3a9YC2NC5L2PM0RHLD659VoR1VF5G0PV9IwxsXzNMUSK5UPPIX4xGHGZR8/XnECGZtPUkZ9g= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY5PR02MB6533 X-Proofpoint-ORIG-GUID: GaXwEZH1K-wYW_BViFaL1TxWl7NMbGJv X-Proofpoint-GUID: GaXwEZH1K-wYW_BViFaL1TxWl7NMbGJv X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.858,Hydra:6.0.425,FMLib:17.11.64.514 definitions=2022-04-08_05,2022-04-08_01,2022-02-23_01 X-Proofpoint-Spam-Reason: safe X-Mimecast-Impersonation-Protect: Policy=CLT - Impersonation Protection Definition; Similar Internal Domain=false; Similar Monitored External Domain=false; Custom External Domain=false; Mimecast External Domain=false; Newly Observed Domain=false; Internal User Name=false; Custom Display Name List=false; Reply-to Address Mismatch=false; Targeted Threat Dictionary=false; Mimecast Threat Dictionary=false; Custom Threat Dictionary=false X-Scanned-By: MIMEDefang 2.84 on 10.11.54.2 X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: prachatos.mitra@nutanix.com, Rohit Kumar , Florian Schmidt , prerna.saxena@nutanix.com Errors-To: libvir-list-bounces@redhat.com Sender: "libvir-list" X-Scanned-By: MIMEDefang 2.85 on 10.11.54.7 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=libvir-list-bounces@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable X-ZM-MESSAGEID: 1649440175859100007 Content-Type: text/plain; charset="utf-8" This patch adds an unit test to test xml when NVRAM type 'file' is provided. Example: Signed-off-by: Prerna Saxena Signed-off-by: Florian Schmidt Signed-off-by: Rohit Kumar --- .../bios-nvram-file.x86_64-latest.args | 37 +++++++++++++++++++ tests/qemuxml2argvdata/bios-nvram-file.xml | 23 ++++++++++++ tests/qemuxml2argvtest.c | 1 + 3 files changed, 61 insertions(+) create mode 100644 tests/qemuxml2argvdata/bios-nvram-file.x86_64-latest.ar= gs create mode 100644 tests/qemuxml2argvdata/bios-nvram-file.xml diff --git a/tests/qemuxml2argvdata/bios-nvram-file.x86_64-latest.args b/te= sts/qemuxml2argvdata/bios-nvram-file.x86_64-latest.args new file mode 100644 index 0000000000..4b0aec7539 --- /dev/null +++ b/tests/qemuxml2argvdata/bios-nvram-file.x86_64-latest.args @@ -0,0 +1,37 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-test-bios \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-test-bios/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-test-bios/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-test-bios/.config \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3Dtest-bios,debug-threads=3Don \ +-S \ +-object '{"qom-type":"secret","id":"masterKey0","format":"raw","file":"/tm= p/lib/domain--1-test-bios/master-key.aes"}' \ +-blockdev '{"driver":"file","filename":"/usr/share/OVMF/OVMF_CODE.fd","nod= e-name":"libvirt-pflash0-storage","auto-read-only":true,"discard":"unmap"}'= \ +-blockdev '{"node-name":"libvirt-pflash0-format","read-only":true,"driver"= :"raw","file":"libvirt-pflash0-storage"}' \ +-blockdev '{"driver":"file","filename":"/var/lib/libvirt/nvram/guest_VARS.= fd","node-name":"libvirt-pflash1-storage","auto-read-only":true,"discard":"= unmap"}' \ +-blockdev '{"node-name":"libvirt-pflash1-format","read-only":false,"driver= ":"raw","file":"libvirt-pflash1-storage"}' \ +-machine pc,usb=3Doff,dump-guest-core=3Doff,pflash0=3Dlibvirt-pflash0-form= at,pflash1=3Dlibvirt-pflash1-format,memory-backend=3Dpc.ram \ +-accel tcg \ +-cpu qemu64 \ +-m 1024 \ +-object '{"qom-type":"memory-backend-ram","id":"pc.ram","size":1073741824}= ' \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid 362d1fc1-df7d-193e-5c18-49a71bd1da66 \ +-display none \ +-no-user-config \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,fd=3D1729,server=3Don,wait=3Doff \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dcontrol \ +-rtc base=3Dutc \ +-no-shutdown \ +-boot menu=3Don,strict=3Don \ +-device '{"driver":"piix3-usb-uhci","id":"usb","bus":"pci.0","addr":"0x1.0= x2"}' \ +-audiodev '{"id":"audio1","driver":"none"}' \ +-device '{"driver":"virtio-balloon-pci","id":"balloon0","bus":"pci.0","add= r":"0x2"}' \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,resource= control=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/bios-nvram-file.xml b/tests/qemuxml2arg= vdata/bios-nvram-file.xml new file mode 100644 index 0000000000..8df9412112 --- /dev/null +++ b/tests/qemuxml2argvdata/bios-nvram-file.xml @@ -0,0 +1,23 @@ + + test-bios + 362d1fc1-df7d-193e-5c18-49a71bd1da66 + 1048576 + 1048576 + 1 + + hvm + /usr/share/OVMF/OVMF_CODE.fd<= /loader> + + + + + + + + + + + + /usr/bin/qemu-system-x86_64 + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 7700ed6cb1..0c9881e483 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1199,6 +1199,7 @@ mymain(void) QEMU_CAPS_VIRTIO_SCSI); DO_TEST_CAPS_LATEST("bios-nvram-template"); DO_TEST_CAPS_LATEST("bios-nvram-network"); + DO_TEST_CAPS_LATEST("bios-nvram-file"); =20 /* Make sure all combinations of ACPI and UEFI behave as expected */ DO_TEST_NOCAPS("q35-acpi-uefi"); --=20 2.25.1