From patchwork Wed Jun 22 09:29:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12890401 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 0296EC43334 for ; Wed, 22 Jun 2022 09:29:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 88C9B8E00A9; Wed, 22 Jun 2022 05:29:37 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 83BCD8E00A5; Wed, 22 Jun 2022 05:29:37 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 6DD0E8E00A9; Wed, 22 Jun 2022 05:29:37 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0015.hostedemail.com [216.40.44.15]) by kanga.kvack.org (Postfix) with ESMTP id 5D5608E00A5 for ; Wed, 22 Jun 2022 05:29:37 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id AB13234596 for ; Wed, 22 Jun 2022 09:29:35 +0000 (UTC) X-FDA: 79605349110.29.9951ACF Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by imf19.hostedemail.com (Postfix) with ESMTP id 5E7AD1A00BA for ; Wed, 22 Jun 2022 09:29:33 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id l81so20406616oif.9 for ; Wed, 22 Jun 2022 02:29:33 -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=Yi2rupt2gqO0TXPAhwMzEoXicOGPWzkZYLtKaqwX5sv5fjgIYq3rZb3R/vgBXYmIjq giyViDEHu+DCwEPCXcny9wrQgUo0AtT4tMBMiXpAlPLpARr1X5ZNFdxuf39m9miwt0QP AOgTSvfi6Bn8v737usTipbLNyeA2oPBzM+vR/bVl4/ABFZT2VIarzXwTaunUbFYIpf+q cmRrkYX4ZVJcBznk5CsEbbqXT9EC2zdVg/4CNrtbtZw9bN0IZS9h9FUXIiw9wtXveqO9 tgkGxhBfAgbSaOJQzWi/w0ERFqJyEmsof4c7r6ExDzYMEHlnMU/jd4khiWK3l5NUBxId 3wVg== 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=OLnA0Xnmh5gZELi7NmnQVdhqYyeO02BipD9zlMOORJ5LM65USaItmABFUzk4+3C2rN 3hKtIwzuXlZiyp+zC3zpihE8Gfc8IGWuoj+LpSypryA1HqoT1KNGCUXE+Asgj5JUxSgH d7fCzOumnYh4uRovOQB9K75sqGD0hghNdxC5L2ceiAaaxUxbhj+yydnZSDr0z+4cn1qD SGCx6H1WAPQRe14XcGMjWaAf4471yrz2pr2IdFswsA4MzKaomx1mMDWvtncOkcrmc5y1 oZ3woaDt0oCLcLDwqf1uyhVzwcN2eCnb3trNy/09H1OdUzqASTQzzoL5GQ+/T06FX1TI rdRw== X-Gm-Message-State: AOAM530Tbx7zZcvY/pYHLkUf+ES6KUEi3LpEONOef+m0PEyoZKArgT0U ji9SfvZlm/XjBwIuOe4uFNU= X-Google-Smtp-Source: ABdhPJwXl4mJ3gLaWz5a2mal8GQQEvRZB4IXNkgmCdIoGKbfL20IbEcvlw+rsFyYz12pL5dSVHvcwg== X-Received: by 2002:a05:6808:1598:b0:32e:ff1f:1dbf with SMTP id t24-20020a056808159800b0032eff1f1dbfmr20777596oiw.259.1655890157618; Wed, 22 Jun 2022 02:29:17 -0700 (PDT) Received: from bertie (072-190-140-117.res.spectrum.com. [72.190.140.117]) by smtp.gmail.com with ESMTPSA id dt13-20020a0568705a8d00b00101afc7b263sm8584818oab.9.2022.06.22.02.29.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 02:29:17 -0700 (PDT) From: Rebecca Mckeever To: Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: David Hildenbrand , Rebecca Mckeever Subject: [PATCH v3 1/4] memblock tests: add user-provided arguments to Makefile Date: Wed, 22 Jun 2022 04:29:06 -0500 Message-Id: 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=1655890173; a=rsa-sha256; cv=none; b=6J8Tv59ZMTTP/80Gpw9o1AProookaKfTuCnjivk9lSStvA673vB6lxxX/xRHWzhUT2sykx fw7oac9u/UX11mJpe3FhMagAc5mv9hgPJs1K0xkNG9aKMTRvwyXFffCgOZ79iz7PGsxxYA t0rJoRJ+AnpxDBQZFV01y/9ctAgaSr8= ARC-Authentication-Results: i=1; imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Yi2rupt2; spf=pass (imf19.hostedemail.com: domain of remckee0@gmail.com designates 209.85.167.194 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655890173; 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=re9wgfy6JS1n2KfO8z+0nCiycL4mjAyLhALZXa4gZvrVIdVkjp3JlrwckwQO4PAeeVU0a5 uJ44jZPiqsvTwIpTi45br89Qn9nRIvqyNE1L7AFsCEi76nFSQWOEIeat1mso7HILEjqkYy PIkPdmbdliAv+ra37yZFf5jpVwxsKUk= X-Rspamd-Queue-Id: 5E7AD1A00BA X-Rspam-User: Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Yi2rupt2; spf=pass (imf19.hostedemail.com: domain of remckee0@gmail.com designates 209.85.167.194 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam08 X-Stat-Signature: y34pk33xu63xj1i7dr5ty1yys9enw45s X-HE-Tag: 1655890173-865474 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