From nobody Mon Jul 14 04:41:41 2025 Delivered-To: importer2@patchew.org Authentication-Results: mx.zohomail.com; dkim=fail; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer2=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1625166630395668.87508691855; Thu, 1 Jul 2021 12:10:30 -0700 (PDT) Received: from localhost ([::1]:54750 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lz24z-0004PN-Al for importer2@patchew.org; Thu, 01 Jul 2021 15:10:29 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:51842) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lz21w-0002LX-GJ for qemu-devel@nongnu.org; Thu, 01 Jul 2021 15:07:20 -0400 Received: from us-smtp-delivery-124.mimecast.com ([170.10.133.124]:44138) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lz21s-0001mc-1Q for qemu-devel@nongnu.org; Thu, 01 Jul 2021 15:07:20 -0400 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-480-keaW6auLPe2KsJluvuX5Qg-1; Thu, 01 Jul 2021 15:07:12 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 60D6C801F97; Thu, 1 Jul 2021 19:07:11 +0000 (UTC) Received: from blue.redhat.com (ovpn-114-109.phx2.redhat.com [10.3.114.109]) by smtp.corp.redhat.com (Postfix) with ESMTP id 92B1E18AAB; Thu, 1 Jul 2021 19:07:07 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1625166435; h=from:from: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; bh=2VovJkM6uCPkktepAYvfUBgvGI+BFncwrJlFk1K0yBk=; b=bnj3r4e+C2FoG+LbqpXgVTEYQefimOedE5gCKYl84oZaHcKYCFAqSNRnAr18dx470LvptD R5WIHRgAvFlP1uCHvW/Kcoew8atlC9xRzaMqiyphe12WOfViK15WloDH9TzF6hMWZmM1FO NV7dUc/6uBaubFsO5NK8f+8EBcAbx1w= X-MC-Unique: keaW6auLPe2KsJluvuX5Qg-1 From: Eric Blake To: qemu-devel@nongnu.org Subject: [PATCH v3 1/2] iotests: Improve and rename test 309 to nbd-qemu-allocation Date: Thu, 1 Jul 2021 14:06:54 -0500 Message-Id: <20210701190655.2131223-2-eblake@redhat.com> In-Reply-To: <20210701190655.2131223-1-eblake@redhat.com> References: <20210701190655.2131223-1-eblake@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=eblake@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Transfer-Encoding: quoted-printable Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer2=patchew.org@nongnu.org; helo=lists.gnu.org; Received-SPF: pass client-ip=170.10.133.124; envelope-from=eblake@redhat.com; helo=us-smtp-delivery-124.mimecast.com X-Spam_score_int: -31 X-Spam_score: -3.2 X-Spam_bar: --- X-Spam_report: (-3.2 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_HIGH=-0.402, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H4=0.001, RCVD_IN_MSPIKE_WL=0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=unavailable 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: kwolf@redhat.com, nsoffer@redhat.com, vsementsov@virtuozzo.com, qemu-block@nongnu.org, mreitz@redhat.com Errors-To: qemu-devel-bounces+importer2=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail-DKIM: fail (Header signature does not verify) Content-Type: text/plain; charset="utf-8" Enhance the test to inspect what qemu-nbd is advertising during handshake, and rename it now that we support useful iotest names. Signed-off-by: Eric Blake Reviewed-by: Vladimir Sementsov-Ogievskiy --- .../qemu-iotests/{309 =3D> tests/nbd-qemu-allocation} | 5 ++++- .../{309.out =3D> tests/nbd-qemu-allocation.out} | 12 +++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) rename tests/qemu-iotests/{309 =3D> tests/nbd-qemu-allocation} (95%) rename tests/qemu-iotests/{309.out =3D> tests/nbd-qemu-allocation.out} (81= %) diff --git a/tests/qemu-iotests/309 b/tests/qemu-iotests/tests/nbd-qemu-all= ocation similarity index 95% rename from tests/qemu-iotests/309 rename to tests/qemu-iotests/tests/nbd-qemu-allocation index b90b279994c9..4ee73db8033b 100755 --- a/tests/qemu-iotests/309 +++ b/tests/qemu-iotests/tests/nbd-qemu-allocation @@ -3,7 +3,7 @@ # # Test qemu-nbd -A # -# Copyright (C) 2018-2020 Red Hat, Inc. +# Copyright (C) 2018-2021 Red Hat, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -32,6 +32,7 @@ _cleanup() trap "_cleanup; exit \$status" 0 1 2 3 15 # get standard environment, filters and checks +cd .. . ./common.rc . ./common.filter . ./common.nbd @@ -57,6 +58,8 @@ echo $QEMU_IMG map --output=3Djson -f qcow2 "$TEST_IMG" IMG=3D"driver=3Dnbd,server.type=3Dunix,server.path=3D$nbd_unix_socket" nbd_server_start_unix_socket -r -f qcow2 -A "$TEST_IMG" +# Inspect what the server is exposing +$QEMU_NBD --list -k $nbd_unix_socket # Normal -f raw NBD block status loses access to allocation information $QEMU_IMG map --output=3Djson --image-opts \ "$IMG" | _filter_qemu_img_map diff --git a/tests/qemu-iotests/309.out b/tests/qemu-iotests/tests/nbd-qemu= -allocation.out similarity index 81% rename from tests/qemu-iotests/309.out rename to tests/qemu-iotests/tests/nbd-qemu-allocation.out index db75bb6b0df9..c51022b2a38d 100644 --- a/tests/qemu-iotests/309.out +++ b/tests/qemu-iotests/tests/nbd-qemu-allocation.out @@ -1,4 +1,4 @@ -QA output created by 309 +QA output created by nbd-qemu-allocation =3D=3D=3D Initial image setup =3D=3D=3D @@ -14,6 +14,16 @@ wrote 2097152/2097152 bytes at offset 1048576 [{ "start": 0, "length": 1048576, "depth": 1, "zero": false, "data": true,= "offset": 327680}, { "start": 1048576, "length": 2097152, "depth": 0, "zero": false, "data": = true, "offset": 327680}, { "start": 3145728, "length": 1048576, "depth": 1, "zero": true, "data": f= alse}] +exports available: 1 + export: '' + size: 4194304 + flags: 0x58f ( readonly flush fua df multi cache ) + min block: 1 + opt block: 4096 + max block: 33554432 + available meta contexts: 2 + base:allocation + qemu:allocation-depth [{ "start": 0, "length": 3145728, "depth": 0, "zero": false, "data": true,= "offset": OFFSET}, { "start": 3145728, "length": 1048576, "depth": 0, "zero": true, "data": f= alse, "offset": OFFSET}] [{ "start": 0, "length": 1048576, "depth": 0, "zero": true, "data": true, = "offset": OFFSET}, --=20 2.31.1