All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Paolo Abeni <pabeni@redhat.com>,
	Mat Martineau <mathew.j.martineau@linux.intel.com>
Cc: mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next 3/9] selftests: mptcp: join: option to execute specific tests
Date: Thu, 10 Feb 2022 11:42:33 +0100	[thread overview]
Message-ID: <8caf46ee-11b6-aefa-3edd-e17c0928efc7@tessares.net> (raw)
In-Reply-To: <066bb7a33e8f2128968c4aec5ba57c38b2f2c4cd.camel@redhat.com>

Hi Mat, Paolo,

On 10/02/2022 11:04, Paolo Abeni wrote:
> On Wed, 2022-02-09 at 16:36 -0800, Mat Martineau wrote:
>> On Wed, 9 Feb 2022, Matthieu Baerts wrote:
>>
>>> Often, it is needed to run one specific test.
>>>
>>> There are options to run subgroups of tests but when only one fails, no
>>> need to run all the subgroup. So far, the solution was to edit the
>>> script to comment the tests that are not needed but that's not ideal.
>>>
>>> Now, it is possible to run one specific test by giving the ID of the
>>> tests that are going to be validated, e.g.
>>>
>>>  ./mptcp_join.sh 36 37
>>>
>>> This is cleaner and saves time.
>>>
>>> Technically, the reset* functions now return 0 if the test can be
>>> executed. This naturally creates sections per test in the code which is
>>> also helpful to understand what a test is exactly doing.
>>>
>>
>> My sense is that this is primarily for development purposes since the test 
>> numbers may shift as tests are added or modified. Is it worth the churn 
>> when we have the subgroup functionality and could comment out chunks of 
>> the test script that are not useful for running specific tests in a loop?

On my side, it would be helpful. On my side, I can edit the code but
that's not nice, especially if you want to automate tests with and
without a patch: you can have conflicts with the new comments, etc.

On the CI, I cannot easily modify the code so I end up testing more than
expected, that's slow and sometimes hits other issues.

I guess on Paolo's side too as he complained about this missing feature :)

>> I'm not set against this change, but hoping to discuss it some more to 
>> both understand the benefits (I assume for running CI in a loop?) and to 
>> see if anyone has bright ideas for avoiding the whitespace churn.
>>
>> ("Include a bash fork in our selftest code that implements 'goto'" seems 
>> like overkill :) )
> 
> Perhapas something alike the following ?!? Not a complete solution:
> - completely not tested
> - we will first need to add some wrapper for iptables or even beffer
> for ip netns exec, to be more generic
> - possibly more 'skip_test && return' needed, but not many, I guess.
> 
> I hope should be enough demonstrate the idea...

If we really want to avoid modifying existing lines in selftests, I can
also not add new tabs after the new "if reset" and drop patches 7-9. But
that's a shame we cannot refactor the code in the selftests :-/

I don't think it is a good idea to add the skip_test everywhere: we will
certainly forgot to add one somewhere until someone test the feature.

Cheers,
Matt
-- 
Tessares | Belgium | Hybrid Access Solutions
www.tessares.net

  reply	other threads:[~2022-02-10 10:42 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-09 21:25 [PATCH mptcp-next 0/9] Refactor mptcp_join.sh Matthieu Baerts
2022-02-09 21:25 ` [PATCH mptcp-next 1/9] selftests: mptcp: join: allow running -cCi Matthieu Baerts
2022-02-10 14:53   ` Paolo Abeni
2022-02-11 17:30     ` Matthieu Baerts
2022-02-11 18:56       ` Paolo Abeni
2022-02-09 21:25 ` [PATCH mptcp-next 2/9] selftests: mptcp: join: exit after usage() Matthieu Baerts
2022-02-09 21:25 ` [PATCH mptcp-next 3/9] selftests: mptcp: join: option to execute specific tests Matthieu Baerts
2022-02-10  0:36   ` Mat Martineau
2022-02-10 10:04     ` Paolo Abeni
2022-02-10 10:42       ` Matthieu Baerts [this message]
2022-02-10 15:11         ` Paolo Abeni
2022-02-16 15:50           ` Matthieu Baerts
2022-02-09 21:25 ` [PATCH mptcp-next 4/9] selftests: mptcp: join: remove unused vars Matthieu Baerts
2022-02-09 21:25 ` [PATCH mptcp-next 5/9] selftests: mptcp: join: create tmp files only if needed Matthieu Baerts
2022-02-09 21:25 ` [PATCH mptcp-next 6/9] selftests: mptcp: join: check for tools " Matthieu Baerts
2022-02-09 21:25 ` [PATCH mptcp-next 7/9] selftests: mptcp: join: clarify local/global vars Matthieu Baerts
2022-02-09 21:25 ` [PATCH mptcp-next 8/9] selftests: mptcp: join: avoid backquotes Matthieu Baerts
2022-02-09 21:25 ` [PATCH mptcp-next 9/9] selftests: mptcp: join: make it shellcheck compliant Matthieu Baerts
2022-02-10  0:22 ` [PATCH mptcp-next 0/9] Refactor mptcp_join.sh Mat Martineau
2022-02-11 17:34   ` Matthieu Baerts

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=8caf46ee-11b6-aefa-3edd-e17c0928efc7@tessares.net \
    --to=matthieu.baerts@tessares.net \
    --cc=mathew.j.martineau@linux.intel.com \
    --cc=mptcp@lists.linux.dev \
    --cc=pabeni@redhat.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 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.