From: "Alex Bennée" <alex.bennee@linaro.org>
To: Gustavo Romero <gustavo.romero@linaro.org>
Cc: qemu-devel@nongnu.org, richard.henderson@linaro.org,
philmd@linaro.org, peter.maydell@linaro.org
Subject: Re: [PATCH v3 3/4] tests/guest-debug: Support passing arguments to the GDB test script
Date: Fri, 06 Sep 2024 14:49:11 +0100 [thread overview]
Message-ID: <87plpgsxig.fsf@draig.linaro.org> (raw)
In-Reply-To: <20240825145208.46774-4-gustavo.romero@linaro.org> (Gustavo Romero's message of "Sun, 25 Aug 2024 14:52:07 +0000")
Gustavo Romero <gustavo.romero@linaro.org> writes:
> This commit adds support for passing arguments to the GDB test scripts
> so it's possible to parse the args in an "argparse way" in the test
> scripts launched by the runner. The arguments should be preceded by --
> when passed to the runner. For example, passing "--help" arg to the
> GDB_TEST_SCRIPT:
>
> run-test.py [...] --test <GDB_TEST_SCRIPT> -- --help
>
> The test script should not use the argparse module directly but import
> arg_parser from test_gdbstub module. arg_parser then can be used just
> like the argparse.ArgumentParser class:
>
> from test_gdbstub import arg_parser
>
> p = arg_parser(prog="test-mytest.py", description="My test.")
> p.add_argument("--vowel", help="Select vowel",
> required=True, choices=['a','e','i','o','u'])
> [...]
>
> The arg_parser allows a smooth and informative exit if, for instance,
> the caller of the runner script passes an invalid argument or misses a
> required argument by the test script.
>
> Signed-off-by: Gustavo Romero <gustavo.romero@linaro.org>
Reviewed-by: Alex Bennée <alex.bennee@linaro.org>
--
Alex Bennée
Virtualisation Tech Lead @ Linaro
next prev parent reply other threads:[~2024-09-06 13:49 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-25 14:52 [PATCH v3 0/4] gdbstub: Add support for MTE in system mode Gustavo Romero
2024-08-25 14:52 ` [PATCH v3 1/4] gdbstub: Use specific MMU index when probing MTE addresses Gustavo Romero
2024-08-25 14:52 ` [PATCH v3 2/4] gdbstub: Add support for MTE in system mode Gustavo Romero
2024-08-25 14:52 ` [PATCH v3 3/4] tests/guest-debug: Support passing arguments to the GDB test script Gustavo Romero
2024-09-06 13:49 ` Alex Bennée [this message]
2024-08-25 14:52 ` [PATCH v3 4/4] tests/tcg/aarch64: Extend MTE gdbstub tests to system mode Gustavo Romero
2024-08-26 6:10 ` Philippe Mathieu-Daudé
2024-08-27 12:42 ` Gustavo Romero
2024-08-27 18:01 ` Gustavo Romero
2024-08-29 0:43 ` Richard Henderson
2024-08-29 20:13 ` Gustavo Romero
2024-08-29 22:16 ` Richard Henderson
2024-08-30 22:35 ` Gustavo Romero
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plpgsxig.fsf@draig.linaro.org \
--to=alex.bennee@linaro.org \
--cc=gustavo.romero@linaro.org \
--cc=peter.maydell@linaro.org \
--cc=philmd@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=richard.henderson@linaro.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).