From nobody Mon Feb 9 01:52:05 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 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 15809755597171008.0194304159902; Wed, 5 Feb 2020 23:52:39 -0800 (PST) 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-335-eefihPgPNI65SLzpJRLfCw-1; Thu, 06 Feb 2020 02:52:36 -0500 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5208C8018A3; Thu, 6 Feb 2020 07:52:31 +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 20FEB10018FF; Thu, 6 Feb 2020 07:52:31 +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 C7EA018089D0; Thu, 6 Feb 2020 07:52:30 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 0167qFaJ009952 for ; Thu, 6 Feb 2020 02:52:15 -0500 Received: by smtp.corp.redhat.com (Postfix) id C45B0100194E; Thu, 6 Feb 2020 07:52:15 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4D1DA10018FF for ; Thu, 6 Feb 2020 07:52:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1580975558; 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=3wwhBm2kcdMUp81ln3bhEbJ241e07wDUGKVBMC4wa90=; b=g2j197XdTDgfV8hErgPIhG6eW4zcNoJmR6XcVYFvNRLpQFeypGQ7KtNV4EGVtJ8s3mYjV0 6xPNmestwgWIJDqZdaKjY3dQbvMVKUJmCHMLKIqXWVBP1SpKWoOaiTNBtULiCfxIe0reLH 7la5YTY7i1dYvXbPMUAfzlDp5M0amTY= From: Peter Krempa To: libvir-list@redhat.com Subject: [PATCH 06/15] tests: virstorage: Add test cases for "json:" pseudo-URI without 'file' wrapper Date: Thu, 6 Feb 2020 08:51:58 +0100 Message-Id: <3374547b172d0395c530641b68abdc77fcb4b907.1580975374.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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.84 on 10.5.11.22 X-MC-Unique: eefihPgPNI65SLzpJRLfCw-1 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" Add few cases that prove the second format of "json:" pseudo-URIs. Signed-off-by: Peter Krempa Reviewed-by: J=C3=A1n Tomko --- tests/virstoragetest.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 4341c04b1e..6d62aab654 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -1315,6 +1315,10 @@ mymain(void) "}" "}", "\n"); + TEST_BACKING_PARSE("json:{\"driver\":\"file\"," + "\"filename\":\"/path/to/file\"" + "}", + "\n"); TEST_BACKING_PARSE("json:{\"file.driver\":\"host_device\", " "\"file.filename\":\"/path/to/dev\"}", "\n"); @@ -1389,6 +1393,12 @@ mymain(void) "\n" " \n" "\n"); + TEST_BACKING_PARSE("json:{\"driver\":\"nbd\"," + "\"path\":\"/path/to/socket\"" + "}", + "\n" + " \n" + "\n"); TEST_BACKING_PARSE("json:{\"file.driver\":\"nbd\"," "\"file.path\":\"/path/to/socket\"" "}", --=20 2.24.1