From nobody Sun Feb 8 18:28:27 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) client-ip=207.211.31.120; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1587225519; cv=none; d=zohomail.com; s=zohoarc; b=cC0L/AtBqDW2lP7EhqQE97/ygQ/CmP37KgACBnBcpkTJU62bkM9gXNz6gzqI/sPSut+UGHrl8IRH7EJsQyMnuo1GGVwkZOdb9I0b8uFIroQnXZ3j+Mm9JEHYRpmm+XEc6zg5IlNE5CP/rZ3xSGj1f4F09vwwJSo7VtuLdpCj+DM= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1587225519; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:To; bh=xnb4sFgOUU1LwSBgOfQudkTaUs4BvFbOPxkobdkTkqc=; b=d4jc/e20j9hiU/Pac/yNAUjeasONY3d0/yFMqhvoSpqm3XV6tVm4sEkaPOibJlxwobajTZ/nLZ+Wf6tdtmO/F2P1G/MHwZhLNUhGzgCVE2jpaVe1vUAK1uMBFso5bicOBJlvqQtJSjbrnrrHQu+Ke1FfRjL83xX6C3Wccl4iPeM= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 207.211.31.120 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Return-Path: Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by mx.zohomail.com with SMTPS id 1587225519196204.1854873622542; Sat, 18 Apr 2020 08:58:39 -0700 (PDT) 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-375-DGhARhRfNU-YTCNPH46WdA-1; Sat, 18 Apr 2020 11:58:35 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id EBBB08018A3; Sat, 18 Apr 2020 15:58:29 +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 B3C4F5D9C5; Sat, 18 Apr 2020 15:58:29 +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 C230393519; Sat, 18 Apr 2020 15:58:28 +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 03IFwRq3006037 for ; Sat, 18 Apr 2020 11:58:27 -0400 Received: by smtp.corp.redhat.com (Postfix) id A3BCC5C578; Sat, 18 Apr 2020 15:58:27 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-12-49.pek2.redhat.com [10.72.12.49]) by smtp.corp.redhat.com (Postfix) with ESMTP id 1E9235C28F; Sat, 18 Apr 2020 15:58:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1587225517; 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=xnb4sFgOUU1LwSBgOfQudkTaUs4BvFbOPxkobdkTkqc=; b=Y9EXT/fqN5gEM7w3ki522bEhnBP++mJjDRvguyv3XkKn4ZAI4FwH+idAmoKvUeDEFZjeHX reHwAPClmMcq8RpDK838uurh714B9Vf9JEEjFw5z4wOEmq0graYCm1FFPP6/Eiq1y/kwgY gzfDTg1JjzssfnHNcSHRUR5OwMyKSfU= X-MC-Unique: DGhARhRfNU-YTCNPH46WdA-1 From: Han Han To: libvir-list@redhat.com Subject: [PATCH 3/4] tests: Tests for io mode io_uring Date: Sat, 18 Apr 2020 23:57:53 +0800 Message-Id: <20200418155754.186926-4-hhan@redhat.com> In-Reply-To: <20200418155754.186926-1-hhan@redhat.com> References: <20200418155754.186926-1-hhan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-loop: libvir-list@redhat.com Cc: pkrempa@redhat.com, Han Han 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.79 on 10.5.11.14 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" Signed-off-by: Han Han Reviewed-by: Peter Krempa --- tests/qemublocktest.c | 1 + ...le-backing_basic-aio_io_uring-srconly.json | 44 +++++++++++++ .../file-backing_basic-aio_io_uring.json | 66 +++++++++++++++++++ .../file-backing_basic-aio_io_uring.xml | 47 +++++++++++++ .../disk-aio-io_uring.x86_64-latest.args | 40 +++++++++++ tests/qemuxml2argvdata/disk-aio-io_uring.xml | 30 +++++++++ tests/qemuxml2argvtest.c | 1 + .../disk-aio-io_uring.x86_64-latest.xml | 39 +++++++++++ tests/qemuxml2xmltest.c | 1 + 9 files changed, 269 insertions(+) create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio= _io_uring-srconly.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio= _io_uring.json create mode 100644 tests/qemublocktestdata/xml2json/file-backing_basic-aio= _io_uring.xml create mode 100644 tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.= args create mode 100644 tests/qemuxml2argvdata/disk-aio-io_uring.xml create mode 100644 tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-lates= t.xml diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index f9fbfc98..80018075 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1199,6 +1199,7 @@ mymain(void) TEST_DISK_TO_JSON("dir-fat-floppy"); TEST_DISK_TO_JSON("file-raw-aio_native"); TEST_DISK_TO_JSON("file-backing_basic-aio_threads"); + TEST_DISK_TO_JSON("file-backing_basic-aio_io_uring"); TEST_DISK_TO_JSON("file-raw-luks"); TEST_DISK_TO_JSON("file-qcow2-backing-chain-noopts"); TEST_DISK_TO_JSON("file-qcow2-backing-chain-unterminated"); diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uri= ng-srconly.json b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_i= o_uring-srconly.json new file mode 100644 index 00000000..65a3773b --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uring-srco= nly.json @@ -0,0 +1,44 @@ +( + source only properties: + { + "driver": "file", + "filename": "/var/lib/libvirt/images/a" + } + backing store string: + /var/lib/libvirt/images/a +) +( + source only properties: + { + "driver": "file", + "filename": "/var/lib/libvirt/images/b" + } + backing store string: + /var/lib/libvirt/images/b +) +( + source only properties: + { + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ] + } + backing store string: + gluster://test.org:24007/images/c +) +( + source only properties: + { + "driver": "file", + "filename": "/var/lib/libvirt/images/d" + } + backing store string: + /var/lib/libvirt/images/d +) diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uri= ng.json b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uring.= json new file mode 100644 index 00000000..f510c43e --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uring.json @@ -0,0 +1,66 @@ +{ + "node-name": "node-a-f", + "read-only": false, + "driver": "qcow", + "file": "node-a-s", + "backing": "node-b-f" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/a", + "aio": "io_uring", + "node-name": "node-a-s", + "auto-read-only": true, + "discard": "unmap" +} +{ + "node-name": "node-b-f", + "read-only": true, + "driver": "qed", + "file": "node-b-s", + "backing": "node-c-f" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/b", + "aio": "io_uring", + "node-name": "node-b-s", + "auto-read-only": true, + "discard": "unmap" +} +{ + "node-name": "node-c-f", + "read-only": true, + "driver": "vmdk", + "file": "node-c-s", + "backing": "node-d-f" +} +{ + "driver": "gluster", + "volume": "images", + "path": "c", + "server": [ + { + "type": "inet", + "host": "test.org", + "port": "24007" + } + ], + "node-name": "node-c-s", + "auto-read-only": true, + "discard": "unmap" +} +{ + "node-name": "node-d-f", + "read-only": true, + "driver": "raw", + "file": "node-d-s" +} +{ + "driver": "file", + "filename": "/var/lib/libvirt/images/d", + "aio": "io_uring", + "node-name": "node-d-s", + "auto-read-only": true, + "discard": "unmap" +} diff --git a/tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uri= ng.xml b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uring.x= ml new file mode 100644 index 00000000..610c091f --- /dev/null +++ b/tests/qemublocktestdata/xml2json/file-backing_basic-aio_io_uring.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args b/= tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args new file mode 100644 index 00000000..c8fc8fe5 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-aio-io_uring.x86_64-latest.args @@ -0,0 +1,40 @@ +LC_ALL=3DC \ +PATH=3D/bin \ +HOME=3D/tmp/lib/domain--1-QEMUGuest1 \ +USER=3Dtest \ +LOGNAME=3Dtest \ +XDG_DATA_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.local/share \ +XDG_CACHE_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.cache \ +XDG_CONFIG_HOME=3D/tmp/lib/domain--1-QEMUGuest1/.config \ +QEMU_AUDIO_DRV=3Dnone \ +/usr/bin/qemu-system-x86_64 \ +-name guest=3DQEMUGuest1,debug-threads=3Don \ +-S \ +-object secret,id=3DmasterKey0,format=3Draw,\ +file=3D/tmp/lib/domain--1-QEMUGuest1/master-key.aes \ +-machine pc,accel=3Dtcg,usb=3Doff,dump-guest-core=3Doff \ +-cpu qemu64 \ +-m 214 \ +-overcommit mem-lock=3Doff \ +-smp 1,sockets=3D1,cores=3D1,threads=3D1 \ +-uuid c7a5fdbd-edaf-9455-926a-d65c16db1809 \ +-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 \ +-no-acpi \ +-boot strict=3Don \ +-device piix3-usb-uhci,id=3Dusb,bus=3Dpci.0,addr=3D0x1.0x2 \ +-blockdev '{"driver":"host_device","filename":"/dev/HostVG/QEMUGuest1",\ +"aio":"io_uring","node-name":"libvirt-1-storage","auto-read-only":true,\ +"discard":"unmap"}' \ +-blockdev '{"node-name":"libvirt-1-format","read-only":false,"driver":"qco= w2",\ +"file":"libvirt-1-storage"}' \ +-device ide-hd,bus=3Dide.0,unit=3D0,drive=3Dlibvirt-1-format,id=3Dide0-0-0= ,bootindex=3D1 \ +-device virtio-balloon-pci,id=3Dballoon0,bus=3Dpci.0,addr=3D0x2 \ +-sandbox on,obsolete=3Ddeny,elevateprivileges=3Ddeny,spawn=3Ddeny,\ +resourcecontrol=3Ddeny \ +-msg timestamp=3Don diff --git a/tests/qemuxml2argvdata/disk-aio-io_uring.xml b/tests/qemuxml2a= rgvdata/disk-aio-io_uring.xml new file mode 100644 index 00000000..b067cc72 --- /dev/null +++ b/tests/qemuxml2argvdata/disk-aio-io_uring.xml @@ -0,0 +1,30 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + + + + + + + + diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c index 66472a5e..1a1b9026 100644 --- a/tests/qemuxml2argvtest.c +++ b/tests/qemuxml2argvtest.c @@ -1127,6 +1127,7 @@ mymain(void) DO_TEST("disk-aio", NONE); DO_TEST_CAPS_VER("disk-aio", "2.12.0"); DO_TEST_CAPS_LATEST("disk-aio"); + DO_TEST_CAPS_LATEST("disk-aio-io_uring"); DO_TEST("disk-source-pool", NONE); DO_TEST("disk-source-pool-mode", NONE); DO_TEST("disk-ioeventfd", diff --git a/tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml b= /tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml new file mode 100644 index 00000000..54beeb4c --- /dev/null +++ b/tests/qemuxml2xmloutdata/disk-aio-io_uring.x86_64-latest.xml @@ -0,0 +1,39 @@ + + QEMUGuest1 + c7a5fdbd-edaf-9455-926a-d65c16db1809 + 219100 + 219100 + 1 + + hvm + + + + qemu64 + + + destroy + restart + destroy + + /usr/bin/qemu-system-x86_64 + + + + +
+ + +
+ + +
+ + + + + +
+ + + diff --git a/tests/qemuxml2xmltest.c b/tests/qemuxml2xmltest.c index cf5abeac..4e43fa6f 100644 --- a/tests/qemuxml2xmltest.c +++ b/tests/qemuxml2xmltest.c @@ -312,6 +312,7 @@ mymain(void) DO_TEST("migrate", NONE); DO_TEST("qemu-ns-no-env", NONE); DO_TEST("disk-aio", NONE); + DO_TEST_CAPS_LATEST("disk-aio-io_uring"); DO_TEST("disk-cdrom", NONE); DO_TEST_CAPS_LATEST("disk-cdrom-empty-network-invalid"); DO_TEST("disk-cdrom-bus-other", NONE); --=20 2.25.0