From: Thomas Haller <thaller@redhat.com>
To: Pablo Neira Ayuso <pablo@netfilter.org>
Cc: NetFilter <netfilter-devel@vger.kernel.org>
Subject: Re: [PATCH nft 1/1] tests/shell: accept name of dump files in place of test names
Date: Thu, 23 Nov 2023 14:07:49 +0100 [thread overview]
Message-ID: <17362139899b24a4433c6f1ec18106a064bd85f7.camel@redhat.com> (raw)
In-Reply-To: <ZV8uCk27rVe5ts9t@calendula>
On Thu, 2023-11-23 at 11:48 +0100, Pablo Neira Ayuso wrote:
> On Wed, Nov 22, 2023 at 07:22:25PM +0100, Thomas Haller wrote:
> > diff --git a/tests/shell/run-tests.sh b/tests/shell/run-tests.sh
> > index 3cde97b7ea17..c26142b7ff17 100755
> > --- a/tests/shell/run-tests.sh
> > +++ b/tests/shell/run-tests.sh
> > @@ -431,6 +431,19 @@ for t in "${TESTSOLD[@]}" ; do
> > elif [ -d "$t" ] ; then
> > TESTS+=( $(find_tests "$t") )
> > else
> > + if [ -f "$t" ] ; then
> > + # If the test name looks like a dumps
> > file, autodetect
> > + # the correct test name. It's not useful
> > to bother the
> > + # user with a failure in this case.
> > + rx="^(.*/)?dumps/([^/]+)\\.(nodump|nft|jso
> > n-nft)$"
> > + if [[ "$t" =~ $rx ]] ; then
> > + t2="${BASH_REMATCH[1]}${BASH_REMAT
> > CH[2]}"
> > + if [ -f "$t2" -a -x "$t2" ] ; then
> > + TESTS+=( "$t2" )
> > + continue
> > + fi
> > + fi
> > + fi
>
> I think it is not worth, users of this infrastructure is very small.
>
> So let's keep back this usability feature for tests/shell.
OK. Fine.
But while closing and dropping it, let me still make the use case
clear.
When I look at a patch in `git-log` and see for example the diff-stat:
src/json.c | 25 +++++++++++++------------
src/parser_json.c | 91 +++++++++++++++++++++++++++++++++++++++++++++----------------------------------------------
tests/shell/testcases/chains/dumps/0021prio_0.json-nft | Bin 61509 -> 61639 bytes
tests/shell/testcases/chains/dumps/0042chain_variable_0.json-nft | Bin 952 -> 1046 bytes
tests/shell/testcases/chains/dumps/0043chain_ingress_0.json-nft | Bin 619 -> 632 bytes
I'd like to re-run those tests. I'd like to do that by copy-pasting the
file names at hand into the terminal.
Thomas
prev parent reply other threads:[~2023-11-23 13:07 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-22 18:22 [PATCH nft 1/1] tests/shell: accept name of dump files in place of test names Thomas Haller
2023-11-23 10:48 ` Pablo Neira Ayuso
2023-11-23 13:07 ` Thomas Haller [this message]
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=17362139899b24a4433c6f1ec18106a064bd85f7.camel@redhat.com \
--to=thaller@redhat.com \
--cc=netfilter-devel@vger.kernel.org \
--cc=pablo@netfilter.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).