From patchwork Wed Jun 22 09:09:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12890362 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 88DC2C433EF for ; Wed, 22 Jun 2022 09:09:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 01FB28E00A2; Wed, 22 Jun 2022 05:09:58 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F12908E008A; Wed, 22 Jun 2022 05:09:57 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id DD9FA8E00A2; Wed, 22 Jun 2022 05:09:57 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id CC98F8E008A for ; Wed, 22 Jun 2022 05:09:57 -0400 (EDT) Received: from smtpin31.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay11.hostedemail.com (Postfix) with ESMTP id A624F80818 for ; Wed, 22 Jun 2022 09:09:57 +0000 (UTC) X-FDA: 79605299634.31.940A6E5 Received: from mail-oi1-f194.google.com (mail-oi1-f194.google.com [209.85.167.194]) by imf28.hostedemail.com (Postfix) with ESMTP id 13A10C00BE for ; Wed, 22 Jun 2022 09:09:54 +0000 (UTC) Received: by mail-oi1-f194.google.com with SMTP id v4so20381298oiv.1 for ; Wed, 22 Jun 2022 02:09:54 -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=nUi2WkXJg/BgzH6VJEvkfC77TODZO9BVOsfbGgXl5KM=; b=TaT2XrfrfkbOzaZu/XydxdbzpUsf0f5Kk4Sr8fXKt3NQm2K4V16kRafsg66CGV0VnK bD8+2Beo/6H7r76j1NsB2UR4T2Ooi17iZZXocSS4rKXAXY++eXwGB7WLWfSikvYdPkCc 6EwVwFTQ6Eb73eNCN+InqvR187JopCEAzfjSfaTKtpIRs7LjNZt6mjS+68HYEFUmBU1L 4AQjQMz+r9tjdabZL+aym7u1fs8JNHSeyE2cO53Ss26Bk+VUrUDHfnB5Fh/+4F9voNfb M4va+klhJzA5C79b71tJ1AO0Z+iIOiAwTXPLkBzkRnuOXqwHM5JJji4YhQVoawe/H7RU DDWQ== 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=nUi2WkXJg/BgzH6VJEvkfC77TODZO9BVOsfbGgXl5KM=; b=KQp/7Z8WolWX8XUZD6nJsUNUXr/g7xYze3ArbcF5HRX7blJzfmWhN41v2dVxGNzzLK VcDfRPSJ8eqdDG5GrMeGBkwF3+tsP1fa6ZdDz5eBaM8K9UoJS5TctyR5fZUg3UigLj+n SJhZI8ZH2vPOwiqLw2A550cFXzv3v1uMvMvGr40PFXwNItKEVJWrqriy0Wn6LsKWH8M9 XwfaMPyjyUB4iKIMsApAuXAcVnJE5XdLGuhlRrs3QpSiJsC1fs7N8yqeievdh1wcySIZ 4j68RNuM08Y1hLG0QKZLyPgfXbMkG4yHvZArNl8my2P38fFPvQwMszobfSyXfT8HmY9s Bcug== X-Gm-Message-State: AJIora9PC0fi/jmL7VyF/GFxgwWDLxDfMUIjqgTHv9AWOXT9EdMC1Z5B 0gPwvm7yYDpJ1bd6ZSRtcog= X-Google-Smtp-Source: AGRyM1smYypKAf9N9iSdiM8vzr0dJP+CsGveYdPmbr2p6UW+F7I79+FUy4/9oupujvjLVl+PEqBbDA== X-Received: by 2002:a05:6808:130d:b0:32f:4d01:c4c9 with SMTP id y13-20020a056808130d00b0032f4d01c4c9mr1304891oiv.52.1655888994268; Wed, 22 Jun 2022 02:09:54 -0700 (PDT) Received: from bertie (072-190-140-117.res.spectrum.com. [72.190.140.117]) by smtp.gmail.com with ESMTPSA id y7-20020a056870e3c700b000f342d078fasm10310216oad.52.2022.06.22.02.09.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 Jun 2022 02:09: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 v2 0/4] memblock tests: add VERBOSE and MEMBLOCK_DEBUG Makefile options Date: Wed, 22 Jun 2022 04:09:42 -0500 Message-Id: X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1655888995; 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=nUi2WkXJg/BgzH6VJEvkfC77TODZO9BVOsfbGgXl5KM=; b=vUCfbk3bDhsNk7Gj0/qrB4FlMhstdRXJN9YYFUWMC2UMUrBOHIu6oNlaOW4OU3XtKXvVa3 zIWwIN+/3G0RvCmT3FnIE5w2LaDLURmEADFWrWB4B1ziXZ70zYf1ZPwG9Fy38tBUTp2Rjc xybYlR69b5v2qLgiOE2D3OUEPOQpLqo= ARC-Authentication-Results: i=1; imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=TaT2Xrfr; spf=pass (imf28.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-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1655888995; a=rsa-sha256; cv=none; b=tlPKrygl8kt1hS/I9YAh57RJJjXt+Wi3RIFILAH1B2msMoJtzP//qhRB3+rhIal/iKi+yF PiUsU2ARHnW0ItXnkwg8wQHzTX8d0wVQSEKl5qwOVvLQqx1Gz77lASvjquGsg/YUsj32OY Bk/JRQVQpVwVVxQ/EaHjw4q9tg9+gtQ= X-Rspamd-Queue-Id: 13A10C00BE Authentication-Results: imf28.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=TaT2Xrfr; spf=pass (imf28.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-Rspam-User: X-Stat-Signature: exsz95k6i1m6asxwzzs6ci1q6yqkiaib X-Rspamd-Server: rspam04 X-HE-Tag: 1655888994-324627 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 | 58 +++ tools/testing/memblock/tests/common.h | 54 +++ 11 files changed, 913 insertions(+), 356 deletions(-) --- Changes v1 -> v2 PATCH 2, in common.c: Remove #ifdef VERBOSE around prefixes and related constants Add __maybe_unused to prefixes Move PREFIXES_LEN_MAX, DELIM, and DELIM_LEN so that they are immediately after the other constants Add #ifdef VERBOSE around definitions for test_*() and prefix_*() ---