From patchwork Fri Apr 3 10:11:34 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Max Reitz X-Patchwork-Id: 11472421 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 451A492A for ; Fri, 3 Apr 2020 10:12:18 +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 1B27220757 for ; Fri, 3 Apr 2020 10:12:18 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="eIp4tgrP" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1B27220757 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=redhat.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]:53148 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKJJB-00082L-8A for patchwork-qemu-devel@patchwork.kernel.org; Fri, 03 Apr 2020 06:12:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35041) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jKJIb-00076C-Nb for qemu-devel@nongnu.org; Fri, 03 Apr 2020 06:11:42 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jKJIa-0003aE-Gd for qemu-devel@nongnu.org; Fri, 03 Apr 2020 06:11:41 -0400 Received: from us-smtp-delivery-1.mimecast.com ([207.211.31.120]:51969 helo=us-smtp-1.mimecast.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jKJIa-0003ZJ-CB for qemu-devel@nongnu.org; Fri, 03 Apr 2020 06:11:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1585908700; 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; bh=SM9raZenXC6EQiQs7eo5tdMZnZYHcSBHvBwpQLuDCU4=; b=eIp4tgrPh9BDHS29IsrRRuDjO5gwj+82A67/vqYdEJioxI88A3EmzR2OaL7/T4WlWArUcg 6eNEwaX+TmigUhYAOjFka1UPk8PzQptRTBRhOKj8EYh51DYRUJtPACjVB6MvffsXwujJDM dmdMbq66AUm3hRmq00jAsOorys2fp64= 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-345-XzBzykFgMXy2Zj8qGpbmzg-1; Fri, 03 Apr 2020 06:11:38 -0400 X-MC-Unique: XzBzykFgMXy2Zj8qGpbmzg-1 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 69E7B477; Fri, 3 Apr 2020 10:11:37 +0000 (UTC) Received: from localhost (ovpn-113-97.ams2.redhat.com [10.36.113.97]) by smtp.corp.redhat.com (Postfix) with ESMTPS id D388760BF1; Fri, 3 Apr 2020 10:11:36 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH] iotests/common.pattern: Quote echos Date: Fri, 3 Apr 2020 12:11:34 +0200 Message-Id: <20200403101134.805871-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 207.211.31.120 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 , qemu-devel@nongnu.org, Max Reitz Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" From time to time, my shell decides to repace the bracketed numbers here by the numbers inside (i.e., "=== Clusters to be compressed [1]" is printed as "=== Clusters to be compressed 1"). That makes tests that use common.pattern fail. Prevent that from happening by quoting the arguments to all echos in common.pattern. Signed-off-by: Max Reitz Reviewed-by: Philippe Mathieu-Daudé Reviewed-by: Eric Blake --- tests/qemu-iotests/common.pattern | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/tests/qemu-iotests/common.pattern b/tests/qemu-iotests/common.pattern index 4f5e5bcea0..4caa5de187 100644 --- a/tests/qemu-iotests/common.pattern +++ b/tests/qemu-iotests/common.pattern @@ -23,7 +23,7 @@ do_is_allocated() { local count=$4 for ((i=1;i<=$count;i++)); do - echo alloc $(( start + (i - 1) * step )) $size + echo "alloc $(( start + (i - 1) * step )) $size" done } @@ -39,9 +39,9 @@ do_io() { local count=$5 local pattern=$6 - echo === IO: pattern $pattern >&2 + echo "=== IO: pattern $pattern" >&2 for ((i=1;i<=$count;i++)); do - echo $op -P $pattern $(( start + (i - 1) * step )) $size + echo "$op -P $pattern $(( start + (i - 1) * step )) $size" done } @@ -110,31 +110,31 @@ io_test2() { # free - free - compressed # Write the clusters to be compressed - echo === Clusters to be compressed [1] + echo '=== Clusters to be compressed [1]' io_pattern writev $((offset + 4 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - echo === Clusters to be compressed [2] + echo '=== Clusters to be compressed [2]' io_pattern writev $((offset + 5 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - echo === Clusters to be compressed [3] + echo '=== Clusters to be compressed [3]' io_pattern writev $((offset + 8 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 mv "$TEST_IMG" "$TEST_IMG.orig" $QEMU_IMG convert -f $IMGFMT -O $IMGFMT -c "$TEST_IMG.orig" "$TEST_IMG" # Write the used clusters - echo === Used clusters [1] + echo '=== Used clusters [1]' io_pattern writev $((offset + 0 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - echo === Used clusters [2] + echo '=== Used clusters [2]' io_pattern writev $((offset + 1 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 - echo === Used clusters [3] + echo '=== Used clusters [3]' io_pattern writev $((offset + 3 * $cluster_size)) $cluster_size $((9 * $cluster_size)) $num 165 # Read them - echo === Read used/compressed clusters + echo '=== Read used/compressed clusters' io_pattern readv $((offset + 0 * $cluster_size)) $((2 * $cluster_size)) $((9 * $cluster_size)) $num 165 io_pattern readv $((offset + 3 * $cluster_size)) $((3 * $cluster_size)) $((9 * $cluster_size)) $num 165 io_pattern readv $((offset + 8 * $cluster_size)) $((1 * $cluster_size)) $((9 * $cluster_size)) $num 165 - echo === Read zeros + echo '=== Read zeros' io_zero readv $((offset + 2 * $cluster_size)) $((1 * $cluster_size)) $((9 * $cluster_size)) $num io_zero readv $((offset + 6 * $cluster_size)) $((2 * $cluster_size)) $((9 * $cluster_size)) $num }