[PATCH mptcp-next 0/9] Refactor mptcp_join.sh

Matthieu Baerts posted 9 patches 2 years, 2 months ago
Patches applied successfully (tree, apply log)
git fetch https://github.com/multipath-tcp/mptcp_net-next tags/patchew/20220209212520.2989291-1-matthieu.baerts@tessares.net
Maintainers: Matthieu Baerts <matthieu.baerts@tessares.net>, Jakub Kicinski <kuba@kernel.org>, Mat Martineau <mathew.j.martineau@linux.intel.com>, Shuah Khan <shuah@kernel.org>, "David S. Miller" <davem@davemloft.net>
There is a newer version of this series
.../testing/selftests/net/mptcp/mptcp_join.sh | 2342 +++++++++--------
1 file changed, 1257 insertions(+), 1085 deletions(-)
[PATCH mptcp-next 0/9] Refactor mptcp_join.sh
Posted by Matthieu Baerts 2 years, 2 months ago
I started this series to be able to launch a specific test without
having to modify the script to comment tests from the subgroup I didn't
want to validate when trying to reproduce a specific issue in a loop.
That's what we can find in patch 3/9.

While at it, I:
- fixed one issue with the options (patch 1/9)
- stop if an option doesn't exist (patch 2/9)
- removed unused vars (patch 4/9)
- delay some actions to the first test not to do them if no test is
  launched (patches 5-6/9)

But after having seen all modified lines, why stopping there? So I:
- clarify local vs global variables to avoid Bash's classical pitfall
  (patch 7/9)
- fixed all issues reported by ShellCheck except one (patch 8-9/9)

These last 3 patches (+ patch 3/9) will create a lot of conflicts. If
we are OK with them, probably best not to wait to long before applying
them to avoid big rebases.

For the patches that are already in review, I can fix the conflicts when
applying them.

Matthieu Baerts (9):
  selftests: mptcp: join: allow running -cCi
  selftests: mptcp: join: exit after printing usage
  selftests: mptcp: join: option to execute specific tests
  selftests: mptcp: join: remove unused vars
  selftests: mptcp: join: create tmp files only if needed
  selftests: mptcp: join: check for tools only if needed
  selftests: mptcp: join: clarify local/global vars
  selftests: mptcp: join: avoid backquotes
  selftests: mptcp: join: make it shellcheck compliant

 .../testing/selftests/net/mptcp/mptcp_join.sh | 2342 +++++++++--------
 1 file changed, 1257 insertions(+), 1085 deletions(-)

-- 
2.34.1


Re: [PATCH mptcp-next 0/9] Refactor mptcp_join.sh
Posted by Mat Martineau 2 years, 2 months ago
On Wed, 9 Feb 2022, Matthieu Baerts wrote:

> I started this series to be able to launch a specific test without
> having to modify the script to comment tests from the subgroup I didn't
> want to validate when trying to reproduce a specific issue in a loop.
> That's what we can find in patch 3/9.
>
> While at it, I:
> - fixed one issue with the options (patch 1/9)
> - stop if an option doesn't exist (patch 2/9)
> - removed unused vars (patch 4/9)
> - delay some actions to the first test not to do them if no test is
>  launched (patches 5-6/9)
>
> But after having seen all modified lines, why stopping there? So I:
> - clarify local vs global variables to avoid Bash's classical pitfall
>  (patch 7/9)
> - fixed all issues reported by ShellCheck except one (patch 8-9/9)
>
> These last 3 patches (+ patch 3/9) will create a lot of conflicts. If
> we are OK with them, probably best not to wait to long before applying
> them to avoid big rebases.

I think 1, 2, 4, 5, and 6 look good for the export branch now:

Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

I don't have changes to suggest for 7-9, but I think it's worth talking 
about how to manage conflicts considering the scope of those. I think it 
would make sense to send those to net-next fairly late in the development 
cycle, to avoid net/net-next conflicts if we send mptcp_join.sh fixes to 
-net.

To deal with that, I see a couple of options:

1. Keep these at the end of the topgit queue to help with that, but that 
makes it harder to send other mptcp_join.sh patches for mptcp-net or 
mptcp-next.

2. You update them out-of-tree until close to the 5.17 release

What do you think? Might be a good meeting topic too.


I have some other questions I'll ask in a patch 3 reply.


>
> For the patches that are already in review, I can fix the conflicts when
> applying them.
>
> Matthieu Baerts (9):
>  selftests: mptcp: join: allow running -cCi
>  selftests: mptcp: join: exit after printing usage
>  selftests: mptcp: join: option to execute specific tests
>  selftests: mptcp: join: remove unused vars
>  selftests: mptcp: join: create tmp files only if needed
>  selftests: mptcp: join: check for tools only if needed
>  selftests: mptcp: join: clarify local/global vars
>  selftests: mptcp: join: avoid backquotes
>  selftests: mptcp: join: make it shellcheck compliant
>
> .../testing/selftests/net/mptcp/mptcp_join.sh | 2342 +++++++++--------
> 1 file changed, 1257 insertions(+), 1085 deletions(-)
>
> -- 
> 2.34.1

--
Mat Martineau
Intel

Re: [PATCH mptcp-next 0/9] Refactor mptcp_join.sh
Posted by Matthieu Baerts 2 years, 2 months ago
Hi Mat, Paolo,

On 10/02/2022 01:22, Mat Martineau wrote:
> On Wed, 9 Feb 2022, Matthieu Baerts wrote:
> 
>> I started this series to be able to launch a specific test without
>> having to modify the script to comment tests from the subgroup I didn't
>> want to validate when trying to reproduce a specific issue in a loop.
>> That's what we can find in patch 3/9.
>>
>> While at it, I:
>> - fixed one issue with the options (patch 1/9)
>> - stop if an option doesn't exist (patch 2/9)
>> - removed unused vars (patch 4/9)
>> - delay some actions to the first test not to do them if no test is
>>  launched (patches 5-6/9)
>>
>> But after having seen all modified lines, why stopping there? So I:
>> - clarify local vs global variables to avoid Bash's classical pitfall
>>  (patch 7/9)
>> - fixed all issues reported by ShellCheck except one (patch 8-9/9)
>>
>> These last 3 patches (+ patch 3/9) will create a lot of conflicts. If
>> we are OK with them, probably best not to wait to long before applying
>> them to avoid big rebases.
> 
> I think 1, 2, 4, 5, and 6 look good for the export branch now:
> 
> Reviewed-by: Mat Martineau <mathew.j.martineau@linux.intel.com>

Thank you for the reviews!

I just applied these 5 patches to our tree with your RvB tag (and fixed
s/KSFT_SKIP/ksft_skip/g I left by mistake when splitting commits).

- 1e4cd0e4eae7: selftests: mptcp: join: allow running -cCi
- 251e4354c1c0: selftests: mptcp: join: exit after usage()
- 7e59a8ad9b44: selftests: mptcp: join: remove unused vars
- 739ef6848c45: selftests: mptcp: join: create tmp files only if needed
- 50c4db8022d3: selftests: mptcp: join: check for tools only if needed
- Results: 178780fe8241..dd0f23150c09

I will look at the other patches from this series later.

Builds and tests are now in progress:



https://cirrus-ci.com/github/multipath-tcp/mptcp_net-next/export/20220211T173324

https://github.com/multipath-tcp/mptcp_net-next/actions/workflows/build-validation.yml?query=branch:export

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