From nobody Mon Feb 9 05:01:42 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 63.128.21.74 as permitted sender) client-ip=63.128.21.74; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-74.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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=1584987153; cv=none; d=zohomail.com; s=zohoarc; b=cq6bgwK5hsO/iQMOfd9DQu2QgcxjEL8s5IlEIxjQBWEL2tklIHQMFTtgtZ2EnP+Hh3vVwjnz+d6vYZ42FrLCYkqUygtoqH3MEsrS9hJE5vbw9GDKFU4QF4b3cSXFYrYBn2KEd8yTWW16n5j8NSmPQpTPLOekhH6a0xQALMMJmLE= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1584987153; h=Content-Type:Content-Transfer-Encoding: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=tEC0xbXP8VbPJ5Ltj2zgT5kU6OagHOUTaMKpFqlEzMM=; b=Jb5qLnCmRUqiID29cAtG5Q1HUxn1nHMlQf/v55sGJfekHYjfPSyic4UexdGSy8Whne6lB9mSDNWGCMfYqu3SSbfp8AQCy0hHzVRkxj+BRBjCam4J7DFrRiB0lovYmEFxjTbQfXX5mag/FyaFuuhEN2RweasHwWdrl5AgOPKlonk= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 63.128.21.74 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-delivery-74.mimecast.com (us-smtp-delivery-74.mimecast.com [63.128.21.74]) by mx.zohomail.com with SMTPS id 1584987153188460.66415662688894; Mon, 23 Mar 2020 11:12:33 -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-452-_YBZMr_zM4a-QtziariGdg-1; Mon, 23 Mar 2020 14:12:29 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 4A1DA1083E85; Mon, 23 Mar 2020 18:12:24 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 1956E60BE0; Mon, 23 Mar 2020 18:12:24 +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 BD9D618089D7; Mon, 23 Mar 2020 18:12:23 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 02NICA6m009444 for ; Mon, 23 Mar 2020 14:12:10 -0400 Received: by smtp.corp.redhat.com (Postfix) id A66E29B93A; Mon, 23 Mar 2020 18:12:10 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 2BA9B9B934 for ; Mon, 23 Mar 2020 18:12:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1584987151; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=tEC0xbXP8VbPJ5Ltj2zgT5kU6OagHOUTaMKpFqlEzMM=; b=A2ukdhzuiizqMC9oZAvbHt0PU4G+nWs/v/oGfdjj4HxX7N6vaEyvH7rvdb+hZZjtcLdDEm f7sQxzFZ86/8XYn9PBsjE0HRTicRt0T+2b7xPYNIZAgPTXVo9QUxUsEp2zen/vJ8Rlqvse 8yTUtY4x6/AO+Ze66mkmgmsIOc46tq4= X-MC-Unique: _YBZMr_zM4a-QtziariGdg-1 From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 02/14] qemublocktest: xml->json: Add test for NVMe Date: Mon, 23 Mar 2020 19:11:52 +0100 Message-Id: <25769368cc32e6b5e635f51d25d3631d2c824964.1584986997.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-loop: libvir-list@redhat.com 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.12 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" Based on the configuration from the only qemuxml2argv test. Signed-off-by: Peter Krempa --- tests/qemublocktest.c | 2 ++ .../xml2json/nvme-raw-noopts-srconly.json | 5 +++++ .../xml2json/nvme-raw-noopts.json | 14 ++++++++++++++ .../qemublocktestdata/xml2json/nvme-raw-noopts.xml | 13 +++++++++++++ 4 files changed, 34 insertions(+) create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconl= y.json create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts.json create mode 100644 tests/qemublocktestdata/xml2json/nvme-raw-noopts.xml diff --git a/tests/qemublocktest.c b/tests/qemublocktest.c index fca8939fbb..4c3e05b6b5 100644 --- a/tests/qemublocktest.c +++ b/tests/qemublocktest.c @@ -1203,6 +1203,8 @@ mymain(void) TEST_DISK_TO_JSON("block-raw-noopts"); TEST_DISK_TO_JSON("block-raw-reservations"); + TEST_DISK_TO_JSON("nvme-raw-noopts"); + #define TEST_JSON_TO_JSON(nme) \ do { \ jsontojsondata.name =3D nme; \ diff --git a/tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json = b/tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json new file mode 100644 index 0000000000..ed55c08cbf --- /dev/null +++ b/tests/qemublocktestdata/xml2json/nvme-raw-noopts-srconly.json @@ -0,0 +1,5 @@ +{ + "driver": "nvme", + "device": "0000:01:00.0", + "namespace": 1 +} diff --git a/tests/qemublocktestdata/xml2json/nvme-raw-noopts.json b/tests/= qemublocktestdata/xml2json/nvme-raw-noopts.json new file mode 100644 index 0000000000..e18e96099c --- /dev/null +++ b/tests/qemublocktestdata/xml2json/nvme-raw-noopts.json @@ -0,0 +1,14 @@ +{ + "node-name": "0123456789ABCDEF0123456789ABCDE", + "read-only": false, + "driver": "raw", + "file": "0123456789ABCDEF0123456789ABCDE" +} +{ + "driver": "nvme", + "device": "0000:01:00.0", + "namespace": 1, + "node-name": "0123456789ABCDEF0123456789ABCDE", + "auto-read-only": true, + "discard": "unmap" +} diff --git a/tests/qemublocktestdata/xml2json/nvme-raw-noopts.xml b/tests/q= emublocktestdata/xml2json/nvme-raw-noopts.xml new file mode 100644 index 0000000000..1e4dbd6e56 --- /dev/null +++ b/tests/qemublocktestdata/xml2json/nvme-raw-noopts.xml @@ -0,0 +1,13 @@ + + + +
+ + + + + + + + + --=20 2.24.1