From patchwork Sun Aug 14 05:50:19 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rebecca Mckeever X-Patchwork-Id: 12942839 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 8F8F0C25B0F for ; Sun, 14 Aug 2022 05:50:34 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id C003F8E0003; Sun, 14 Aug 2022 01:50:33 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B88558E0001; Sun, 14 Aug 2022 01:50:33 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A00868E0003; Sun, 14 Aug 2022 01:50:33 -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 928838E0001 for ; Sun, 14 Aug 2022 01:50:33 -0400 (EDT) Received: from smtpin01.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id 69A611C62DB for ; Sun, 14 Aug 2022 05:50:33 +0000 (UTC) X-FDA: 79797123546.01.3D8F4C9 Received: from mail-io1-f66.google.com (mail-io1-f66.google.com [209.85.166.66]) by imf16.hostedemail.com (Postfix) with ESMTP id 1648D180095 for ; Sun, 14 Aug 2022 05:50:32 +0000 (UTC) Received: by mail-io1-f66.google.com with SMTP id v185so3791857ioe.11 for ; Sat, 13 Aug 2022 22:50:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc; bh=YBGvaVNrmSK2tj7lGapunjUsxNRcm9+XAgiS0yNfu2w=; b=jd0o1BNnm1/fZHxWpKBRkvtpcwVhSYnC2WR00sUjHjmuUgVKeA/00kYeP0DofHygQ3 tXkuirh8kHb6ohu0bttDUSAbz4V8ZmkL4FnJLWsBm6hCmHvi28L5AOzKyQ1I2NIkSpVd aoBmIsLCfKvLi92Spk/RspKU8SmrIPw2mjycFyBadfxD2sPM8kLmeIgeUY6g8NymhdmQ w4wmkW2sX5GTPnLu6zJ5eRLLrawe1QmIBw5rWV/zPIFUECla8A+ijYDBL7BkBPHZBDIN KJNeBDMW7rl93RU3MErVgR9qp3w7Lf6H/VK2rEujU++x3EQx68uzZHJ4bpDr5iZn7Sjx popQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc; bh=YBGvaVNrmSK2tj7lGapunjUsxNRcm9+XAgiS0yNfu2w=; b=1dqPfWpV2TtQ+a+Kc0RKk1jYpn3sCLrS+9xY2bqdil9cxLGFynupBdjVHPoGkl+Nt5 PIJUGMWSgG0hQvQSy0gdxs606z882u5Y6Li2mNosSEX4sbMGdL1+X5Mo93XIvhQqQVej 3s8DR9IcRp/ECXtUxrVak/BeGMW+E5GLSVQRLRlnOh0rCrkPUfMAHfbDt3PXM0mnEkBL EfUumInGXckx1Z/fXJaf0PA7GRlCv3uxT5sryCDI2tLQLyD+Jh5wV6OrAVMQ/iYTAnJG sTJRZ2iK/62XoE7Db9Gvc+86cQrftAiliNa9AgcJEQ/SN2GHmN2HG+evz2VO3XVMWz9Z +Yxg== X-Gm-Message-State: ACgBeo2wImfOlA0AgEzgZ/5EVzDFVfGcysDdf+s4bFjbjz1PN8IZ31Pv 2t21+MwjRS2j6Vthf+P/I9A= X-Google-Smtp-Source: AA6agR7blM9G9O6NfLeERcyeIPwliQma41mK9K67DVGfIyv9itOeVf4OETsVsOZjVr11RBD/oQHURQ== X-Received: by 2002:a6b:ba43:0:b0:688:d19:4e8f with SMTP id k64-20020a6bba43000000b006880d194e8fmr901064iof.59.1660456232382; Sat, 13 Aug 2022 22:50:32 -0700 (PDT) Received: from sophie (static-198-54-128-70.cust.tzulo.com. [198.54.128.70]) by smtp.gmail.com with ESMTPSA id l3-20020a92d8c3000000b002de2ea2f78csm2623361ilo.23.2022.08.13.22.50.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 13 Aug 2022 22:50:32 -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/2] memblock tests: add command line help option Date: Sun, 14 Aug 2022 00:50:19 -0500 Message-Id: <0f3b93a79de78c0da1ca90f74fe35e9a85c7cf93.1660451025.git.remckee0@gmail.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: References: MIME-Version: 1.0 ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1660456233; a=rsa-sha256; cv=none; b=1120sJWXxqyEFDh9ebWeNY651574zx0QVc5CNnZehgc2FErWoU47RJjS/2TZQ3RDW3H7m6 b9GTW8LQ1txbQvnC1YIYCqDKkaYCWKk5w5yL77+n7odHgxe0MdNnsIFODKjsxzIDESUWdU 6gmc8RMnHDswmFKeu98f3qsxlAzIqGU= ARC-Authentication-Results: i=1; imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jd0o1BNn; spf=pass (imf16.hostedemail.com: domain of remckee0@gmail.com designates 209.85.166.66 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=1660456233; 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=YBGvaVNrmSK2tj7lGapunjUsxNRcm9+XAgiS0yNfu2w=; b=4zK2R6gONrYMvEc5Rf4EO7VrKRPQEmg2WkXsMbkkLGLVTbjcHU0n2MgUj7H/EflewugUGw LxdBbJrnR5OQPN8RxJFOndKr4Q2XM2w73Tph3NqDbrgjlzWXkIGI1BM+AWcsvxj/2dsib2 meSo/LwnlTZowhxQjYuHB/AFUKEQiUA= X-Stat-Signature: efr5fqgbimimura5xrpp5r3f7o1bfzz9 X-Rspamd-Queue-Id: 1648D180095 X-Rspam-User: X-Rspamd-Server: rspam03 Authentication-Results: imf16.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=jd0o1BNn; spf=pass (imf16.hostedemail.com: domain of remckee0@gmail.com designates 209.85.166.66 as permitted sender) smtp.mailfrom=remckee0@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-HE-Tag: 1660456232-179387 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000001, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Add a help command line option to the help message. Add the help option to the short and long options so it will be recognized as a valid option. Usage: $ ./main -h Or: $ ./main --help Reviewed-by: David Hildenbrand Signed-off-by: Rebecca Mckeever --- tools/testing/memblock/tests/common.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/testing/memblock/tests/common.c b/tools/testing/memblock/tests/common.c index e43b2676af81..76a8ad818f3a 100644 --- a/tools/testing/memblock/tests/common.c +++ b/tools/testing/memblock/tests/common.c @@ -14,14 +14,16 @@ static struct test_memory memory_block; static const char __maybe_unused *prefixes[PREFIXES_MAX]; static int __maybe_unused nr_prefixes; -static const char *short_opts = "mv"; +static const char *short_opts = "hmv"; static const struct option long_opts[] = { + {"help", 0, NULL, 'h'}, {"movable-node", 0, NULL, 'm'}, {"verbose", 0, NULL, 'v'}, {NULL, 0, NULL, 0} }; static const char * const help_opts[] = { + "display this help message and exit", "disallow allocations from regions marked as hotplugged\n\t\t\t" "by simulating enabling the \"movable_node\" kernel\n\t\t\t" "parameter",