From patchwork Mon Jul 27 21:58:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Nir Soffer X-Patchwork-Id: 11687709 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 057F5722 for ; Mon, 27 Jul 2020 22:02:14 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id CFBAE206D7 for ; Mon, 27 Jul 2020 22:02:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Ldu+Y7TH" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CFBAE206D7 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Received: from localhost ([::1]:60426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1k0BCH-0002bn-27 for patchwork-qemu-devel@patchwork.kernel.org; Mon, 27 Jul 2020 18:02:13 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47598) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1k0B96-0007mE-6S; Mon, 27 Jul 2020 17:58:56 -0400 Received: from mail-wm1-x32d.google.com ([2a00:1450:4864:20::32d]:35318) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1k0B94-0004Kd-EQ; Mon, 27 Jul 2020 17:58:55 -0400 Received: by mail-wm1-x32d.google.com with SMTP id 184so16199636wmb.0; Mon, 27 Jul 2020 14:58:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oxylbAlLgBB5wX4M1QMLfOjOSXomHrrWCqL3sU/4jlA=; b=Ldu+Y7TH6uMCyQV9ws1Fsm1D5nlvM6k++Bp6e1LUoYjlz4yOUvRjeFdz6bfn5vsmRG coCqHRKLggm3HCAtvb/rkzoN6Iux4PiYUPDPPf/a/i0zkdj+D5UCTTLszZ4L350NKr3C Ul1VtgYksXrCWyWkW+NCLMXEzBzls96LJ8h96Zcm0bwtIX3905P4YrWgeAGrAUreTACD 7NjekIE2YBuNZaABWiwopds7910KuF9yoinGdavPRzHq7KimmFsCKNEGiCKtEm7LB1kr G2eCrcgaWC0psBx43xRNVvendurN810XCUjfm2Vkjl9CZX+65JBqUgYyOeEIReUDgzXm csZA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=oxylbAlLgBB5wX4M1QMLfOjOSXomHrrWCqL3sU/4jlA=; b=WBTrgFvG77q+5D15p2ECb98yse9nXXSvD6eM0yScwXLXAfYTbCTbaQl7Xtid6UDH3h 4SWZr8FvjR60KPl4m49TW/obuUbRxBn58hPQZ04W+qyCPBriuxPMkSFfsnWd/WX999uY AH35go5bCvTDScnrHplKE51UNkkoq4E2UgygiDzrbdTwBfnZztFaiK75q+PSek0duYGR 9Qq1YwC9mDZvXQ2eLuNK+KaFexUETanJ4Eda4qgmomU/SGRWDG6j5qbL9kNFxI05HH8T qmxBjnCIpJUG4JNun9WYvuz8AB8hyzZ5KQZDGT3ojB+TGJOxcA2XwSByBAIQos7EgphE sycA== X-Gm-Message-State: AOAM530YifkB7EAOgngnCwlv2YxD4RqNyrPm8YuxIOmISct1VQKWh7l8 3Mf6Zn0GeXFHESrG2O0Yd1E81J9uvcU= X-Google-Smtp-Source: ABdhPJz7HcuWZR0s/RY5cHF36CsfZH5nPzh1tfze93Ec1Y/6c4YqkDUVsjmFW9pL0kwK60STTKIJMg== X-Received: by 2002:a7b:c841:: with SMTP id c1mr1158170wml.25.1595887130507; Mon, 27 Jul 2020 14:58:50 -0700 (PDT) Received: from localhost.localdomain (109-186-134-209.bb.netvision.net.il. [109.186.134.209]) by smtp.gmail.com with ESMTPSA id p14sm14492940wrx.90.2020.07.27.14.58.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jul 2020 14:58:49 -0700 (PDT) From: Nir Soffer X-Google-Original-From: Nir Soffer To: qemu-devel@nongnu.org, qemu-block@nongnu.org Subject: [PATCH v2 0/4] Fix convert to qcow2 compressed to NBD Date: Tue, 28 Jul 2020 00:58:42 +0300 Message-Id: <20200727215846.395443-1-nsoffer@redhat.com> X-Mailer: git-send-email 2.25.4 MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::32d; envelope-from=nirsof@gmail.com; helo=mail-wm1-x32d.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Kevin Wolf , Nir Soffer , vsementsov@virtuozzo.com, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" Fix qemu-img convert -O qcow2 -c to NBD URL and add missing test for this usage. This already works now, but unfortunately qemu-img fails when trying to truncate the target image to the same size at the end of the operation. Changes since v1: - Include complete code for creating OVA file [Eric] - Use qcow2 for source file to avoid issues with random CI filesystem [Max] - Fix many typos [Eric, Max] - Make qemu_nbd_popen a context manager - Add more qemu_img_* helpers - Verify OVA file contents v1 was here: https://lists.nongnu.org/archive/html/qemu-block/2020-07/msg01543.html Nir Soffer (4): block: nbd: Fix convert qcow2 compressed to nbd iotests: Make qemu_nbd_popen() a contextmanager iotests: Add more qemu_img helpers iotests: Test convert to qcow2 compressed to NBD block/nbd.c | 30 ++++++++ tests/qemu-iotests/264 | 76 ++++++++------------ tests/qemu-iotests/264.out | 2 + tests/qemu-iotests/302 | 127 ++++++++++++++++++++++++++++++++++ tests/qemu-iotests/302.out | 31 +++++++++ tests/qemu-iotests/group | 1 + tests/qemu-iotests/iotests.py | 34 ++++++++- 7 files changed, 251 insertions(+), 50 deletions(-) create mode 100755 tests/qemu-iotests/302 create mode 100644 tests/qemu-iotests/302.out