From nobody Tue Nov 26 22:19:15 2024 Delivered-To: importer@patchew.org Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass(p=none dis=none) header.from=linaro.org ARC-Seal: i=1; a=rsa-sha256; t=1704161031; cv=none; d=zohomail.com; s=zohoarc; b=ToTkD/Jy2EJRoABJ3fdFLoS5NoFX1AX96l0NsZgBzZeT4zvOSVtWthUuIzs7wcnVTGrkT6YuoBMumGGWT4FK2UIfC7eFGPLmx2ZxqpWiurI/pCH7xKP/rZLfSBqcf782nSONeFJ32RMKBS+a39kM2DuttqxAhgF/wMvxRGwk5Kg= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1704161031; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:MIME-Version:Message-ID:References:Sender:Subject:Subject:To:To:Message-Id:Reply-To; bh=NKBqBWVnteg7nBg0Ct8xapNabPHsKvd3tq3kc9va8Z0=; b=lDQpptU5XxLF1sd83eO6tXZ8sDgGE+EXqaKQ7PGJOlqM3vJbqMmcvdGR2mVTDlwc7X90DE0Ase/KRTtVxXaToMqQxURydoJ5PTnkfRt6XIXb/YMDEh64OpClF3zm+JJMj0q/SID5uYG7m2I5fz8HppD9JcVAk/LfuC72z6+WXWs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=pass header.from= (p=none dis=none) Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1704161031181670.1069922819819; Mon, 1 Jan 2024 18:03:51 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rKU3n-0003mI-Dg; Mon, 01 Jan 2024 20:59:15 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rKU3f-0003i5-Iu for qemu-devel@nongnu.org; Mon, 01 Jan 2024 20:59:10 -0500 Received: from mail-pg1-x533.google.com ([2607:f8b0:4864:20::533]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rKU3e-00075W-2P for qemu-devel@nongnu.org; Mon, 01 Jan 2024 20:59:07 -0500 Received: by mail-pg1-x533.google.com with SMTP id 41be03b00d2f7-5c21e185df5so6728040a12.1 for ; Mon, 01 Jan 2024 17:59:05 -0800 (PST) Received: from stoup.. (124-149-254-207.tpgi.com.au. [124.149.254.207]) by smtp.gmail.com with ESMTPSA id g33-20020a635221000000b0058ee60f8e4dsm19561891pgb.34.2024.01.01.17.59.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 01 Jan 2024 17:59:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704160744; x=1704765544; darn=nongnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=NKBqBWVnteg7nBg0Ct8xapNabPHsKvd3tq3kc9va8Z0=; b=MPckM0YuV/jFqFQXkL4L3ij7UFn8w2pCpZEHmpn+IL2RfR5jbjDktgy5t4Z6Wy1MtL wONNQiuRd4U9nyiJxrxq7rexQeBT01y29735acTYma7+OvbXFXo1Vkl2FRtYhMbHJYCp XpNmb/3yjJWeKZsnkqwbGEikK9nBEOzVbIHJNeGYjuqN4d4c1fRQNFZngH4Qqr/Q5pVT i02PEQ7CC4b0YBaC93mcqT5FNSAiGXa3cftdBFS14IXVk5pPs8mU1WhjpUboe2m/tygN VogTsoOCAHXbAPXvNbzTRWLWpH4ZkrvVZk6kbMr9XpoT5NS/375NcWa/tAEDQfBLxPzD ppMQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704160744; x=1704765544; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=NKBqBWVnteg7nBg0Ct8xapNabPHsKvd3tq3kc9va8Z0=; b=iYHo4d6TtDC/OcAGHk0W2McCOVL7KyDnJaQknabJqWwvIQ/xOk0m6anW2EWa8jSgmo 9wz6BZ8WS/sia9HN2Biwh6nVYClO0spf2JECy9s4diAOXTlNEL/6P9uAnzJdXJyRneVR 2tCgswJ03ofsfmDg1L06FP4m4mllQYDloHoXhMTw37uS4n5zlXgfwqyCvrHVBXusM+Ns 25FltSO7UVnviyRTQJg3E71sqAFUuKI9/q24S3UmFlPXmHqxH/9KteDFEfghT5Hu26GP ZH3HTB/Dr9wQu+CQSZSk9MD41lemfbqrSIUzVqUP6/XA5cEE0oMC4H2XAb6ne+zhcF6G BoSw== X-Gm-Message-State: AOJu0Yzbc0B8ErW0ajTtGiI9eVD04LyqBa5bTgf7qeI8owIVWBFjd3rv W1fe9QZj3nrzQvkQ+KPidl7s1vKVu0oSaTPs6Ov1CHcdjGI= X-Google-Smtp-Source: AGHT+IFyMl1BSFmDo1oCTQ1t0Wp94IaM/eRJ8+F+zqGdVPQfbblnHF3Q5w9g52gO8YEsDlOXQzB94Q== X-Received: by 2002:a05:6a20:3791:b0:194:ae7b:3847 with SMTP id q17-20020a056a20379100b00194ae7b3847mr16474705pze.34.1704160744753; Mon, 01 Jan 2024 17:59:04 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= Subject: [PATCH v3 25/33] tests/tcg: Extend file in linux-madvise.c Date: Tue, 2 Jan 2024 12:58:00 +1100 Message-Id: <20240102015808.132373-26-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240102015808.132373-1-richard.henderson@linaro.org> References: <20240102015808.132373-1-richard.henderson@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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+importer=patchew.org@nongnu.org; helo=lists.gnu.org; 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+importer=patchew.org@nongnu.org Sender: qemu-devel-bounces+importer=patchew.org@nongnu.org X-ZohoMail-DKIM: pass (identity @linaro.org) X-ZM-MESSAGEID: 1704161031884100002 When guest page size > host page size, this test can fail due to the SIGBUS protection hack. Avoid this by making sure that the file size is at least one guest page. Visible with alpha guest on x86_64 host. Reviewed-by: Philippe Mathieu-Daud=C3=A9 Signed-off-by: Richard Henderson Reviewed-by: Ilya Leoshkevich --- tests/tcg/multiarch/linux/linux-madvise.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/tcg/multiarch/linux/linux-madvise.c b/tests/tcg/multiarc= h/linux/linux-madvise.c index 29d0997e68..539fb3b772 100644 --- a/tests/tcg/multiarch/linux/linux-madvise.c +++ b/tests/tcg/multiarch/linux/linux-madvise.c @@ -42,6 +42,8 @@ static void test_file(void) assert(ret =3D=3D 0); written =3D write(fd, &c, sizeof(c)); assert(written =3D=3D sizeof(c)); + ret =3D ftruncate(fd, pagesize); + assert(ret =3D=3D 0); page =3D mmap(NULL, pagesize, PROT_READ, MAP_PRIVATE, fd, 0); assert(page !=3D MAP_FAILED); =20 --=20 2.34.1