From patchwork Mon Jun 27 22:34:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12897270 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 AA906C43334 for ; Mon, 27 Jun 2022 22:35:16 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 3098C8E0003; Mon, 27 Jun 2022 18:35:16 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 2B7D48E0001; Mon, 27 Jun 2022 18:35:16 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 180CC8E0003; Mon, 27 Jun 2022 18:35:16 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 077CB8E0001 for ; Mon, 27 Jun 2022 18:35:16 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay02.hostedemail.com (Postfix) with ESMTP id AD4B233098 for ; Mon, 27 Jun 2022 22:35:15 +0000 (UTC) X-FDA: 79625472990.13.15AEF8D Received: from mail-ot1-f67.google.com (mail-ot1-f67.google.com [209.85.210.67]) by imf10.hostedemail.com (Postfix) with ESMTP id DA5CDC0033 for ; Mon, 27 Jun 2022 22:35:13 +0000 (UTC) Received: by mail-ot1-f67.google.com with SMTP id 73-20020a9d084f000000b00616b04c7656so7120686oty.3 for ; Mon, 27 Jun 2022 15:35: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=Xh27ketfaXEFOC6DK+tiYw5iMMoL/8r1KDSWyHu9v+GhHyClT1FLNSK4ljf9Y7opT3 v/E9krxlR5R+3Po9ayj1brra3jRWV7Gg3G/w9YXFAJHKr+PlLsUVMAbqwlcpIYska0QE bPNG87vmig13yB02ng9WgITScuYvnQCF7R29/blPfnzf+7uiaxqn0EiO+tPji3P0Bkyu 3QzsOt0/pixEt/PYrZqtMlnLax3JHtov76tNg7JpP+gplIdXd5U/iewKIT5qUlRP2Yvl B/aSqffVOJRBVOMqbaXZhW2ybGWM24YpYQsOpNP0gI1p0tfDjtbt9I93BnaXBhF5yIfC y7vg== 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=SMaCgWDTTtezvbDq8TWSi5ALmsAbPcPxjakAHDgj/aAZEZlTPjN0rIyCI/6kuUcSE0 E3TmRRc1ucCCMlgOZah93R1FGYDKKJ9DCPKV/ZmTAKoNFGsYAFq0Ab/bI1zXQNRMuCiH qhcynrD0YHWTGwMWOQhotWgVMMzT5Dhxy50SlkEqNA8aMFk4f1HXFHFdOQrMib1sM2hF ZtnlpPedKOK+4e9fKfm+M8OyGOlHvErC3JzZkfEfjWeV9SMPtneHDDm38NrZycYpsYW/ XPZ++/2zHGbRC1R8eKGUeVcIS/vYYodgO2VtALr0EDAT/pWCGHvyGq3JSyrsrYQoZQFd ineg== X-Gm-Message-State: AJIora8vHApJ7dz5AJ2L9zcQ7d+FByGj98KpqnYNtRyd1UuPv5NZJwwx s4hu5ihQ+mls8uudrQ1eubA= X-Google-Smtp-Source: AGRyM1s34ggEikw34W5Mov+HOaasnI898DPmxdgNgkQk0hun/YjDp5qnH9KAnLWB+U4TtjKK/hFk8w== X-Received: by 2002:a9d:2da4:0:b0:616:8feb:6293 with SMTP id g33-20020a9d2da4000000b006168feb6293mr6788371otb.222.1656369313117; Mon, 27 Jun 2022 15:35:13 -0700 (PDT) Received: from bertie (072-190-140-117.res.spectrum.com. [72.190.140.117]) by smtp.gmail.com with ESMTPSA id o7-20020a056870524700b0010897986b82sm3470666oai.2.2022.06.27.15.35.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 15:35: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 v4 1/4] memblock tests: Makefile: add arguments to control verbosity Date: Mon, 27 Jun 2022 17:34:27 -0500 Message-Id: <5503f3efe82ecef5c99961a1d53003c8ad06cf27.1656368930.git.remckee0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Xh27ketf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf10.hostedemail.com: domain of remckee0@gmail.com designates 209.85.210.67 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=1656369314; 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=Mvxm+VeQSJ6mW3yN/+G0UKbK2e2ns03th2PtHzQigowva66WNrvrhExvSnCwrln3Rmq5HP vvswYMG8v+7/iBq8UKSl8Vf3qqVGI7l0Sgt4u/HGV89cB8H33VdXTbMN9YXGHt6C34DLb0 6+ZsLA+LSHqQ41SUFlQgb3hgk1/+MZ8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1656369314; a=rsa-sha256; cv=none; b=Nlhqs1xTEtSEHZJoQaAP/npPAQTXHzPKviGpMQDTMxPgdgfNqUcJex59iRbVN2GQ+y78Rj AajEnNxxaWWhQvcFTax23SAB8yf9uMLRzOCZFI8sR0fB2LeUybhvXPGSq+dxmcPSfdDzJw 4KvXjhAj9LJ8J72D2A3VsQSpidhPIeM= X-Stat-Signature: ktzorokxjei8hu5g17igcgrij3pz4agk X-Rspamd-Queue-Id: DA5CDC0033 X-Rspam-User: Authentication-Results: imf10.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Xh27ketf; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (imf10.hostedemail.com: domain of remckee0@gmail.com designates 209.85.210.67 as permitted sender) smtp.mailfrom=remckee0@gmail.com X-Rspamd-Server: rspam12 X-HE-Tag: 1656369313-340125 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