From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from firstgate.proxmox.com (firstgate.proxmox.com [212.224.123.68]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.proxmox.com (Postfix) with ESMTPS id 729AC8E2E5 for ; Fri, 11 Nov 2022 07:59:58 +0100 (CET) Received: from firstgate.proxmox.com (localhost [127.0.0.1]) by firstgate.proxmox.com (Proxmox) with ESMTP id 5AF2E2F144 for ; Fri, 11 Nov 2022 07:59:58 +0100 (CET) Received: from proxmox-new.maurer-it.com (proxmox-new.maurer-it.com [94.136.29.106]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by firstgate.proxmox.com (Proxmox) with ESMTPS for ; Fri, 11 Nov 2022 07:59:56 +0100 (CET) Received: from proxmox-new.maurer-it.com (localhost.localdomain [127.0.0.1]) by proxmox-new.maurer-it.com (Proxmox) with ESMTP id BA7EC43B14 for ; Fri, 11 Nov 2022 07:59:56 +0100 (CET) From: Dominik Csapak To: pve-devel@lists.proxmox.com Date: Fri, 11 Nov 2022 07:59:55 +0100 Message-Id: <20221111065955.460828-1-d.csapak@proxmox.com> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SPAM-LEVEL: Spam detection results: 0 AWL 0.065 Adjusted score from AWL reputation of From: address BAYES_00 -1.9 Bayes spam probability is 0 to 1% KAM_DMARC_STATUS 0.01 Test Rule for DKIM or SPF Failure with Strict Alignment SPF_HELO_NONE 0.001 SPF: HELO does not publish an SPF Record SPF_PASS -0.001 SPF: sender matches SPF record URIBL_BLOCKED 0.001 ADMINISTRATOR NOTICE: The query to URIBL was blocked. See http://wiki.apache.org/spamassassin/DnsBlocklists#dnsbl-block for more information. [8006.pid] Subject: [pve-devel] [PATCH qemu-server] tests: add tests for various combinations of configs for usb X-BeenThere: pve-devel@lists.proxmox.com X-Mailman-Version: 2.1.29 Precedence: list List-Id: Proxmox VE development discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Nov 2022 06:59:58 -0000 q35 + usb passthrough q35 + usb3 passthrough q35 + usb3 passthrough with new xhci controller old machine type + new usb config error old machine type + q35 + new usb config error old ostype (w2k) + new usb config error Signed-off-by: Dominik Csapak --- test/cfg2cmd/ostype-usb13-error.conf | 13 ++++++++++ test/cfg2cmd/q35-usb13-error.conf | 14 +++++++++++ test/cfg2cmd/q35-usb2.conf | 13 ++++++++++ test/cfg2cmd/q35-usb2.conf.cmd | 31 ++++++++++++++++++++++++ test/cfg2cmd/q35-usb3.conf | 13 ++++++++++ test/cfg2cmd/q35-usb3.conf.cmd | 32 +++++++++++++++++++++++++ test/cfg2cmd/qemu-xhci-q35-7.1.conf | 12 ++++++++++ test/cfg2cmd/qemu-xhci-q35-7.1.conf.cmd | 29 ++++++++++++++++++++++ test/cfg2cmd/usb13-error.conf | 13 ++++++++++ 9 files changed, 170 insertions(+) create mode 100644 test/cfg2cmd/ostype-usb13-error.conf create mode 100644 test/cfg2cmd/q35-usb13-error.conf create mode 100644 test/cfg2cmd/q35-usb2.conf create mode 100644 test/cfg2cmd/q35-usb2.conf.cmd create mode 100644 test/cfg2cmd/q35-usb3.conf create mode 100644 test/cfg2cmd/q35-usb3.conf.cmd create mode 100644 test/cfg2cmd/qemu-xhci-q35-7.1.conf create mode 100644 test/cfg2cmd/qemu-xhci-q35-7.1.conf.cmd create mode 100644 test/cfg2cmd/usb13-error.conf diff --git a/test/cfg2cmd/ostype-usb13-error.conf b/test/cfg2cmd/ostype-usb13-error.conf new file mode 100644 index 0000000..5c75b62 --- /dev/null +++ b/test/cfg2cmd/ostype-usb13-error.conf @@ -0,0 +1,13 @@ +# TEST: Test error for old ostype type with newer usb config +# QEMU_VERSION: 7.1.0 +# EXPECT_ERROR: using usb13 is only possible with machine type >= 7.1 and ostype l26 or windows > 7 +cores: 2 +memory: 768 +name: q35-usb3-error +net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0 +ostype: w2k +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +vga: qxl +usb13: spice diff --git a/test/cfg2cmd/q35-usb13-error.conf b/test/cfg2cmd/q35-usb13-error.conf new file mode 100644 index 0000000..a9c25eb --- /dev/null +++ b/test/cfg2cmd/q35-usb13-error.conf @@ -0,0 +1,14 @@ +# TEST: Test usb error for q35 and older machine type +# QEMU_VERSION: 4.0.0 +# EXPECT_ERROR: using usb13 is only possible with machine type >= 7.1 and ostype l26 or windows > 7 +cores: 2 +memory: 768 +name: q35-usb3-error +net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0 +ostype: l26 +machine: q35 +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +vga: qxl +usb13: spice diff --git a/test/cfg2cmd/q35-usb2.conf b/test/cfg2cmd/q35-usb2.conf new file mode 100644 index 0000000..4d9b28a --- /dev/null +++ b/test/cfg2cmd/q35-usb2.conf @@ -0,0 +1,13 @@ +# TEST: Test Q35 USB2 passthrough combination +# QEMU_VERSION: 4.0.0 +cores: 2 +memory: 768 +name: q35-usb2 +net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0 +ostype: l26 +machine: q35 +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +vga: qxl +usb1: spice diff --git a/test/cfg2cmd/q35-usb2.conf.cmd b/test/cfg2cmd/q35-usb2.conf.cmd new file mode 100644 index 0000000..825f27f --- /dev/null +++ b/test/cfg2cmd/q35-usb2.conf.cmd @@ -0,0 +1,31 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'q35-usb2,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '2,sockets=1,cores=2,maxcpus=2' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 768 \ + -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -chardev 'spicevmc,id=usbredirchardev1,name=usbredir' \ + -device 'usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=ehci.0' \ + -device 'qxl-vga,id=vga,bus=pcie.0,addr=0x1' \ + -device 'virtio-serial,id=spice,bus=pci.0,addr=0x9' \ + -chardev 'spicevmc,id=vdagent,name=vdagent' \ + -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \ + -spice 'tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \ + -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \ + -machine 'type=q35' diff --git a/test/cfg2cmd/q35-usb3.conf b/test/cfg2cmd/q35-usb3.conf new file mode 100644 index 0000000..1046e0e --- /dev/null +++ b/test/cfg2cmd/q35-usb3.conf @@ -0,0 +1,13 @@ +# TEST: Test Q35 USB3 passthrough combination +# QEMU_VERSION: 4.0.0 +cores: 2 +memory: 768 +name: q35-usb3 +net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0 +ostype: l26 +machine: q35 +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +vga: qxl +usb1: spice,usb3=1 diff --git a/test/cfg2cmd/q35-usb3.conf.cmd b/test/cfg2cmd/q35-usb3.conf.cmd new file mode 100644 index 0000000..956481f --- /dev/null +++ b/test/cfg2cmd/q35-usb3.conf.cmd @@ -0,0 +1,32 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'q35-usb3,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '2,sockets=1,cores=2,maxcpus=2' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 768 \ + -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'nec-usb-xhci,id=xhci,bus=pci.1,addr=0x1b' \ + -chardev 'spicevmc,id=usbredirchardev1,name=usbredir' \ + -device 'usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=xhci.0' \ + -device 'qxl-vga,id=vga,bus=pcie.0,addr=0x1' \ + -device 'virtio-serial,id=spice,bus=pci.0,addr=0x9' \ + -chardev 'spicevmc,id=vdagent,name=vdagent' \ + -device 'virtserialport,chardev=vdagent,name=com.redhat.spice.0' \ + -spice 'tls-port=61000,addr=127.0.0.1,tls-ciphers=HIGH,seamless-migration=on' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \ + -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \ + -machine 'type=q35' diff --git a/test/cfg2cmd/qemu-xhci-q35-7.1.conf b/test/cfg2cmd/qemu-xhci-q35-7.1.conf new file mode 100644 index 0000000..40a5901 --- /dev/null +++ b/test/cfg2cmd/qemu-xhci-q35-7.1.conf @@ -0,0 +1,12 @@ +# TEST: Test Q35 USB passthrough combination with qemu-xhci +# QEMU_VERSION: 7.1.0 +cores: 2 +memory: 768 +name: q35-qemu-xhci +net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0 +ostype: l26 +machine: pc-q35-7.1 +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +usb1: spice diff --git a/test/cfg2cmd/qemu-xhci-q35-7.1.conf.cmd b/test/cfg2cmd/qemu-xhci-q35-7.1.conf.cmd new file mode 100644 index 0000000..1c9f7d5 --- /dev/null +++ b/test/cfg2cmd/qemu-xhci-q35-7.1.conf.cmd @@ -0,0 +1,29 @@ +/usr/bin/kvm \ + -id 8006 \ + -name 'q35-qemu-xhci,debug-threads=on' \ + -no-shutdown \ + -chardev 'socket,id=qmp,path=/var/run/qemu-server/8006.qmp,server=on,wait=off' \ + -mon 'chardev=qmp,mode=control' \ + -chardev 'socket,id=qmp-event,path=/var/run/qmeventd.sock,reconnect=5' \ + -mon 'chardev=qmp-event,mode=control' \ + -pidfile /var/run/qemu-server/8006.pid \ + -daemonize \ + -smbios 'type=1,uuid=7b10d7af-b932-4c66-b2c3-3996152ec465' \ + -smp '2,sockets=1,cores=2,maxcpus=2' \ + -nodefaults \ + -boot 'menu=on,strict=on,reboot-timeout=1000,splash=/usr/share/qemu-server/bootsplash.jpg' \ + -vnc 'unix:/var/run/qemu-server/8006.vnc,password=on' \ + -cpu kvm64,enforce,+kvm_pv_eoi,+kvm_pv_unhalt,+lahf_lm,+sep \ + -m 768 \ + -readconfig /usr/share/qemu-server/pve-q35-4.0.cfg \ + -device 'vmgenid,guid=c773c261-d800-4348-9f5d-167fadd53cf8' \ + -device 'qemu-xhci,p2=15,p3=15,id=xhci,bus=pci.1,addr=0x1b' \ + -device 'usb-tablet,id=tablet,bus=ehci.0,port=1' \ + -chardev 'spicevmc,id=usbredirchardev1,name=usbredir' \ + -device 'usb-redir,chardev=usbredirchardev1,id=usbredirdev1,bus=xhci.0,port=2' \ + -device 'VGA,id=vga,bus=pcie.0,addr=0x1' \ + -device 'virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3,free-page-reporting=on' \ + -iscsi 'initiator-name=iqn.1993-08.org.debian:01:aabbccddeeff' \ + -netdev 'type=tap,id=net0,ifname=tap8006i0,script=/var/lib/qemu-server/pve-bridge,downscript=/var/lib/qemu-server/pve-bridgedown,vhost=on' \ + -device 'virtio-net-pci,mac=A2:C0:43:77:08:A1,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300' \ + -machine 'type=pc-q35-7.1+pve0' diff --git a/test/cfg2cmd/usb13-error.conf b/test/cfg2cmd/usb13-error.conf new file mode 100644 index 0000000..48dedc3 --- /dev/null +++ b/test/cfg2cmd/usb13-error.conf @@ -0,0 +1,13 @@ +# TEST: Test error for old machine type with newer usb config +# QEMU_VERSION: 4.0.0 +# EXPECT_ERROR: using usb13 is only possible with machine type >= 7.1 and ostype l26 or windows > 7 +cores: 2 +memory: 768 +name: q35-usb3-error +net0: virtio=A2:C0:43:77:08:A1,bridge=vmbr0 +ostype: l26 +scsihw: virtio-scsi-pci +smbios1: uuid=7b10d7af-b932-4c66-b2c3-3996152ec465 +vmgenid: c773c261-d800-4348-9f5d-167fadd53cf8 +vga: qxl +usb13: spice -- 2.30.2