From patchwork Mon Jul 4 04:06:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12904622 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 A0AA2C43334 for ; Mon, 4 Jul 2022 04:07:14 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 32F2D6B0072; Mon, 4 Jul 2022 00:07:14 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2DF1C6B0073; Mon, 4 Jul 2022 00:07:14 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 17F418E0001; Mon, 4 Jul 2022 00:07:14 -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 0436B6B0072 for ; Mon, 4 Jul 2022 00:07:14 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id CE2A735E56 for ; Mon, 4 Jul 2022 04:07:13 +0000 (UTC) X-FDA: 79648082346.18.1585294 Received: from mail-oi1-f195.google.com (mail-oi1-f195.google.com [209.85.167.195]) by imf04.hostedemail.com (Postfix) with ESMTP id 6A9DD40057 for ; Mon, 4 Jul 2022 04:07:13 +0000 (UTC) Received: by mail-oi1-f195.google.com with SMTP id s188so11356042oib.6 for ; Sun, 03 Jul 2022 21:07:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=xzFZy7EobE569rOuuG/ggjMqoyz7vEjB3IIrzWyAvt8=; b=pDC6G+ylT6GCLesFQgbp2Ge9boWhnSINpjbk7Uo0/j4LFTOm8gEIUm6xkX6GQVswCF zJgm8t1pBT/v0OKuu9kKkhGurvZ0Ej1IMbsMWe8ogMJC1ASs24GqKGUH/oDkKF9t6aJx IUXW241TZB0XMoqTljoce/taPMGn6gRq7gavWHbFyzuaRc945V0ctrpvHv2a6t35iG/+ 3ZvxU0SBL47O/B/SEXIMqnEu146FhR9M/dOFUvpchu8cq0d8ptBKiPxyb4XnIGIv5Xh8 9utZciN2Nte6s8VjtbhOq5FPRcv9xlKQLpBGrTx7gy0Cpewo+pwIlDpjpgL2liVayNjf Dm1g== 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=xzFZy7EobE569rOuuG/ggjMqoyz7vEjB3IIrzWyAvt8=; b=rz7AbaC3FoUtaTn24H7Vb2P1ZCEVqmQpo7JpWGBJNcWCkK0yGcwhyaTC7JsQEO2Br4 sYODQ3Pqp8a/f7mga+STShHeKuhwYm6yki20gBEsliGEr0t1ewfewpthCNeCfV7HgGmg i6k5rZVPv+TAtyTQoHLFEx12yKa9o6n4NvHM7IaAY/wfbmZ5Ui8boB+WWDyXssMUXb+z HEkQMtRG9r620PT2Q7iqY8Mh6yvSI7QvkNMVK/HdIoD6ay6s0thdiy8LylD29Nbi0uy1 duNDKRCWnCdfDaRsCjnLC8MkDl3qHa6RgtkxoZkowYqsTYtNHI/CGWeFxCrTxA1bF7IS cSlw== X-Gm-Message-State: AJIora+la01z6VkZST1F9r5k1isHHKHI8m/WtwKXRwQzakvPVLtLZye0 BcCPZK4Ad7MVVwK1aEJS9Bk= X-Google-Smtp-Source: AGRyM1t0Qd6auPky+T4yghJZafEwEdynJg6Upmpp/8MKTVj6y1IjCJxmJXdMmgdGxOFeSK34NeXhAA== X-Received: by 2002:a05:6808:23ce:b0:335:5aea:8e62 with SMTP id bq14-20020a05680823ce00b003355aea8e62mr16357426oib.253.1656907632601; Sun, 03 Jul 2022 21:07:12 -0700 (PDT) Received: from bertie (072-190-140-117.res.spectrum.com. [72.190.140.117]) by smtp.gmail.com with ESMTPSA id t5-20020a4aa3c5000000b0035ef3da8387sm15161005ool.4.2022.07.03.21.07.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 03 Jul 2022 21:07:12 -0700 (PDT) From: Rebecca Mckeever To: Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: David Hildenbrand , Rebecca Mckeever Subject: [PATCH v5 1/4] memblock tests: Makefile: add arguments to control verbosity Date: Sun, 3 Jul 2022 23:06:55 -0500 Message-Id: <5503f3efe82ecef5c99961a1d53003c8ad06cf27.1656907314.git.remckee0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656907633; a=rsa-sha256; cv=none; b=Xg1nzHWgi6fAQ/oxwsqL5iE1wDS2XFqKDUDwmO7hLrO9kZZajjXYFRnH8YgTmuVMUPdEH2 G7DSSAN/RvE73lm5jS4WvOrnC5XrqpkhlFOvR9O9TNRBb/SEFKGya1+/D/ARUizL+MxVX1 C3l/TtM1CX3LDtuPgpurUPribu6FZdw= ARC-Authentication-Results: i=1; imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pDC6G+yl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf04.hostedemail.com: domain of remckee0@gmail.com designates 209.85.167.195 as permitted sender) smtp.mailfrom=remckee0@gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1656907633; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=xzFZy7EobE569rOuuG/ggjMqoyz7vEjB3IIrzWyAvt8=; b=69rByJ7DikuAjUZW2XASN3dUqmXmg1UeZv/tivJLsZTv5kr4A+5y68J5bn5CjvHJYulW/w R/TmAtzeMSrffblebOq7XlotwIT/713ORXFUI+ES8yyMCcCZCB69DpZAI3NnpIKLVI/Fty vpY0hS8swZrxCa8foysjRK+w/GuNtCA= X-Rspam-User: X-Rspamd-Server: rspam07 Authentication-Results: imf04.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=pDC6G+yl; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf04.hostedemail.com: domain of remckee0@gmail.com designates 209.85.167.195 as permitted sender) smtp.mailfrom=remckee0@gmail.com X-Stat-Signature: j3qxrn3qnu7d9966g95basiw3qebeyb9 X-Rspamd-Queue-Id: 6A9DD40057 X-HE-Tag: 1656907633-241238 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add VERBOSE and MEMBLOCK_DEBUG user-provided arguments. VERBOSE will enable verbose output from Memblock simulator. MEMBLOCK_DEBUG will enable memblock_dbg() messages. Update the help message to include VERBOSE and MEMBLOCK_DEBUG. Update the README to include VERBOSE. The README does not include all available options and refers to the help message for the remaining options. Therefore, omit MEMBLOCK_DEBUG from README. Reviewed-by: David Hildenbrand Signed-off-by: Rebecca Mckeever --- tools/testing/memblock/Makefile | 4 ++++ tools/testing/memblock/README | 10 +++++++++- tools/testing/memblock/scripts/Makefile.include | 10 ++++++++++ 3 files changed, 23 insertions(+), 1 deletion(-) diff --git a/tools/testing/memblock/Makefile b/tools/testing/memblock/Makefile index a698e24b35e7..9fde49ad73bd 100644 --- a/tools/testing/memblock/Makefile +++ b/tools/testing/memblock/Makefile @@ -45,6 +45,10 @@ help: @echo ' clean - Remove generated files and symlinks in the directory' @echo '' @echo 'Configuration:' + @echo ' make VERBOSE=1 - enable verbose output, which includes the' + @echo ' names of functions being tested and the' + @echo ' number of test cases passing' + @echo ' make MEMBLOCK_DEBUG=1 - enable memblock_dbg() messages' @echo ' make NUMA=1 - simulate enabled NUMA' @echo ' make MOVABLE_NODE=1 - override `movable_node_is_enabled`' @echo ' definition to simulate movable NUMA nodes' diff --git a/tools/testing/memblock/README b/tools/testing/memblock/README index ca6afcff013a..058146b528a5 100644 --- a/tools/testing/memblock/README +++ b/tools/testing/memblock/README @@ -34,7 +34,15 @@ To run the tests, build the main target and run it: $ make && ./main A successful run produces no output. It is also possible to override different -configuration parameters. For example, to simulate enabled NUMA, use: +configuration parameters. For example, to include verbose output, specify the +VERBOSE flag when building the main target: + +$ make VERBOSE=1 + +This will print information about which functions are being tested and the +number of test cases that passed. + +To simulate enabled NUMA, use: $ make NUMA=1 diff --git a/tools/testing/memblock/scripts/Makefile.include b/tools/testing/memblock/scripts/Makefile.include index 641569ccb7b0..4401f79bed4c 100644 --- a/tools/testing/memblock/scripts/Makefile.include +++ b/tools/testing/memblock/scripts/Makefile.include @@ -17,3 +17,13 @@ ifeq ($(32BIT_PHYS_ADDR_T), 1) CFLAGS += -m32 -U CONFIG_PHYS_ADDR_T_64BIT LDFLAGS += -m32 endif + +# Enable verbose testing output +ifeq ($(VERBOSE), 1) + CFLAGS += -D VERBOSE +endif + +# Enable memblock_dbg() messages +ifeq ($(MEMBLOCK_DEBUG), 1) + CFLAGS += -D MEMBLOCK_DEBUG +endif