From: Matthieu Baerts <matttbe@kernel.org>
To: gang.yan@linux.dev, mptcp@lists.linux.dev
Cc: Gang Yan <yangang@kylinos.cn>
Subject: Re: [PATCH mptcp-next 2/2] selftests: mptcp: simult_flows: set EXIT trap earlier
Date: Fri, 24 Jul 2026 12:01:03 +0200 [thread overview]
Message-ID: <8fc9a0f3-76fe-489f-ba0b-9cf626a9c02f@kernel.org> (raw)
In-Reply-To: <7db78ad766d61c6bbc877acdecc7f6654d1e6582@linux.dev>
On 24/07/2026 11:52, gang.yan@linux.dev wrote:
> July 24, 2026 at 5:27 PM, "Matthieu Baerts" <matttbe@kernel.org mailto:matttbe@kernel.org?to=%22Matthieu%20Baerts%22%20%3Cmatttbe%40kernel.org%3E > wrote:
>
>
>>
>> Hi Gang,
>>
>> On 24/07/2026 08:52, Gang Yan wrote:
>>
>>>
>>> From: Gang Yan <yangang@kylinos.cn>
>>>
>>> Set the EXIT trap for cleanup immediately after creating the temporary
>>> file variables, before the dd commands that fill them and the namespace
>>> init, to ensure cleanup runs on any failure or interruption during the
>>> early setup phase. If either dd fails (e.g. ENOSPC), the temp files
>>> already created are not cleaned up.
>>>
>> From what I see, if one of the 'dd' command fails, the errors are simply
>> ignored.
>>
>>>
>>> Assisted-by: Codex: GLM-5.2
>>> Signed-off-by: Gang Yan <yangang@kylinos.cn>
>>> ---
>>> tools/testing/selftests/net/mptcp/simult_flows.sh | 3 +--
>>> 1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/tools/testing/selftests/net/mptcp/simult_flows.sh b/tools/testing/selftests/net/mptcp/simult_flows.sh
>>> index 3ea3d1efe32e..b40dea5f9b30 100755
>>> --- a/tools/testing/selftests/net/mptcp/simult_flows.sh
>>> +++ b/tools/testing/selftests/net/mptcp/simult_flows.sh
>>> @@ -62,13 +62,12 @@ setup()
>>> sout=$(mktemp)
>>> cout=$(mktemp)
>>> capout=$(mktemp)
>>> + trap cleanup EXIT
>>> size=$((2 * 2048 * 4096))
>>>
>>> dd if=/dev/zero of=$small bs=4096 count=20 >/dev/null 2>&1
>>> dd if=/dev/zero of=$large bs=4096 count=$((size / 4096)) >/dev/null 2>&1
>>>
>> This 'fix' is only interesting when the script is abort while one of the
>> dd command is in progress, to create files of 80k and 16M in RAM. I
>> guess this is very unlikely, no?
>
> Hi Matt,
>
> This change was suggested by AI, referencing commit c8da80af2838 ("selftests: mptcp:
> sockopt: set EXIT trap earlier").
This commit caused some issues when upstreaming it, and that's one of
the reasons why I reacted here.
Still, this other one was more likely, because the netns init can be
slow on debug kernels.
> I agree the problematic case is unlikely to hit in practice. My main motivation is
> to keep the selftest scripts consistent.
>
> If left unfixed, someone might spot this later and send another similar patch,
> bringing extra review overhead in the future.
>
> But I am still okay dropping this patch.
At Netconf, there were discussions suggesting not to take fixes for
issues that cannot be reproduced. I agree that here, it is small
possible to have the issue, but that's in the selftests and harmless.
Because of that, I think it is best to avoid such patches, as there are
already too much traffic on netdev, and little time to review more
important fixes and features. So if that's OK for you, let's drop it.
Cheers,
Matt
--
Sponsored by the NGI0 Core fund.
next prev parent reply other threads:[~2026-07-24 10:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-24 6:52 [PATCH mptcp-next 0/2] selftests: mptcp: some improvement for selftests Gang Yan
2026-07-24 6:52 ` [PATCH mptcp-next 1/2] selftests: mptcp: run fail_test in main shell during join test Gang Yan
2026-07-24 9:28 ` Matthieu Baerts
2026-07-24 9:39 ` gang.yan
2026-07-24 9:48 ` Matthieu Baerts
2026-07-24 10:01 ` gang.yan
2026-07-24 10:02 ` Matthieu Baerts
2026-07-24 6:52 ` [PATCH mptcp-next 2/2] selftests: mptcp: simult_flows: set EXIT trap earlier Gang Yan
2026-07-24 9:27 ` Matthieu Baerts
2026-07-24 9:52 ` gang.yan
2026-07-24 10:01 ` Matthieu Baerts [this message]
2026-07-24 7:53 ` [PATCH mptcp-next 0/2] selftests: mptcp: some improvement for selftests MPTCP CI
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=8fc9a0f3-76fe-489f-ba0b-9cf626a9c02f@kernel.org \
--to=matttbe@kernel.org \
--cc=gang.yan@linux.dev \
--cc=mptcp@lists.linux.dev \
--cc=yangang@kylinos.cn \
/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.