* [PATCH 0/2] memblock tests: add command line help option and update obsolete comments
@ 2022-08-14 5:50 Rebecca Mckeever
2022-08-14 5:50 ` [PATCH 1/2] memblock tests: add command line help option Rebecca Mckeever
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Rebecca Mckeever @ 2022-08-14 5:50 UTC (permalink / raw)
To: Mike Rapoport, linux-mm, linux-kernel; +Cc: David Hildenbrand, Rebecca Mckeever
These patches add a help command line option to the help message and
update references to an obsolete build option in comments.
Rebecca Mckeever (2):
memblock tests: add command line help option
memblock tests: update reference to obsolete build option in comments
tools/testing/memblock/tests/common.c | 4 +++-
tools/testing/memblock/tests/common.h | 9 ++++++---
2 files changed, 9 insertions(+), 4 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/2] memblock tests: add command line help option
2022-08-14 5:50 [PATCH 0/2] memblock tests: add command line help option and update obsolete comments Rebecca Mckeever
@ 2022-08-14 5:50 ` Rebecca Mckeever
2022-08-14 5:50 ` [PATCH 2/2] memblock tests: update reference to obsolete build option in comments Rebecca Mckeever
2022-08-23 12:21 ` [PATCH 0/2] memblock tests: add command line help option and update obsolete comments Mike Rapoport
2 siblings, 0 replies; 4+ messages in thread
From: Rebecca Mckeever @ 2022-08-14 5:50 UTC (permalink / raw)
To: Mike Rapoport, linux-mm, linux-kernel; +Cc: David Hildenbrand, Rebecca Mckeever
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 <david@redhat.com>
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
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",
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/2] memblock tests: update reference to obsolete build option in comments
2022-08-14 5:50 [PATCH 0/2] memblock tests: add command line help option and update obsolete comments Rebecca Mckeever
2022-08-14 5:50 ` [PATCH 1/2] memblock tests: add command line help option Rebecca Mckeever
@ 2022-08-14 5:50 ` Rebecca Mckeever
2022-08-23 12:21 ` [PATCH 0/2] memblock tests: add command line help option and update obsolete comments Mike Rapoport
2 siblings, 0 replies; 4+ messages in thread
From: Rebecca Mckeever @ 2022-08-14 5:50 UTC (permalink / raw)
To: Mike Rapoport, linux-mm, linux-kernel; +Cc: David Hildenbrand, Rebecca Mckeever
The VERBOSE build option was replaced with the --verbose runtime option,
but the comments describing the ASSERT_*() macros still refer to the
VERBOSE build option. Update these comments so that they refer to the
--verbose runtime option.
Reviewed-by: David Hildenbrand <david@redhat.com>
Signed-off-by: Rebecca Mckeever <remckee0@gmail.com>
---
tools/testing/memblock/tests/common.h | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/tools/testing/memblock/tests/common.h b/tools/testing/memblock/tests/common.h
index 3e7f23d341d7..d396e5423a8e 100644
--- a/tools/testing/memblock/tests/common.h
+++ b/tools/testing/memblock/tests/common.h
@@ -16,7 +16,8 @@
* ASSERT_EQ():
* Check the condition
* @_expected == @_seen
- * If false, print failed test message (if in VERBOSE mode) and then assert
+ * If false, print failed test message (if running with --verbose) and then
+ * assert.
*/
#define ASSERT_EQ(_expected, _seen) do { \
if ((_expected) != (_seen)) \
@@ -28,7 +29,8 @@
* ASSERT_NE():
* Check the condition
* @_expected != @_seen
- * If false, print failed test message (if in VERBOSE mode) and then assert
+ * If false, print failed test message (if running with --verbose) and then
+ * assert.
*/
#define ASSERT_NE(_expected, _seen) do { \
if ((_expected) == (_seen)) \
@@ -40,7 +42,8 @@
* ASSERT_LT():
* Check the condition
* @_expected < @_seen
- * If false, print failed test message (if in VERBOSE mode) and then assert
+ * If false, print failed test message (if running with --verbose) and then
+ * assert.
*/
#define ASSERT_LT(_expected, _seen) do { \
if ((_expected) >= (_seen)) \
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 0/2] memblock tests: add command line help option and update obsolete comments
2022-08-14 5:50 [PATCH 0/2] memblock tests: add command line help option and update obsolete comments Rebecca Mckeever
2022-08-14 5:50 ` [PATCH 1/2] memblock tests: add command line help option Rebecca Mckeever
2022-08-14 5:50 ` [PATCH 2/2] memblock tests: update reference to obsolete build option in comments Rebecca Mckeever
@ 2022-08-23 12:21 ` Mike Rapoport
2 siblings, 0 replies; 4+ messages in thread
From: Mike Rapoport @ 2022-08-23 12:21 UTC (permalink / raw)
To: Rebecca Mckeever; +Cc: linux-mm, linux-kernel, David Hildenbrand
On Sun, Aug 14, 2022 at 12:50:18AM -0500, Rebecca Mckeever wrote:
> These patches add a help command line option to the help message and
> update references to an obsolete build option in comments.
>
> Rebecca Mckeever (2):
> memblock tests: add command line help option
> memblock tests: update reference to obsolete build option in comments
>
> tools/testing/memblock/tests/common.c | 4 +++-
> tools/testing/memblock/tests/common.h | 9 ++++++---
> 2 files changed, 9 insertions(+), 4 deletions(-)
Applied, thanks!
--
Sincerely yours,
Mike.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-08-23 12:22 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-14 5:50 [PATCH 0/2] memblock tests: add command line help option and update obsolete comments Rebecca Mckeever
2022-08-14 5:50 ` [PATCH 1/2] memblock tests: add command line help option Rebecca Mckeever
2022-08-14 5:50 ` [PATCH 2/2] memblock tests: update reference to obsolete build option in comments Rebecca Mckeever
2022-08-23 12:21 ` [PATCH 0/2] memblock tests: add command line help option and update obsolete comments Mike Rapoport
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.