From patchwork Wed May 4 00:03:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yuanchu Xie X-Patchwork-Id: 12836562 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0D20C433EF for ; Wed, 4 May 2022 00:04:27 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 38CE46B0071; Tue, 3 May 2022 20:04:27 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 33B376B0073; Tue, 3 May 2022 20:04:27 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 1DC8C6B0074; Tue, 3 May 2022 20:04:27 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0011.hostedemail.com [216.40.44.11]) by kanga.kvack.org (Postfix) with ESMTP id 104666B0071 for ; Tue, 3 May 2022 20:04:27 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id E4E50335 for ; Wed, 4 May 2022 00:04:26 +0000 (UTC) X-FDA: 79426113732.10.EF47EBA Received: from mail-pj1-f73.google.com (mail-pj1-f73.google.com [209.85.216.73]) by imf28.hostedemail.com (Postfix) with ESMTP id 2F216C0078 for ; Wed, 4 May 2022 00:04:13 +0000 (UTC) Received: by mail-pj1-f73.google.com with SMTP id u1-20020a17090a2b8100b001d9325a862fso7789679pjd.6 for ; Tue, 03 May 2022 17:04:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20210112; h=date:in-reply-to:message-id:mime-version:references:subject:from:to :cc; bh=gNOfQOttyQ9bVdMrdcaVGQzcGPZiZGz3FawVW6e6qqo=; b=r1bamZ7/7YEkejVukK6LVq3CiZ+A2M9izekAohqwa+FB57ha2fq+WrXtd7hH+dC+eM 13L40ZPCJ7MbYJIPBHnucGx0+jSuR6Klo6py8YazOIbgqjzbAFafjzycEiYhPNYOpvub 338Zq5b1D8ArkuljrgfcDPO7/mNsxLoJVdaDSMRynpo//Ko75zb103HfcQg1v55oWZ7d Ay7ghn9fZYhDkPwRoBKQFAjq7BcP2L2UNLgsSPouYgBwI39ZffFfu3Q9m8Hh5SG1+vnL pUlUIGOZWUX7cIdGZIiF9lg6/Mmb3Cl3Py4ZOszvYoDFudV7YI8uKIrmnS7Awh7SqCTA t2Ew== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:in-reply-to:message-id:mime-version :references:subject:from:to:cc; bh=gNOfQOttyQ9bVdMrdcaVGQzcGPZiZGz3FawVW6e6qqo=; b=WZEtdYaslLao3GJ1suOywS4kWJkIiLPzsK6/nOT62xBzddhGt18BOg6Cqvudt/GyRj RIq5rqxlSsd7UhHp6qEP6kKPo9xb8VAdm9qT4HKqu+FwfIPmbvhBzSuxTQv4D8mt9SKf Dx9jE85HQ/P1opYmMX1HYik2TJbMIl1bCxEzYJ5Zi5tFklzSTu9nunyVmjsg+gIArl2M EvHqzrjuye+AlJIO2MHQgbPqiU4YDC+ySVq5jApqlN1uVAg3YJll9KNlUyCN3qoaY5Jv 9GKFUtQGv6Unlo8P0OrFcnM8gmkmaUOt+B726D9hn2w1M1tKNRI2SrvVVf+r9ybogSFL WXiQ== X-Gm-Message-State: AOAM531npxmwcjGD8YKRl5oxdedciYxKXVxGkIdKvH/Fqp5gyUc2lqqv /ipcwgfRPAbHmy65t3t9qYGXTzt+pJqs X-Google-Smtp-Source: ABdhPJzMqS7AZBrEZnEXn6eaRzkfHjclxm/qy0rBrOu081u0jfBoGWFBDKB5jzuoKh5xrj08ZHLyw/ElYT+g X-Received: from yuanchu.c.googlers.com ([fda3:e722:ac3:cc00:7f:e700:c0a8:1e51]) (user=yuanchu job=sendgmr) by 2002:a65:4c4e:0:b0:39d:21c4:2381 with SMTP id l14-20020a654c4e000000b0039d21c42381mr15913964pgr.566.1651622665163; Tue, 03 May 2022 17:04:25 -0700 (PDT) Date: Wed, 4 May 2022 00:03:57 +0000 In-Reply-To: Message-Id: <20220504000358.1174849-1-yuanchu@google.com> Mime-Version: 1.0 References: X-Mailer: git-send-email 2.36.0.464.gb9c8b46e94-goog Subject: [PATCH v2 1/2] selftests/damon: suppress compiler warnings for huge_count_read_write From: Yuanchu Xie To: Shuah Khan , Markus Boehme , SeongJae Park Cc: rientjes@google.com, Andrew Morton , linux-mm@kvack.org, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org, Yuanchu Xie X-Stat-Signature: r8ueemfjpyfe3ub48mqq8kimi5f7fwqz X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 2F216C0078 Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=google.com header.s=20210112 header.b="r1bamZ7/"; spf=pass (imf28.hostedemail.com: domain of 3CcNxYgcKCHAmiObQViUccUZS.QcaZWbil-aaYjOQY.cfU@flex--yuanchu.bounces.google.com designates 209.85.216.73 as permitted sender) smtp.mailfrom=3CcNxYgcKCHAmiObQViUccUZS.QcaZWbil-aaYjOQY.cfU@flex--yuanchu.bounces.google.com; dmarc=pass (policy=reject) header.from=google.com X-Rspam-User: X-HE-Tag: 1651622653-571108 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000863, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: The test case added in commit db7a347b26fe ("mm/damon/dbgfs: use '__GFP_NOWARN' for user-specified size buffer allocation") intentionally writes and reads with a large count to cause allocation failure and check for kernel warnings. We suppress the compiler warnings for these calls as they work as intended. Signed-off-by: Yuanchu Xie Reviewed-by: SeongJae Park --- tools/testing/selftests/damon/Makefile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/testing/selftests/damon/Makefile b/tools/testing/selftests/damon/Makefile index 0470c5f3e690..a300b4c5b373 100644 --- a/tools/testing/selftests/damon/Makefile +++ b/tools/testing/selftests/damon/Makefile @@ -1,6 +1,9 @@ # SPDX-License-Identifier: GPL-2.0 # Makefile for damon selftests +CFLAGS += -Wno-stringop-overread +CFLAGS += -Wno-stringop-overflow + TEST_GEN_FILES += huge_count_read_write TEST_FILES = _chk_dependency.sh _debugfs_common.sh