From patchwork Tue Jul 12 09:59:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Richard Henderson X-Patchwork-Id: 589795 Delivered-To: patch@linaro.org Received: by 2002:a05:7000:5817:0:0:0:0 with SMTP id j23csp112711max; Tue, 12 Jul 2022 03:02:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1seqOxA5JnUmYH9LBi6GD+Ztb5mYbxO07jXYwF6mSATKv6f/HiqACalEeMGDHhFzNe7upmi X-Received: by 2002:a05:6214:c25:b0:473:2d88:f5ff with SMTP id a5-20020a0562140c2500b004732d88f5ffmr16922014qvd.101.1657620144453; Tue, 12 Jul 2022 03:02:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1657620144; cv=none; d=google.com; s=arc-20160816; b=mBw7Cv8JMxNWr1EaTwajfJuUHPrbh7+ofxOz0dtuZmq3c4tI4vrb3XB40alp2REErk 3bZaeS54knXW5x5T5kqfBNihxThNl3Mfxa79nf/oHVgOuiSKJoRWKbdhoZgWBc1hlA8/ NNKnPrDcZDLJ172nrwSPAJEgI+pbEBscZbBheEhLPyuS/bEW8OO2IAHH5Rybdt8FH/XZ JP8lC9tKGstJDsgrkOPjFr7r51O3+4RZz0e8Gl7clltyVLuUSTPrN6tsWzwDqir7jKz7 XNcDtDsjnTuvFtoRT2aAsvj7yJRmW0dbLKkMlEzLIaF3FpS09f/5yg90/kZrFQ9J7pj/ 8Ngg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:content-transfer-encoding :mime-version:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=zbOxxenHaKVYrkhpq6ujndTW/g6U1Cx28IHyEc7+Fms=; b=j1X/eBCTflWomOMu2mb8CTJd7kBJiXJQd21p/ZHVd9pvAWUq+17oR4DXCJOkW2NHGx UC8CFl8tEUt9Lee+PVCJ6S9lBHL+jgtBJCJRG4yQSk4/uUlKKJaBzLuzgcympBDejoe4 XvMiNhsuB2V1HUPCzYQGOa1Ox0Y1GygHraxAokGYoXg1hYlcvOcO7Fj9cMU4tIYaRo4J S6OoQwK9EQiI/2A+a5T19/1dLAP++95U5KDf74hCO3GxwU3HZPEk6jjm5E+9vpmwhHL8 R+wGItjLWuqwlNprucRO4R7VsKdaVby5PpQaB+0hsZIIPfB2HDSn9Rrl9Glvg15fajwm UT7g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I4aMdhkN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from lists.gnu.org (lists.gnu.org. [209.51.188.17]) by mx.google.com with ESMTPS id kk1-20020a056214508100b00470b57610c9si4075822qvb.273.2022.07.12.03.02.24 for (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Tue, 12 Jul 2022 03:02:24 -0700 (PDT) Received-SPF: pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=I4aMdhkN; spf=pass (google.com: domain of qemu-devel-bounces+patch=linaro.org@nongnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom="qemu-devel-bounces+patch=linaro.org@nongnu.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from localhost ([::1]:33734 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oBCik-0006AV-Vu for patch@linaro.org; Tue, 12 Jul 2022 06:02:23 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:40642) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oBCfj-00067t-A5 for qemu-devel@nongnu.org; Tue, 12 Jul 2022 05:59:15 -0400 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]:36654) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oBCfh-0001Hj-RI for qemu-devel@nongnu.org; Tue, 12 Jul 2022 05:59:15 -0400 Received: by mail-pg1-x533.google.com with SMTP id s206so7114286pgs.3 for ; Tue, 12 Jul 2022 02:59:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zbOxxenHaKVYrkhpq6ujndTW/g6U1Cx28IHyEc7+Fms=; b=I4aMdhkN8WaqfY/0E0vNob0K2snm5nOuTH1phx2VmVMZymoBYjX+Om/AGZnCd+QYIR 2diT+V1vqWfYGgp7JBjuM1HGOaJhjKK/gC1f6a0O2nG69kumDOtHi4mkRxkkIv5awFVn 7N+hkUTD2XD6yx5ElKjytnx4NcEMHUSgSVIVSL6/K+HkqXeQNLo0onBN4bLVaasE+FT0 AZFAxN+uM7lGSnmw+lQ29RRnC+BuWtzKujgcm0OTdssOOsUvH975ahpt0hWGwprbdm5k P4+SXM71BNZBfeySAwwJpCX96rQaFX1IjLRrzGvoUbWoCXgZaYFTa3CwcdPhrHQb3Nrb LAcQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=zbOxxenHaKVYrkhpq6ujndTW/g6U1Cx28IHyEc7+Fms=; b=vgBUGrHn+daeZKDUWxGGRi79aD4HxeyF4ojg9wZkjsa1ZDzORQlAeM9GE+FhvEcdqy qwADKF9IOPG/1f1RnUzeWuFsQguAy/eIua89rkdhsmnQ2pLSlRLgF2ZalaWwJj/z86o7 LoL+Vrf7qaelytNvIj02/qOSBsG009hBnq0H/Sr38zQolaP4VOQn1pVkDjvJgkP2a8O7 CVRVwz6nYFSmN4nb8zzL6tFDhXsJ8hvPgiydi23DRCNFWzlihicS9JxSw0ecguIvU83q bDlqd6xz9yhJW2rbIewUbOlASQQLh+BgLdz46Ig7xMQPGkIynvABIlTT2vGr+Q6nQFky BQuA== X-Gm-Message-State: AJIora/qOroWbjWIvY0nchQmoiZq6q4MXWoFrOFiz011JFc4UhMC0vaq K8tXbzQ1uNYwArrb/MVUEvrvG9AonVcWCDL6 X-Received: by 2002:a63:1047:0:b0:40d:7553:d897 with SMTP id 7-20020a631047000000b0040d7553d897mr19260306pgq.485.1657619952421; Tue, 12 Jul 2022 02:59:12 -0700 (PDT) Received: from stoup.. ([122.255.60.245]) by smtp.gmail.com with ESMTPSA id s18-20020a170902ea1200b0016bdb5a3e37sm6348990plg.250.2022.07.12.02.59.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 Jul 2022 02:59:12 -0700 (PDT) From: Richard Henderson To: qemu-devel@nongnu.org Cc: Vladimir Sementsov-Ogievskiy , Thomas Huth , Hanna Reitz Subject: [COMMITTED 2/3] iotests: fix copy-before-write for macOS and FreeBSD Date: Tue, 12 Jul 2022 15:29:00 +0530 Message-Id: <20220712095901.212353-3-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220712095901.212353-1-richard.henderson@linaro.org> References: <20220712095901.212353-1-richard.henderson@linaro.org> MIME-Version: 1.0 Received-SPF: pass client-ip=2607:f8b0:4864:20::533; envelope-from=richard.henderson@linaro.org; helo=mail-pg1-x533.google.com 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, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patch=linaro.org@nongnu.org Sender: "Qemu-devel" From: Vladimir Sementsov-Ogievskiy strerror() represents ETIMEDOUT a bit different in Linux and macOS / FreeBSD. Let's support the latter too. Fixes: 9d05a87b77 ("iotests: copy-before-write: add cases for cbw-timeout option") Signed-off-by: Vladimir Sementsov-Ogievskiy Tested-by: Thomas Huth Reviewed-by: Hanna Reitz Message-Id: <20220705153708.186418-1-vsementsov@yandex-team.ru> Signed-off-by: Richard Henderson Reviewed-by: Warner Losh --- tests/qemu-iotests/tests/copy-before-write | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/qemu-iotests/tests/copy-before-write b/tests/qemu-iotests/tests/copy-before-write index 16efebbf8f..56937b9dff 100755 --- a/tests/qemu-iotests/tests/copy-before-write +++ b/tests/qemu-iotests/tests/copy-before-write @@ -192,6 +192,11 @@ read 1048576/1048576 bytes at offset 0 def test_timeout_break_guest(self): log = self.do_cbw_timeout('break-guest-write') + # macOS and FreeBSD tend to represent ETIMEDOUT as + # "Operation timed out", when Linux prefer + # "Connection timed out" + log = log.replace('Operation timed out', + 'Connection timed out') self.assertEqual(log, """\ wrote 524288/524288 bytes at offset 0 512 KiB, X ops; XX:XX:XX.X (XXX YYY/sec and XXX ops/sec)