From patchwork Wed Jun 22 06:19:28 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12890209 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 042F1C43334 for ; Wed, 22 Jun 2022 06:20:15 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id E35FB8E0080; Wed, 22 Jun 2022 02:20:12 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id D98386B0115; 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 BF4748E0082; Wed, 22 Jun 2022 02:20:12 -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 986F78E0080 for ; Wed, 22 Jun 2022 02:20:12 -0400 (EDT) Received: from smtpin29.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay13.hostedemail.com (Postfix) with ESMTP id 706B761186 for ; Wed, 22 Jun 2022 06:20:12 +0000 (UTC) X-FDA: 79604871864.29.9C1BA77 Received: from mail-oa1-f67.google.com (mail-oa1-f67.google.com [209.85.160.67]) by imf22.hostedemail.com (Postfix) with ESMTP id 24CACC0008 for ; Wed, 22 Jun 2022 06:20:10 +0000 (UTC) Received: by mail-oa1-f67.google.com with SMTP id 586e51a60fabf-101bb9275bcso16350770fac.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:mime-version :content-transfer-encoding; bh=vhaxOBA3UlWBtIgcnLHVU1ZrfA4tEjpSjLASHfh2pRI=; b=Ex7gJArFhtsyQU1G4KpCVymBx+OkYN6w9WsvuXplatoxOLgy9qa4D6bvCGntMcSC+P ltH13cuk1fVp37A26Jv7C5vnxZLEsIhBWAYaa+LUoEYY+H7cN9jqn+PSv6QH7NQIhS2Z zkkO1aJHSLOi6ZeJttsCkCxRbFimcoiA/7hcVixlby0tuS5dUeXSFAEEx4ym0ewyFR1I +/iTu6S/zXnFLZsqZK1aqS5DZmF9F6WjbTOc9ki1zGQ1bX/Ye7qWh4NLoeygEFeQHQTX paJ6kPFm9eSjIeUtyPhA9VyQJfosPeS9Z4iMn87WqcjVIxKeBU4sh+gona5vE6M2P6hv v2WQ== 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:mime-version :content-transfer-encoding; bh=vhaxOBA3UlWBtIgcnLHVU1ZrfA4tEjpSjLASHfh2pRI=; b=o90soQeGeBAPBXqNX+/ZAmWw35R0jvHcuaIiHN43JZYwnHPIEkxxGKt1IceXsy1JUb tDPE/eEr0ODPn/4eNPc98eIFCKna49QMk4aIyh49Ly+uIIiV6PpF7ufonYAkSn9cj1K/ kuo8+vCPoyhnE6K6wpbiw56eSkHK1rAN0Exqv18yOaAnJxr53JMYDyQUmFTO6tjq/Qmo +u8wEf7OIkCfTuleCvf5lE0w1y5POj9Xera5PtTuqHDmeJeYHkYJvxcwT2EU5JeFK/yX FwLyYxmwgdPiLG0sLPNV1hIFDYagPifsNt0hvqH+yLO7fYSWR5fqzVRHkaEiEdElxzT5 WO5w== X-Gm-Message-State: AJIora+i5NYVngmLIrTRrMuldpgISYPy2RvHA5mO3wMB+JCOMA4089cD RFJLAqdozxMH9Ia9/j+c3ls= X-Google-Smtp-Source: AGRyM1v0rMMZ5bMWvwcHZBxS85WJNUuxhIAx33BMSoPIXJKG7Ji1YBiFUJL+/+2P7NaJVKVOuJD9Vg== X-Received: by 2002:a05:6871:1d0:b0:101:59af:c6b7 with SMTP id q16-20020a05687101d000b0010159afc6b7mr22444435oad.89.1655878789236; Tue, 21 Jun 2022 23:19:49 -0700 (PDT) Received: from bertie (072-190-140-117.res.spectrum.com. [72.190.140.117]) by smtp.gmail.com with ESMTPSA id p10-20020a0568301d4a00b0060be7487954sm10665397oth.26.2022.06.21.23.19.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 21 Jun 2022 23:19:48 -0700 (PDT) From: Rebecca Mckeever To: Mike Rapoport , linux-mm@kvack.org, linux-kernel@vger.kernel.org Cc: David Hildenbrand , Rebecca Mckeever Subject: [PATCH 0/4] memblock tests: add VERBOSE and MEMBLOCK_DEBUG Makefile options Date: Wed, 22 Jun 2022 01:19:28 -0500 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655878811; a=rsa-sha256; cv=none; b=1c0MIvy6SLkeNdQknAgS8HX9CsIp7u4WiZjmxjCJta8fZ96Twa+AseMyw1rJ6GKJCbsfEB olm1eA5ASBxOlUGkfq0aZ4nBSNyc67fDK377t5iJEWqXTGNkYnBkg+qLYwNy5gEsqE1VdE w8hdex1YXFDoQTH3+409qSfkw7RjWxg= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ex7gJArF; spf=pass (imf22.hostedemail.com: domain of remckee0@gmail.com designates 209.85.160.67 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:references:dkim-signature; bh=vhaxOBA3UlWBtIgcnLHVU1ZrfA4tEjpSjLASHfh2pRI=; b=VtWDNf2ocsJOYish1i4NtC5tUAMhJGL22iu6TfLM5GnBdDawEwAgdEjS9GLjpJjNDtuKny 1vv5bjnpC1sgBuQ+vjuQAfKh61WfIRH829uril8gZ231g882GSlNddE0DpVkFf0Uda8cGL trxF85m1CpqFH5wC5BBwi1eU4ajGeL8= X-Stat-Signature: zbwednwtbpxjmxyw5z9x9n5zpzgqycm5 X-Rspamd-Server: rspam06 Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=Ex7gJArF; spf=pass (imf22.hostedemail.com: domain of remckee0@gmail.com designates 209.85.160.67 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspam-User: X-Rspamd-Queue-Id: 24CACC0008 X-HE-Tag: 1655878810-19244 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: These patches add options VERBOSE and MEMBLOCK_DEBUG to Memblock simulator, which can be specified when running make. These patches also implement the functionality for these options. VERBOSE Usage: $ make VERBOSE=1 Passing VERBOSE=1 will enable verbose output from Memblock simulator. For each test, the verbose output includes the name of the memblock function being tested, the name of the test, and whether the test passed or failed. Since all the tests in Memblock simulator run as one monolithic test, this output is a quick way to get a summary of test results. MEMBLOCK_DEBUG Usage: $ make MEMBLOCK_DEBUG=1 Passing MEMBLOCK_DEBUG=1 will enable memblock_dbg() messages. These are debug messages built into several functions in memblock that include information such as the name of the function and the size and start and end addresses of the memblock region. Rebecca Mckeever (4): memblock tests: add user-provided arguments to Makefile memblock tests: add verbose output to memblock tests memblock tests: set memblock_debug to enable memblock_dbg() messages memblock tests: remove completed TODO items tools/testing/memblock/Makefile | 4 + tools/testing/memblock/README | 10 +- tools/testing/memblock/TODO | 14 +- tools/testing/memblock/internal.h | 7 + .../testing/memblock/scripts/Makefile.include | 10 + tools/testing/memblock/tests/alloc_api.c | 241 ++++++++---- .../memblock/tests/alloc_helpers_api.c | 135 +++++-- tools/testing/memblock/tests/alloc_nid_api.c | 371 ++++++++++++------ tools/testing/memblock/tests/basic_api.c | 365 ++++++++++++----- tools/testing/memblock/tests/common.c | 60 +++ tools/testing/memblock/tests/common.h | 54 +++ 11 files changed, 915 insertions(+), 356 deletions(-)