From nobody Mon Feb 9 23:03:40 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) client-ip=216.205.24.124; envelope-from=philmd@redhat.com; helo=us-smtp-delivery-124.mimecast.com; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1612791516; cv=none; d=zohomail.com; s=zohoarc; b=Q0TnQrjSkT/pRLmF+BIjZbx+6L6vrYUcEnPn0AXfujry6t/DaEwXRxJCe5LmQgMl7OvxpXXmMTJ/lX7bSc/5zEC1b62dlcGsM4XYx8hra7M/vgA1fORZ05OPez4sjGY9ixzPEiGbwjoJoddGQSjke7YQTDMKCaY/YuQ1Kb9ejbg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1612791516; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=e0LNi1evvMz34L4iMgJD557S0z2qV5j+B5CpuhtMhXo=; b=H0NFau6FGZyOacF0A53KV8wUR2UL5lJbFsHf9mmCGNHddmG3i/xpFwIomod5tuvYIP34KwAIL1YEbn5TXGrTmPz70K5GAqTCU+T8qbXhz2h6aqLXMIVzCgxHSI8Ha6ZnBoReiRreQfffpqIopgg/kb2oclyS9Gena0V2CXq3OYs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of redhat.com designates 216.205.24.124 as permitted sender) smtp.mailfrom=philmd@redhat.com; dmarc=pass header.from= (p=none dis=none) header.from= Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by mx.zohomail.com with SMTPS id 1612791516781141.31115445022897; Mon, 8 Feb 2021 05:38:36 -0800 (PST) Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-435-fwdRn1qlOxmnHse6MDQJSA-1; Mon, 08 Feb 2021 08:38:34 -0500 Received: by mail-wr1-f69.google.com with SMTP id x12so13073954wrw.21 for ; Mon, 08 Feb 2021 05:38:34 -0800 (PST) Return-Path: Return-Path: Received: from x1w.redhat.com (68.red-83-57-175.dynamicip.rima-tde.net. [83.57.175.68]) by smtp.gmail.com with ESMTPSA id o8sm5599250wmc.34.2021.02.08.05.38.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Feb 2021 05:38:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1612791515; 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=e0LNi1evvMz34L4iMgJD557S0z2qV5j+B5CpuhtMhXo=; b=MCouFikGM6XdvQ128J2P7E/5a8sSJQ5G1DTm1kVFiJ9dDxOGVhQDL8jZZz3fhvJiWBxpNG 5Qi+gxfs3ZOYjhBoZfkJSMWOLH5oZC7MZfrU3xd2HxKiQMUrU7r+ONjU/QIjBfD+NVoXBS wNbrMdqy++SKWiZ9QEYAf+JA4HCEsA4= X-MC-Unique: fwdRn1qlOxmnHse6MDQJSA-1 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=e0LNi1evvMz34L4iMgJD557S0z2qV5j+B5CpuhtMhXo=; b=km41HxBUfqnvI3OES+VNMlexC2t3/R4U4/d//zmvBa8ckhTGhVzKGq5LdQtCKBLiqI s+46A0EJT+uHZQUH/HiPGpgSf82MEOFo6H/ckm3UYxixbpbCb9VNAp+Xd2jmZfjid3h0 YeS4RR/Ts9xo4Zct+En1Qc6hzQ6wubyUEwUbjCUhrT/XDcWsyxp4oJsvq7jeMJGbQPKI ceP5Ro1A7Ig7kmMjUadeudx8PbRRwZTKlD9yPkBzmi6mwtNcHLXxTQDQSRFLIL1iP7+F XU2sClukzW/cNgFylw7BYt4iK9SLk8T4LxJUJKeT4RDlIWvqlYIxW3KxGdSshjWgA4I5 eP/g== X-Gm-Message-State: AOAM533sMJkl0+o0/6GG0tD8Xzv7yc8AP0vUe0nJvjlnPxX66FYfZNoP +2eCN8BH/qmDsWrrskXywE5fXsm6FODEYeeTzPExwDXP8oBdiW2pdcdDCcBV1LVKZAu4LjnEeZm JPM0xBGRZrB2Daw== X-Received: by 2002:a1c:4b05:: with SMTP id y5mr14573472wma.37.1612791512957; Mon, 08 Feb 2021 05:38:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJx5iKiM22YAdVC/hJMVw1MEO1jya+6pJoJpy40grYv/iNAs1eQg/dU0R13WaodxT93ngiziDg== X-Received: by 2002:a1c:4b05:: with SMTP id y5mr14573456wma.37.1612791512775; Mon, 08 Feb 2021 05:38:32 -0800 (PST) From: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= To: qemu-devel@nongnu.org Cc: Wainer dos Santos Moschetta , Cleber Rosa , Beraldo Leal , =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PULL 15/18] tests/acceptance/virtiofs_submounts: standardize port as integer Date: Mon, 8 Feb 2021 14:37:08 +0100 Message-Id: <20210208133711.2596075-16-philmd@redhat.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20210208133711.2596075-1-philmd@redhat.com> References: <20210208133711.2596075-1-philmd@redhat.com> MIME-Version: 1.0 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=philmd@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable X-ZohoMail-DKIM: pass (identity @redhat.com) From: Cleber Rosa Instead of having to cast it whenever it's going to be used, let's standardize it as an integer, which is the data type that will be used most often. Given that the regex will only match digits, it's safe that we'll end up getting a integer, but, it could as well be a zero. Signed-off-by: Cleber Rosa Reviewed-by: Beraldo Leal Message-Id: <20210203172357.1422425-9-crosa@redhat.com> Signed-off-by: Philippe Mathieu-Daud=C3=A9 --- tests/acceptance/virtiofs_submounts.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/acceptance/virtiofs_submounts.py b/tests/acceptance/virt= iofs_submounts.py index f1b49f03bb5..82941756086 100644 --- a/tests/acceptance/virtiofs_submounts.py +++ b/tests/acceptance/virtiofs_submounts.py @@ -86,17 +86,18 @@ def get_portfwd(self): re.search(r'TCP.HOST_FORWARD.*127\.0\.0\.1\s*(\d+)\s+10\.', line) if match is not None: - port =3D match[1] + port =3D int(match[1]) break =20 self.assertIsNotNone(port) - self.log.debug('sshd listening on port: ' + port) + self.assertGreater(port, 0) + self.log.debug('sshd listening on port: %d', port) return port =20 def ssh_connect(self, username, keyfile): self.ssh_logger =3D logging.getLogger('ssh') port =3D self.get_portfwd() - self.ssh_session =3D ssh.Session('127.0.0.1', port=3Dint(port), + self.ssh_session =3D ssh.Session('127.0.0.1', port=3Dport, user=3Dusername, key=3Dkeyfile) for i in range(10): try: --=20 2.26.2