From nobody Thu May 15 13:11:48 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 150851117302355.70527612929334; Fri, 20 Oct 2017 07:52:53 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 771386A13; Fri, 20 Oct 2017 14:52:51 +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 10FE54D74A; Fri, 20 Oct 2017 14:52:51 +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 CB2E1B348A; Fri, 20 Oct 2017 14:52:50 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v9KEqjQO030370 for ; Fri, 20 Oct 2017 10:52:45 -0400 Received: by smtp.corp.redhat.com (Postfix) id 0D9C44D748; Fri, 20 Oct 2017 14:52:45 +0000 (UTC) Received: from moe.brq.redhat.com (unknown [10.43.2.192]) by smtp.corp.redhat.com (Postfix) with ESMTP id 8A7A74D732 for ; Fri, 20 Oct 2017 14:52:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 771386A13 Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx10.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=libvir-list-bounces@redhat.com From: Michal Privoznik To: libvir-list@redhat.com Date: Fri, 20 Oct 2017 16:52:20 +0200 Message-Id: <3457aa397be317e875c50b1623fd1589a9630334.1508511016.git.mprivozn@redhat.com> In-Reply-To: References: In-Reply-To: References: X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 10/11] tests: Test user set aliases for qemu 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: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.39]); Fri, 20 Oct 2017 14:52:52 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Michal Privoznik --- .../qemuxml2argv-user-aliases.args | 71 +++++++++++ .../qemuxml2argvdata/qemuxml2argv-user-aliases.xml | 140 +++++++++++++++++= ++++ tests/qemuxml2argvtest.c | 5 + .../qemuxml2xmlout-user-aliases.xml | 1 + tests/qemuxml2xmltest.c | 2 + 5 files changed, 219 insertions(+) create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-user-aliases.args create mode 100644 tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml create mode 120000 tests/qemuxml2xmloutdata/qemuxml2xmlout-user-aliases.xml diff --git a/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.args b/tests/= qemuxml2argvdata/qemuxml2argv-user-aliases.args new file mode 100644 index 000000000..62fbd567b --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.args @@ -0,0 +1,71 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/home/test \ +USER=3Dtest \ +LOGNAME=3Dtest \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name gentoo \ +-S \ +-M pc-i440fx-1.4 \ +-m 4096 \ +-smp 4,sockets=3D4,cores=3D1,threads=3D1 \ +-object memory-backend-file,id=3Dram-node0,prealloc=3Dyes,\ +mem-path=3D/dev/hugepages1G/libvirt/qemu/-1-gentoo,size=3D1073741824 \ +-numa node,nodeid=3D0,cpus=3D0,memdev=3Dram-node0 \ +-object memory-backend-file,id=3Dram-node1,prealloc=3Dyes,\ +mem-path=3D/dev/hugepages1G/libvirt/qemu/-1-gentoo,size=3D1073741824 \ +-numa node,nodeid=3D1,cpus=3D1,memdev=3Dram-node1 \ +-object memory-backend-file,id=3Dram-node2,prealloc=3Dyes,\ +mem-path=3D/dev/hugepages1G/libvirt/qemu/-1-gentoo,size=3D1073741824 \ +-numa node,nodeid=3D2,cpus=3D2,memdev=3Dram-node2 \ +-object memory-backend-file,id=3Dram-node3,prealloc=3Dyes,\ +mem-path=3D/dev/hugepages1G/libvirt/qemu/-1-gentoo,size=3D1073741824 \ +-numa node,nodeid=3D3,cpus=3D3,memdev=3Dram-node3 \ +-uuid a75aca4b-a02f-2bcb-4a91-c93cd848c34b \ +-nodefaults \ +-chardev socket,id=3Dcharmonitor,path=3D/tmp/lib/domain--1-gentoo/monitor.= sock,\ +server,nowait \ +-mon chardev=3Dcharmonitor,id=3Dmonitor,mode=3Dreadline \ +-global PIIX4_PM.disable_s3=3D0 \ +-global PIIX4_PM.disable_s4=3D0 \ +-boot cd \ +-device virtio-serial-pci,id=3Dvirtio-serial0,bus=3Dpci.0,addr=3D0x8 \ +-usb \ +-drive file=3D/var/lib/libvirt/images/fd.img,format=3Draw,if=3Dnone,\ +id=3Ddrive-ua-myDisk1,cache=3Dnone \ +-global isa-fdc.driveA=3Ddrive-ua-myDisk1 \ +-drive file=3D/var/lib/libvirt/images/gentoo.qcow2,format=3Dqcow2,if=3Dnon= e,\ +id=3Ddrive-ua-myDisk2 \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x5,drive=3Ddrive-ua-myDisk2,id= =3Dua-myDisk2 \ +-drive file=3D/var/lib/libvirt/images/OtherDemo.img,format=3Dqcow2,if=3Dno= ne,\ +id=3Ddrive-ua-myEncryptedDisk1 \ +-device virtio-blk-pci,bus=3Dpci.0,addr=3D0x7,drive=3Ddrive-ua-myEncrypted= Disk1,\ +id=3Dua-myEncryptedDisk1 \ +-drive file=3D/home/zippy/tmp/install-amd64-minimal-20140619.iso,format=3D= raw,\ +if=3Dnone,media=3Dcdrom,id=3Ddrive-ua-WhatAnAwesomeCDROM,readonly=3Don,cac= he=3Dnone \ +-device ide-drive,bus=3Dua-DoesAnybodyStillUseIDE.1,unit=3D0,\ +drive=3Ddrive-ua-WhatAnAwesomeCDROM,id=3Dua-WhatAnAwesomeCDROM \ +-device virtio-net-pci,vlan=3D0,id=3Dua-CheckoutThisNIC,mac=3D52:54:00:d6:= c0:0b,\ +bus=3Dpci.0,addr=3D0x3 \ +-net tap,fd=3D3,vlan=3D0,name=3Dhostua-CheckoutThisNIC \ +-device rtl8139,vlan=3D1,id=3Dua-WeCanAlsoDoServerMode,mac=3D52:54:00:22:c= 9:42,\ +bus=3Dpci.0,addr=3D0x9 \ +-net socket,listen=3D127.0.0.1:1234,vlan=3D1,name=3Dhostua-WeCanAlsoDoServ= erMode \ +-device rtl8139,vlan=3D2,id=3Dua-AndAlsoClientMode,mac=3D52:54:00:8c:b1:f8= ,bus=3Dpci.0,\ +addr=3D0xa \ +-net socket,connect=3D127.0.0.1:1234,vlan=3D2,name=3Dhostua-AndAlsoClientM= ode \ +-chardev pty,id=3Dcharserial0 \ +-device isa-serial,chardev=3Dcharserial0,id=3Dserial0 \ +-chardev pty,id=3Dcharserial1 \ +-device isa-serial,chardev=3Dcharserial1,id=3Dserial1 \ +-chardev socket,id=3Dcharchannel0,\ +path=3D/var/lib/libvirt/qemu/channel/target/gentoo.org.qemu.guest_agent.0,= server,\ +nowait \ +-device virtserialport,bus=3Dvirtio-serial0.0,nr=3D1,chardev=3Dcharchannel= 0,\ +id=3Dchannel0,name=3Dorg.qemu.guest_agent.0 \ +-vnc 127.0.0.1:0 \ +-vga cirrus \ +-device intel-hda,id=3Dsound0,bus=3Dpci.0,addr=3D0x4 \ +-device hda-duplex,id=3Dsound0-codec0,bus=3Dsound0.0,cad=3D0 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x6 diff --git a/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml b/tests/q= emuxml2argvdata/qemuxml2argv-user-aliases.xml new file mode 100644 index 000000000..d1cb8fea6 --- /dev/null +++ b/tests/qemuxml2argvdata/qemuxml2argv-user-aliases.xml @@ -0,0 +1,140 @@ + + gentoo + a75aca4b-a02f-2bcb-4a91-c93cd848c34b + 4194304 + 4194304 + + + + + + 4 + + hvm + + + + + + + + + + + + + + + + + + destroy + restart + restart + + + + + + /usr/bin/qemu-system-x86_64 + + + + + +
+ + + + + + +
+ + + + + + + + + +
+ + + + + + + + +
+ + + +
+ + + + +
+ + +
+ + + + + + +
+ + + + + + + + + + +
+ + + + + + +
+ + + + + + + + + + + + + +
+ + + + + + + +
+ +