From nobody Tue Nov 26 12:41:41 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=1708635103; cv=none; d=zohomail.com; s=zohoarc; b=CYt6DWLVfM6Le2um/Y9Ub3b+bkll+Qrh6nfyQJNJQs3jXY0BU5f9T2PJGexnbAMfm/yMwsamHuFC8i37SV97UBI3rWP2zjfgci1sQe+YZ/4w+oHGPav3xePvu+OFQ5O99FAdsklbXCNIMGtQl8gQ7NDe8Qh3jhfhOu//ifAnOGk= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1708635103; 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=e2NESTxnz6150SuLytNvY5Gmn2U5RKg4GfRtueQZH4I=; b=YwJMOa/qGcr370Tg2z9GlNSsx/B1H4ggRVicEyifnQuEK34iUDZW3Vm2jo9YscwA1gRME+ivQAG4z8IiPr2OoNag7CSFzTFDVB+y3LzWG6U5JHOngDqRAe031pL8zY2JmbXqHUBGymN6kl1T0Bb4m4RyL5v6XmFrRWSE46dHiyo= 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 1708635103594168.62652008866223; Thu, 22 Feb 2024 12:51:43 -0800 (PST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rdFvU-00080U-AM; Thu, 22 Feb 2024 15:44:16 -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 1rdFvS-0007q3-Jo for qemu-devel@nongnu.org; Thu, 22 Feb 2024 15:44:14 -0500 Received: from mail-pl1-x629.google.com ([2607:f8b0:4864:20::629]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1rdFvR-0002mK-2h for qemu-devel@nongnu.org; Thu, 22 Feb 2024 15:44:14 -0500 Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1dc1e7c0e29so1599065ad.1 for ; Thu, 22 Feb 2024 12:44:12 -0800 (PST) Received: from stoup.. (173-197-098-125.biz.spectrum.com. [173.197.98.125]) by smtp.gmail.com with ESMTPSA id l12-20020a170902d34c00b001d8f81ecebesm10275500plk.192.2024.02.22.12.44.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 22 Feb 2024 12:44:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1708634652; x=1709239452; 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=e2NESTxnz6150SuLytNvY5Gmn2U5RKg4GfRtueQZH4I=; b=hZ/4CrhMaNF1HjeJrPF8OHuJNdFTLFA4fEx03C6PKPWV3gpdKvw5Kt9cMBDW8quEA8 VvO3b4fReqsO3wVD+JP56u8Kw2FcSPqbrZwwWJHtywSPyQgpCfct7+KQbDin5ITkl+7c KM0jCBW56pvhEO6bTfjhNwDDhdpFf30lcxqRxilPBTEAXKD7uXyqJ8Fuzj7IFI3JUz5P 5vqtUHb7fL1xcG42GcY/KNqr54sK1RgxEQpNrZch/FUdgLFjz222mZ2j/Am3gIDbNiSE bvjfEoBUBZNXVpplwge5cQ/qt9VD/vZN/PQZVenFTupjXYhHFGtFwMesL8/HqFDO7Raf orGg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708634652; x=1709239452; 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=e2NESTxnz6150SuLytNvY5Gmn2U5RKg4GfRtueQZH4I=; b=FzWKKGIR2/ZNrtlRJhVKDZL9T/fsqBzKmueZa+jdflkyGbvBlPs0aYlIgvWhJdqf2i yaxTlnFSTIPMRbudyzhgQ0be9830XZgxiMSSRMrioniQgqw8IsESlJpZMLFKaGhmPczL OWiUbhxU6fRl6wGiFcpi/kkN1Lm4v/Hf2l7M/nx1qccJCy6e6PldCd+RE45l4fLgOkCi OgmMKsOlztdQqKIDdJw9EU2/wGlIgk7cNrrRYbWHLo1Ksz7+jGyhsV0B3Yi5MDFTJ1og QW0McetP23CXjmvev0bIft7s2oI5tyAaVRM3RAlbfLb2vB4D6EfGwc4xuiEC5+j7so4m 6XLw== X-Gm-Message-State: AOJu0YzDFbJ7VHwhJUxD0TGzaMO7TumttotucJHO5PUS8ctne56pNyeI 8Fhi5elRaZhA3xU23xqXCvpqAW7RveA3Vhl3XqrHdCg2W0yhqNr0CJRF6fwHMzZVVOgJ0zCgppT M X-Google-Smtp-Source: AGHT+IFcuTy8EJ2o76Foed3DNGOgF7w8raPHKOVmlAW1Wx8ej7Aaizp3M8y5OQxUMBQueKGRfvMBWA== X-Received: by 2002:a17:902:ea0d:b0:1db:e792:bb38 with SMTP id s13-20020a170902ea0d00b001dbe792bb38mr15388661plg.63.1708634651868; Thu, 22 Feb 2024 12:44:11 -0800 (PST) From: Richard Henderson To: qemu-devel@nongnu.org Cc: =?UTF-8?q?Philippe=20Mathieu-Daud=C3=A9?= , Ilya Leoshkevich , Helge Deller Subject: [PULL 30/39] tests/tcg: Extend file in linux-madvise.c Date: Thu, 22 Feb 2024 10:43:14 -1000 Message-Id: <20240222204323.268539-31-richard.henderson@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20240222204323.268539-1-richard.henderson@linaro.org> References: <20240222204323.268539-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::629; envelope-from=richard.henderson@linaro.org; helo=mail-pl1-x629.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: 1708635104846100001 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 Acked-by: Helge Deller Message-Id: <20240102015808.132373-26-richard.henderson@linaro.org> --- 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