From patchwork Wed Jun 22 06:19:29 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12890208 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 3E4FCCCA47E for ; Wed, 22 Jun 2022 06:20:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id A25798E0081; Wed, 22 Jun 2022 02:20:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 951466B0115; Wed, 22 Jun 2022 02:20:12 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7F28E8E0080; Wed, 22 Jun 2022 02:20:12 -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 7181F6B0114 for ; Wed, 22 Jun 2022 02:20:12 -0400 (EDT) Received: from smtpin09.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 4C8762138D for ; Wed, 22 Jun 2022 06:20:12 +0000 (UTC) X-FDA: 79604871864.09.6935B21 Received: from mail-oi1-f193.google.com (mail-oi1-f193.google.com [209.85.167.193]) by imf21.hostedemail.com (Postfix) with ESMTP id EA0D31C00B6 for ; Wed, 22 Jun 2022 06:20:10 +0000 (UTC) Received: by mail-oi1-f193.google.com with SMTP id p8so19938800oip.8 for ; Tue, 21 Jun 2022 23:20:10 -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=EgCwz4ToIzmDReUQZu4sgbTH8NVQgNV/mGmgD9Uogk1pUe5LSTCpeYU4oOqXz6Hxwp LvAWt1dbO6XTjENzyGU/yL9v2HBzJ31zoRCXqZqboseI4G+tOFjvDV3FxIdYqmpKviKo U1FXkfHCPZ4Z2Y86F1BbvTxt88xWjgNxjxE6LFl4Pku0wreiVEdj25C1WFch38yvc6XF G93ENQwzCk1vL+gCwIjVHEa+X40FW2XzONNTlwgi5bingDO7ll5Y5J8VFy8lkUai6Sgr fMk1UH9mNxRTiv/IWoTSR2gd0Vukf4CAReiRszmT+6qxKIyPwSanNME4nhvWwrVfxNwV zlmQ== 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=wZY7Igxl01qC36J3+WoZotEvyuDrlRF93cORC76///TX6HDqdh9VxD8kmtyhLDjb96 iVENva/5vVMFStxydokciY4qBrCFVAin+X5eTeu9uCHbbHfvCU4iNrlyqIp5xaa1gtuC FTu5aKHJezRqHGTDqp1e+Vkd910oiq8rfNzA/Qq7crZ6vG/TPsKttrSejDidyJ7qqTeW LVqxoj8InLj5nepbFyC5YBwTpmOdMddZeyo7cyr8FnRgnBXzVS9gKX+GkBqzuGDOo1Ky /OMfyn1WTu3FoCLHsmrahcj/iKZe2TxBQHk6xMWRZw4REHDpLYlsWplqvOFKMpC3JAbd WKmQ== X-Gm-Message-State: AJIora8s87S/jRGe9lt1mb8Nv5V7MOfPMvbFSS7YM9EebFlpT53/HDdm pFt0XRFbtHEGCcvH2SPovjg= X-Google-Smtp-Source: AGRyM1tlMQqlFeAttobvlVxOJEaTC1uYWNJH7Yn4A+sxt3w8PY1HoPtyx+na2nTWcMh7n41trh4bSw== X-Received: by 2002:a05:6808:ecf:b0:2f9:f0b1:7ee8 with SMTP id q15-20020a0568080ecf00b002f9f0b17ee8mr1007855oiv.225.1655878795148; Tue, 21 Jun 2022 23:19:55 -0700 (PDT) Received: from bertie (072-190-140-117.res.spectrum.com. [72.190.140.117]) by smtp.gmail.com with ESMTPSA id s24-20020a4adb98000000b0035eb4e5a6b2sm10835340oou.8.2022.06.21.23.19.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 23:19:54 -0700 (PDT) From: Rebecca Mckeever To: Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: David Hildenbrand , Rebecca Mckeever Subject: [PATCH 1/4] memblock tests: add user-provided arguments to Makefile Date: Wed, 22 Jun 2022 01:19:29 -0500 Message-Id: <7deb3d3d4c05c884d3830325c816862ce927133f.1655878337.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; imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=EgCwz4To; spf=pass (imf21.hostedemail.com: domain of remckee0@gmail.com designates 209.85.167.193 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=1655878811; 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=5vwwa5CgbuPdsGw7kjzkSsHtTqol9COKTCTGVRc3bi0SPP0as7vfJpz0PUmn03Q70nfY6C xm3G0FC0qI+OQkMjgXteTZYC+uyAw5maRcWWZigEy5j2R9SnsrBqUz+6Vrxi0SO5AkD2RB LN6zMzlxiU6rmC66e4tfmLI+iyrGoBg= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655878811; a=rsa-sha256; cv=none; b=QAUctFGe9CTmgm4BqLS3ZjYt1i/a+vRvMMmuMqV2lRwaRZrhE8gxtskUeK2Z7Cxxeikgmz RKGCAyhnlUia1fRPDC23XmDNZPqlqZF6oV3UXajiK4QpJ8ML4tIXPjR8L0QHZTqapVHPA9 ADrgafQVA9YCg76rkzYRgr1BfFkAIrA= X-Stat-Signature: mofzwo7tdwwxmitggpz8esymo949yw91 X-Rspam-User: X-Rspamd-Server: rspam07 Authentication-Results: imf21.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=EgCwz4To; spf=pass (imf21.hostedemail.com: domain of remckee0@gmail.com designates 209.85.167.193 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Queue-Id: EA0D31C00B6 X-HE-Tag: 1655878810-690223 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. Signed-off-by: Rebecca Mckeever Reviewed-by: David Hildenbrand --- 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