From: "Juraj Linkeš" <juraj.linkes@pantheon.tech>
To: Luca Vizzarro <luca.vizzarro@arm.com>
Cc: dev@dpdk.org, Jeremy Spewock <jspewock@iol.unh.edu>,
Paul Szczepanek <paul.szczepanek@arm.com>
Subject: Re: [PATCH v5 2/3] dts: constrain DPDK source argument
Date: Thu, 30 May 2024 17:41:19 +0200 [thread overview]
Message-ID: <CAOb5WZaHWYUP3j5ef86ytf-U8=Gjb-KULAzTLw2wB7WXmPp9jQ@mail.gmail.com> (raw)
In-Reply-To: <20240514121023.1957025-3-luca.vizzarro@arm.com>
> diff --git a/doc/guides/tools/dts.rst b/doc/guides/tools/dts.rst
> index 6993443389..f64ab7f732 100644
> --- a/doc/guides/tools/dts.rst
> +++ b/doc/guides/tools/dts.rst
> @@ -215,41 +215,38 @@ DTS is run with ``main.py`` located in the ``dts`` directory after entering Poet
> .. code-block:: console
>
> (dts-py3.10) $ ./main.py --help
> - usage: main.py [-h] [--config-file FILE_PATH] [--output-dir DIR_PATH] [-t SECONDS] [-v] [-s] [--tarball FILE_PATH]
> + usage: main.py [-h] [--config-file FILE_PATH] [--output-dir DIR_PATH] [-t SECONDS] [-v] [-s] (--tarball FILE_PATH | --revision ID)
> [--compile-timeout SECONDS] [--test-suite TEST_SUITE [TEST_CASES ...]] [--re-run N_TIMES]
>
> - Run DPDK test suites. All options may be specified with the environment variables provided in brackets. Command
> - line arguments have higher priority.
> + Run DPDK test suites. All options may be specified with the environment variables provided in brackets. Command line arguments have higher
> + priority.
>
> options:
> -h, --help show this help message and exit
> --config-file FILE_PATH
> - [DTS_CFG_FILE] The configuration file that describes the test cases, SUTs and targets.
> - (default: conf.yaml)
> + [DTS_CFG_FILE] The configuration file that describes the test cases, SUTs and targets. (default:
> + /home/lucviz01/dpdk/dts/conf.yaml)
The path has changed.
> diff --git a/dts/framework/settings.py b/dts/framework/settings.py
> index b19f274f9d..50d8929450 100644
> --- a/dts/framework/settings.py
> +++ b/dts/framework/settings.py
> @@ -84,7 +90,24 @@
> from typing import Callable, ParamSpec
>
> from .config import TestSuiteConfig
> -from .utils import DPDKGitTarball
> +from .exception import ConfigurationError
> +from .utils import DPDKGitTarball, get_commit_id
> +
> +
> +def _parse_tarball_path(file_path: str) -> Path:
> + """Validate whether `file_path` is valid and return a Path object."""
> + path = Path(file_path)
> + if not path.exists() or not path.is_file():
> + raise argparse.ArgumentTypeError("The file path provided is not a valid file")
> + return path
> +
> +
> +def _parse_revision_id(rev_id: str) -> str:
> + """Validate revision ID and retrieve corresponding commit ID."""
> + try:
> + return get_commit_id(rev_id)
> + except ConfigurationError:
> + raise argparse.ArgumentTypeError("The Git revision ID supplied is invalid or ambiguous")
I made the comment about ordering in the other patch with these
functions in mind, so let's not forget these.
next prev parent reply other threads:[~2024-05-30 15:41 UTC|newest]
Thread overview: 53+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-22 18:26 [PATCH 0/4] dts: error and usage improvements Luca Vizzarro
2024-01-22 18:26 ` [PATCH 1/4] dts: constrain DPDK source flag Luca Vizzarro
2024-01-29 11:47 ` Juraj Linkeš
2024-02-23 19:09 ` Luca Vizzarro
2024-03-01 10:22 ` Juraj Linkeš
2024-01-22 18:26 ` [PATCH 2/4] dts: customise argparse error message Luca Vizzarro
2024-01-29 13:04 ` Juraj Linkeš
2024-02-23 19:12 ` Luca Vizzarro
2024-02-26 9:09 ` Juraj Linkeš
2024-01-22 18:26 ` [PATCH 3/4] dts: show help when DTS is ran without args Luca Vizzarro
2024-01-22 18:26 ` [PATCH 4/4] dts: log stderr with failed remote commands Luca Vizzarro
2024-01-29 13:10 ` Juraj Linkeš
2024-02-23 19:19 ` Luca Vizzarro
2024-02-26 9:05 ` Juraj Linkeš
2024-03-18 17:17 ` [PATCH v2 0/3] dts: error and usage improvements Luca Vizzarro
2024-03-18 17:17 ` [PATCH v2 1/3] dts: rework arguments framework Luca Vizzarro
2024-04-04 9:25 ` Juraj Linkeš
2024-04-09 15:14 ` Luca Vizzarro
2024-04-10 9:46 ` Juraj Linkeš
2024-03-18 17:17 ` [PATCH v2 2/3] dts: constrain DPDK source argument Luca Vizzarro
2024-03-18 17:17 ` [PATCH v2 3/3] dts: store stderr in RemoteCommandExecutionError Luca Vizzarro
2024-05-14 11:44 ` [PATCH v3 0/3] error and usage improvements Luca Vizzarro
2024-05-14 11:44 ` [PATCH v3 1/3] dts: rework arguments framework Luca Vizzarro
2024-05-14 11:55 ` [PATCH v3] " Luca Vizzarro
2024-05-14 11:44 ` [PATCH v3 2/3] dts: constrain DPDK source argument Luca Vizzarro
2024-05-14 11:44 ` [PATCH v3 3/3] dts: store stderr in RemoteCommandExecutionError Luca Vizzarro
2024-05-14 12:04 ` [PATCH v4 0/3] error and usage improvements Luca Vizzarro
2024-05-14 12:05 ` [PATCH v4 1/3] dts: update mypy static checker Luca Vizzarro
2024-05-14 12:05 ` [PATCH v4 2/3] dts: clean up config types Luca Vizzarro
2024-05-14 12:05 ` [PATCH v4 3/3] dts: rework arguments framework Luca Vizzarro
2024-05-14 12:10 ` [PATCH v5 0/3] error and usage improvements Luca Vizzarro
2024-05-14 12:10 ` [PATCH v5 1/3] dts: rework arguments framework Luca Vizzarro
2024-05-30 15:30 ` Juraj Linkeš
2024-05-30 18:43 ` Luca Vizzarro
2024-05-31 9:04 ` Juraj Linkeš
2024-05-14 12:10 ` [PATCH v5 2/3] dts: constrain DPDK source argument Luca Vizzarro
2024-05-30 15:41 ` Juraj Linkeš [this message]
2024-05-30 18:46 ` Luca Vizzarro
2024-05-14 12:10 ` [PATCH v5 3/3] dts: store stderr in RemoteCommandExecutionError Luca Vizzarro
2024-05-30 15:47 ` Juraj Linkeš
2024-05-30 18:48 ` Luca Vizzarro
2024-05-14 15:26 ` [PATCH v5 0/3] error and usage improvements Luca Vizzarro
2024-05-31 11:20 ` [PATCH v6 " Luca Vizzarro
2024-05-31 11:20 ` [PATCH v6 1/3] dts: rework arguments framework Luca Vizzarro
2024-05-31 12:49 ` Juraj Linkeš
2024-06-14 13:55 ` Jeremy Spewock
2024-05-31 11:20 ` [PATCH v6 2/3] dts: constrain DPDK source argument Luca Vizzarro
2024-05-31 12:50 ` Juraj Linkeš
2024-06-14 13:56 ` Jeremy Spewock
2024-05-31 11:20 ` [PATCH v6 3/3] dts: store stderr in RemoteCommandExecutionError Luca Vizzarro
2024-05-31 12:51 ` Juraj Linkeš
2024-06-14 13:56 ` Jeremy Spewock
2024-06-20 0:24 ` [PATCH v6 0/3] error and usage improvements Thomas Monjalon
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='CAOb5WZaHWYUP3j5ef86ytf-U8=Gjb-KULAzTLw2wB7WXmPp9jQ@mail.gmail.com' \
--to=juraj.linkes@pantheon.tech \
--cc=dev@dpdk.org \
--cc=jspewock@iol.unh.edu \
--cc=luca.vizzarro@arm.com \
--cc=paul.szczepanek@arm.com \
/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).