From nobody Wed Mar 18 16:40:08 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 205.139.110.61 as permitted sender) client-ip=205.139.110.61; envelope-from=libvir-list-bounces@redhat.com; helo=us-smtp-delivery-1.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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=1579193816; cv=none; d=zohomail.com; s=zohoarc; b=SQay0oL36h9LhOLQYwZYwnY5X3FmMGPRhQOqVpxwANs1RJSbhsVZcFrNznNHHYRlYl2wTozfOkejpJUgEz+4DE6ePrzeAX6uuq00esLquZN1yOQuT1FuLenJaiktp2IK8aM8CXnHIjvGrPMmcuze1WNq4dP/E7dUVkMsLqMLMzY= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1579193816; 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=GnnfZNOyfPP3dIaV+VhbbckFOGdHXsLJRCbF3neKUZo=; b=EafztoObpYlRCFbfUN+OzzBu2ISiaQ2PtWCGyVgsEOcoJNh6M3Vo/SSbJJUAe5DA9K+tdNFp1rfgbDRf8vd41Szld3ttVDaGmXrHC/LAItCvwujW9Gs6LV2xMJPe8Cr94wXlAjgd28/Nod4eMEr0Zj7rzXiV57D6SQeKXpEzWr0= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 205.139.110.61 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-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by mx.zohomail.com with SMTPS id 1579193816165127.05263554194755; Thu, 16 Jan 2020 08:56:56 -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-342-GaJe4l00NmSiDVRFhNcjBQ-1; Thu, 16 Jan 2020 11:56:53 -0500 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 2001F18A6EC4; Thu, 16 Jan 2020 16:56:48 +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 E849819C5B; Thu, 16 Jan 2020 16:56:47 +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 BD9FD18218AA; Thu, 16 Jan 2020 16:56:45 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id 00GGuigF002304 for ; Thu, 16 Jan 2020 11:56:44 -0500 Received: by smtp.corp.redhat.com (Postfix) id D342F196AE; Thu, 16 Jan 2020 16:56:44 +0000 (UTC) Received: from angien.redhat.com (unknown [10.43.2.48]) by smtp.corp.redhat.com (Postfix) with ESMTP id 5C59819C5B for ; Thu, 16 Jan 2020 16:56:44 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1579193814; 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=GnnfZNOyfPP3dIaV+VhbbckFOGdHXsLJRCbF3neKUZo=; b=IpjJQLA4g721Mz8uM3U7FSX3PhqnrnP08vHm1NCLI3zqCBre98IqU52QOL4xpaFzFd4zLJ 182s1SO9gMfBeVZJ4HEFYmnwk4JwdSM6tTlhDkBNmJBDcd77L3fOgetxFTfuihtKDkSLvZ +xpo6uW4U+7S3c5u59tVGI9e+rcn5zs= From: Peter Krempa To: libvir-list@redhat.com Subject: [libvirt RFC 1/2] tests: storage: Add test data for json specified raw image with offset/size Date: Thu, 16 Jan 2020 17:56:39 +0100 Message-Id: <8add2a0abea142c066f2e8577b2434dcb979e363.1579193759.git.pkrempa@redhat.com> In-Reply-To: References: MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 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.23 X-MC-Unique: GaJe4l00NmSiDVRFhNcjBQ-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" QEMU allows specifying the offset and size into a raw file to expose a sub-slice of the image to the guest with the raw driver. Libvirt currently doesn't support it but we can add test case for future reference. Signed-off-by: Peter Krempa --- tests/virstoragetest.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/virstoragetest.c b/tests/virstoragetest.c index 2862758752..58e15c0cc4 100644 --- a/tests/virstoragetest.c +++ b/tests/virstoragetest.c @@ -1559,6 +1559,16 @@ mymain(void) "\n" " \n" "\n"); + TEST_BACKING_PARSE_FULL("json:{ \"file\": { \"driver\": \"raw\"," + "\"offset\": 10752," + "\"size\": 4063232," + "\"file\": { \"driver\": \"= file\"," + "\"filename\": = \"/tmp/testfle\"" + "}" + "}" + "}", + "\n", 0); + #endif /* WITH_YAJL */ cleanup: --=20 2.24.1