All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu Baerts <matthieu.baerts@tessares.net>
To: Paolo Abeni <pabeni@redhat.com>, mptcp@lists.linux.dev
Subject: Re: [PATCH mptcp-next 1/9] selftests: mptcp: join: allow running -cCi
Date: Fri, 11 Feb 2022 18:30:57 +0100	[thread overview]
Message-ID: <46a0d57f-4f9e-1313-1b29-70cfc48aab42@tessares.net> (raw)
In-Reply-To: <71915c57b64e6f32480673c03a53a92a72f3fdd0.camel@redhat.com>

Hi Paolo,

On 10/02/2022 15:53, Paolo Abeni wrote:
> On Wed, 2022-02-09 at 22:25 +0100, Matthieu Baerts wrote:
>> Without this patch, no tests would be ran when launching:
>>
>>   mptcp_join.sh -cCi
>>
>> In any order or a combination with 2 of these letters.
>>
>> Signed-off-by: Matthieu Baerts <matthieu.baerts@tessares.net>
>> ---
>>  tools/testing/selftests/net/mptcp/mptcp_join.sh | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> index 66ac990415e6..9bbb95837f73 100755
>> --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh
>> @@ -2242,7 +2242,7 @@ for arg in "$@"; do
>>  	fi
>>  
>>  	# exception for the capture/checksum/ip_mptcp options, the rest means: a part of the tests
>> -	if [ "${arg}" != "-c" ] && [ "${arg}" != "-C" ] && [ "${arg}" != "-i" ]; then
>> +	if ! [[ "${arg}" =~ ^"-"[cCi]+$ ]]; then
>>  		do_all_tests=0
>>  	fi
>>  done
> 
> At this point I think it would be better consolidate argument parsing
> with getopts, and dropping the above regexp.
> 
> While parsing the test group selectors, we could build the list of 
> groups to be executed (possibly a string contaning all the function to
> be invoked), and run them after argument parsing - or run all if such
> list (string) is empty

I just applied the patches in our tree and saw this message after, sorry
about that.

Indeed, good idea, that would be the proper way to handle options!
It would also be good not to do anything if the -h option is given with
others.

I will try to remember about this idea next time I modify this part! I
can also remove this commit from our tree if you prefer.

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

  reply	other threads:[~2022-02-11 17:31 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 [this message]
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
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=46a0d57f-4f9e-1313-1b29-70cfc48aab42@tessares.net \
    --to=matthieu.baerts@tessares.net \
    --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.