From patchwork Wed Jun 22 09:09:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12890363 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 1ACE2C433EF for ; Wed, 22 Jun 2022 09:10:10 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 948798E00A3; Wed, 22 Jun 2022 05:10:09 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8F8158E008A; Wed, 22 Jun 2022 05:10:09 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7BF298E00A3; Wed, 22 Jun 2022 05:10:09 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id 6BFBF8E008A for ; Wed, 22 Jun 2022 05:10:09 -0400 (EDT) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 3D6CA21463 for ; Wed, 22 Jun 2022 09:10:09 +0000 (UTC) X-FDA: 79605300138.07.221BA0D Received: from mail-oi1-f196.google.com (mail-oi1-f196.google.com [209.85.167.196]) by imf29.hostedemail.com (Postfix) with ESMTP id B33AD1200A5 for ; Wed, 22 Jun 2022 09:10:06 +0000 (UTC) Received: by mail-oi1-f196.google.com with SMTP id u9so20338113oiv.12 for ; Wed, 22 Jun 2022 02:10:06 -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=bAy9ZdzvNSqiyUXWluLmSPaqA8dh70j3sUF3U6zADKk=; b=cOTsT1YVhVh0vkiXD++aRy96KHVOOHRHKXGg7xddPMsOTW6M0doY9svJL16vx3M4Pd AFEdmta071zwCGiJlsizK/Uw2yCswwabxfv6pKk+t6z3FrykswUgayWtbnMoWMorhEl0 nuFSGG93wCVON04nYFatRjEznqf9HGBUBE7YFk07im2B1eohqU5CKX2Mn0BoQmAlDlXZ 4kczOYwc9637ZzwGLXbXbsdNRp48kNhfMOl4X56Sc65WWInZB5s3R0JExotPwOvdlkLI ednyfGwPl5YjEFq6CItvYCb/rk6Ff2WncMl/86jBoA1EBRHnEq6FYPh1pVs+B/1mbQ68 KK2g== 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=bAy9ZdzvNSqiyUXWluLmSPaqA8dh70j3sUF3U6zADKk=; b=gvIenGs6ojmWOVAjwic1faI/4xsOjQdTgPcbFOnZqYKNMlINpWCZLmGZq5qFsdyeCv nfhgU/SVMymYOXZu8K5RONs66UkWh9iCwYrkOmfBY1MHwZGmLs4dZqVEu8trqPrcMWa/ nDf8K16p33KbdmwOErgbapqMw4vh2YZaNYdaf8XEvodOpMzu6fIY2HmP35HuXrgnLWhL 3s3SXc2YlvaqHvMtGh4r7AkTlZa0TB4f1DUMlrctHJluEBoLZZqnjxuW28cacKnj2SSN ZzGNXDU4NlUw6C/rzwbgbUHVdp5+oW7YfbTwSBuN9LTzyclZbgNfxNXGWe8wd6Eo/iEG 6dRQ== X-Gm-Message-State: AJIora9yiO+AblQn4gsfujqVGPRLjf1ti8MPXp5om3rIUPMftgiJ/NUj lAkcDLEfl23VlIu8a0+OeX4= X-Google-Smtp-Source: AGRyM1sIl8cNamJruw3MajKB4JJPMqWvDvkYDtHyjNNwcg20jYiIEq+C/au8hBaIeoi6za32+BV1zQ== X-Received: by 2002:a05:6808:17a4:b0:32f:f5f:be1 with SMTP id bg36-20020a05680817a400b0032f0f5f0be1mr1251982oib.26.1655888998341; Wed, 22 Jun 2022 02:09:58 -0700 (PDT) Received: from bertie (072-190-140-117.res.spectrum.com. [72.190.140.117]) by smtp.gmail.com with ESMTPSA id y14-20020a056808130e00b00325cda1ff8dsm11098128oiv.12.2022.06.22.02.09.57 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 02:09:58 -0700 (PDT) From: Rebecca Mckeever To: Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: David Hildenbrand , Rebecca Mckeever Subject: [PATCH v2 1/4] memblock tests: add user-provided arguments to Makefile Date: Wed, 22 Jun 2022 04:09:43 -0500 Message-Id: <7deb3d3d4c05c884d3830325c816862ce927133f.1655887571.git.remckee0@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: References: MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655889006; 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=bAy9ZdzvNSqiyUXWluLmSPaqA8dh70j3sUF3U6zADKk=; b=5WRQbQvFXy1kGkpdAjODnaOlu4bGRKTRBiJWVUmoEehpTaV/4LA2ZDLVJgRCyGuOD/dyFZ 7JERKMpQtmL6LHVxDAoUd5ffhKdkdK4yBJBLG7Zbo+FtpYrbajz2nxRhXoE/uWZ/XA0u9U h50IzrA+JWhQSoxsvMs/C3TYx+y+YSg= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cOTsT1YV; spf=pass (imf29.hostedemail.com: domain of remckee0@gmail.com designates 209.85.167.196 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655889006; a=rsa-sha256; cv=none; b=hqaFfSzfE6xjpkfsaUWuKtDowT75hqPSjJ3JYJR/KJn28Ja5/ldNhX0osMuNuSXP4xKGvq DNGUZTX/kUWvESoMCnUKKMLhd9IkrwOSZSXQ2jYRM4wkSyg4zF/NAMr4SOTc0Bzy+K5xrc XNGGiWRRymaqDLFD0N7YPPwTms1LnT0= X-Rspamd-Queue-Id: B33AD1200A5 Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=cOTsT1YV; spf=pass (imf29.hostedemail.com: domain of remckee0@gmail.com designates 209.85.167.196 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Stat-Signature: widtakg1ehe9ejqic79arppi143g1ur1 X-Rspamd-Server: rspam04 X-HE-Tag: 1655889006-192252 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000625, 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. 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