From nobody Fri May 3 07:58:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1570038122; cv=none; d=zoho.com; s=zohoarc; b=PkulsKGF3U5VnoETOs/AqfEXPA4e4G29w8jyez0RvwLsuCHamdtX0e8heLWMS5YQvgJ1KfQy2164IB6IqzQstjB3CcUifcpVZNnAwWf1k8FamNG4lWhTwJJy02MZO1TXst+PM4gPLN7utfBmD6B9A25Au2J3/OE51sec4ig2OI8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1570038122; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To:ARC-Authentication-Results; bh=58Wv596Ed68ir4nGtoXt8uWm1eCoOLjHbZBZud51TKs=; b=QScowQ9LMpgTtSEbuScBX5R9pfPFGCoFTXmfMg1pS+Gja+EANkVkLtDH0ukEOGY+WEjjvSnQ3L5VUeIzJyLeYtb0bcgo9WZXGihrhEHjD2ZfwF+7ZKCGyTbeG28Yjxfzt753+Q7qzkgxvc5qlwQrs+HwH1E7Mv7CPolPVsReN14= ARC-Authentication-Results: i=1; mx.zoho.com; spf=pass (zoho.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1570038122382538.5934088554765; Wed, 2 Oct 2019 10:42:02 -0700 (PDT) Received: from localhost ([::1]:58152 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFidV-0004L7-8d for importer@patchew.org; Wed, 02 Oct 2019 13:42:01 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:41982) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iFicW-0003nh-Dg for qemu-devel@nongnu.org; Wed, 02 Oct 2019 13:41:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iFicV-00025S-GJ for qemu-devel@nongnu.org; Wed, 02 Oct 2019 13:41:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:57062) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iFicR-00023w-Rg; Wed, 02 Oct 2019 13:40:55 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D0A1FC049D59; Wed, 2 Oct 2019 17:40:54 +0000 (UTC) Received: from localhost (unknown [10.40.205.69]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 6C3905C290; Wed, 2 Oct 2019 17:40:54 +0000 (UTC) From: Max Reitz To: qemu-block@nongnu.org Subject: [PATCH] iotests/162: Fix for newer Linux 5.3+ Date: Wed, 2 Oct 2019 19:40:52 +0200 Message-Id: <20191002174052.5773-1-mreitz@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Wed, 02 Oct 2019 17:40:54 +0000 (UTC) Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 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+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Type: text/plain; charset="utf-8" Linux 5.3 has made 0.0.0.0/8 a working IPv4 subnet. As such, "42" is now a valid host, and the connection to it will (hopefully) time out over a long period rather than quickly return with EINVAL. So let us use a negative integer for testing that NBD will not crash when it receives integer hosts. This way, the connection will again fail quickly and reliably. Signed-off-by: Max Reitz Reviewed-by: Eric Blake --- tests/qemu-iotests/162 | 2 +- tests/qemu-iotests/162.out | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/qemu-iotests/162 b/tests/qemu-iotests/162 index 2d719afbed..c0053ed975 100755 --- a/tests/qemu-iotests/162 +++ b/tests/qemu-iotests/162 @@ -46,7 +46,7 @@ echo '=3D=3D=3D NBD =3D=3D=3D' # NBD expects all of its arguments to be strings =20 # So this should not crash -$QEMU_IMG info 'json:{"driver": "nbd", "host": 42}' +$QEMU_IMG info 'json:{"driver": "nbd", "host": -1}' =20 # And this should not treat @port as if it had not been specified # (We need to set up a server here, because the error message for "Connect= ion diff --git a/tests/qemu-iotests/162.out b/tests/qemu-iotests/162.out index 3c5be2c569..5a00d36d17 100644 --- a/tests/qemu-iotests/162.out +++ b/tests/qemu-iotests/162.out @@ -1,7 +1,7 @@ QA output created by 162 =20 =3D=3D=3D NBD =3D=3D=3D -qemu-img: Could not open 'json:{"driver": "nbd", "host": 42}': Failed to c= onnect socket: Invalid argument +qemu-img: Could not open 'json:{"driver": "nbd", "host": -1}': address res= olution failed for -1:10809: Name or service not known image: nbd://localhost:PORT image: nbd+unix://?socket=3D42 =20 --=20 2.21.0