Re: [PATCH 6.6.y 3/5] selftests: mptcp: use += operator to append strings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Greg,

On 09/04/2024 14:16, Greg KH wrote:
> On Mon, Apr 08, 2024 at 06:10:38PM +0200, Matthieu Baerts wrote:
>> Hi Greg,
>>
>> On 08/04/2024 13:31, Greg KH wrote:
>>> On Fri, Apr 05, 2024 at 05:36:40PM +0200, Matthieu Baerts (NGI0) wrote:
>>>> From: Geliang Tang <tanggeliang@xxxxxxxxxx>
>>>>
>>>> This patch uses addition assignment operator (+=) to append strings
>>>> instead of duplicating the variable name in mptcp_connect.sh and
>>>> mptcp_join.sh.
>>>>
>>>> This can make the statements shorter.
>>>>
>>>> Note: in mptcp_connect.sh, add a local variable extra in do_transfer to
>>>> save the various extra warning logs, using += to append it. And add a
>>>> new variable tc_info to save various tc info, also using += to append it.
>>>> This can make the code more readable and prepare for the next commit.
>>>>
>>>> Signed-off-by: Geliang Tang <tanggeliang@xxxxxxxxxx>
>>>> Reviewed-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
>>>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
>>>> Link: https://lore.kernel.org/r/20240308-upstream-net-next-20240308-selftests-mptcp-unification-v1-8-4f42c347b653@xxxxxxxxxx
>>>> Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
>>>> (cherry picked from commit e7c42bf4d320affe37337aa83ae0347832b3f568)
>>>> Signed-off-by: Matthieu Baerts (NGI0) <matttbe@xxxxxxxxxx>
>>>> ---
>>>>  .../selftests/net/mptcp/mptcp_connect.sh      | 53 ++++++++++---------
>>>>  .../testing/selftests/net/mptcp/mptcp_join.sh | 30 +++++------
>>>>  2 files changed, 43 insertions(+), 40 deletions(-)
>>>
>>> Odd, this one did not apply.
>>
>> Indeed, that's odd. Do you use a different merge strategy?
> 
> I do not use any merge strategy at all, I use 'patch' to apply patches
> (well, that's what quilt does), so git is not involved here.

Ah OK, thank you for the explanation. I thought git was used to do the
cherry-pick + generate the patch for quilt.

I'm still surprised quilt didn't accept these patches generated on top
of the 6.6-y branch. (By "chance", did you not have conflicts because
the patch 1/5 (commit 629b35a225b0 ("selftests: mptcp: display simult in
extra_msg")) didn't get backported by accident? It is strange it is also
missing in the v6.6.y branch.)

>> I just tried on my side with the default merge strategy coming with Git
>> 2.43.0, and it works:
>>
>>   $ git fetch
>> git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
>> refs/heads/linux-6.6.y
>>   $ git switch -c tmp FETCH_HEAD
>>   $ git rebase -i 2f39e4380e73~ ## to drop these 3 patches you added:
>>     # 2f39e4380e73 selftests: mptcp: connect: fix shellcheck warnings
>>
>>
>>
>>     # bd3b5b0fff75 mptcp: don't overwrite sock_ops in mptcp_is_tcpsk()
>>
>>
>>
>>     # f723f9449193 mptcp: don't account accept() of non-MPC client (...)
>>   $ git cherry-pick -xs \
>>     629b35a225b0 e3aae1098f10 e7c42bf4d320 8e2b8a9fa512 7a1b3490f47e
>>   Auto-merging tools/testing/selftests/net/mptcp/mptcp_join.sh
>>   (...)
>>   $ echo $?
>>   0
>>
>> But if I try the 3 patches you selected
>>
>>   $ git reset --hard HEAD~5
>>   $ git cherry-pick -xs e3aae1098f10 8e2b8a9fa512 7a1b3490f47e
>>   Auto-merging tools/testing/selftests/net/mptcp/mptcp_connect.sh
>>   (...)
>>   CONFLICT (content): Merge conflict in
>> tools/testing/selftests/net/mptcp/mptcp_connect.sh
>>   error: could not apply 7a1b3490f47e... mptcp: don't account accept()
>> of non-MPC client as fallback to TCP
>>
>>
>> And the conflict makes sense: with the version that is currently in
>> linux-6.6.y branch, the new check is done after having printed "OK", so
>> that's not correct.
>>
>>
>> I can share the 5 patches I applied without conflicts on top of the
>> current linux-6.6.y branch, without the 3 patches you added today if it
>> can help.
> 
> How about just resending this one patch after the next 6.6.y release
> that comes out in a day or so.

No hurry, that can indeed wait for the next 6.6.y release.

Just to be sure we are aligned: I suggested backporting these 5 commits:

- 629b35a225b0 ("selftests: mptcp: display simult in extra_msg")
- e3aae1098f10 ("selftests: mptcp: connect: fix shellcheck warnings")
- e7c42bf4d320 ("selftests: mptcp: use += operator to append strings")
- 8e2b8a9fa512 ("mptcp: don't overwrite sock_ops in mptcp_is_tcpsk()")
- 7a1b3490f47e ("mptcp: don't account accept() of non-MPC client as
fallback to TCP")

But only these 3 got backported to 6.6.y:

- e3aae1098f10 ("selftests: mptcp: connect: fix shellcheck warnings")
- 8e2b8a9fa512 ("mptcp: don't overwrite sock_ops in mptcp_is_tcpsk()")
- 7a1b3490f47e ("mptcp: don't account accept() of non-MPC client as
fallback to TCP")

The last commit ("mptcp: don't account accept() of non-MPC client as
fallback to TCP") has a small problem in 6.6.y (only):

- In case of issue, a message will say that the subtest is OK and not
OK, and the TAP report will report that everything is OK with this
subtest => that's OK, nothing critical, that's the tests.
- We can solve that in the next 6.6 version by manually backporting
commit e7c42bf4d320 ("selftests: mptcp: use += operator to append
strings") and its dependence: commit 629b35a225b0 ("selftests: mptcp:
display simult in extra_msg").


Cheers,
Matt
-- 
Sponsored by the NGI0 Core fund.





[Index of Archives]     [Linux Kernel]     [Kernel Development Newbies]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux