From nobody Sat Jul 25 06:36:48 2026 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 58ECE39B947 for ; Fri, 24 Jul 2026 06:53:57 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784876041; cv=none; b=qoadkHLAi4NsqYWciQenl3rcooENhdtRrCsbTqZufGTytwjgposYnNj1S8PhiBbd9LNYSZblUas4rNKRXt4gnXxVjCTZH03fJszezhCAO826AR6n1JuN7xiHAUA78zL/czdKpV+WV9hDd32i2/69QtwzBhZUVTdz0vTlfLrLWBw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784876041; c=relaxed/simple; bh=I6rrJjgipQw18hs6s2WhOf70H7Gf9ApQyJ8NDsonPwU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=RTA3zq9kGGbl3atzwwm9+0VvlvHn5q/NsRIngfu252TptaIrx7mdW0JBitRLbma+naDotS4id/WMjmHxHBd7FqF+wt/2bDq63RSU8C0IeNX0TutMO/Np8W00hrkvzu9G2hfLpHGU++uMbQ8SK+mz8bgpPLqawaNnUk/Xj1Vg9eQ= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=W69gzrUR; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="W69gzrUR" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784876035; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=L+fy1Spn4iWVTIwc9G0X4PxZt69qquUd81r0UhizsJ4=; b=W69gzrURs7UT2PfD6h7cw/bgFVzwZDN1eAY37d2ONNNpTg6sEwpXx3RjUukQHusgShZVrM PeQ28C/A7EgzA6TW+Uf5ukYqTBPkml4JkCXT7hhYPTZZrMcoNSUl9KGTiXio1HG5iTA1Wv fEe25Tbj19K5QrJnWzf+vEMdPpEJdI4= From: Gang Yan To: mptcp@lists.linux.dev Cc: Gang Yan Subject: [PATCH mptcp-next 1/2] selftests: mptcp: run fail_test in main shell during join test Date: Fri, 24 Jul 2026 14:52:28 +0800 Message-ID: <20260724065229.36736-2-gang.yan@linux.dev> In-Reply-To: <20260724065229.36736-1-gang.yan@linux.dev> References: <20260724065229.36736-1-gang.yan@linux.dev> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Gang Yan check_transfer() compares the input and output files byte-by-byte using `cmp -l "$in" "$out" | while read ...`. Because the while-loop body runs in a subshell (the script sets neither lastpipe nor pipefail), the fail_test call inside it -- which sets the global ret/last_test_failed -- and the `return 1` both act on the subshell, not on check_transfer(). check_transfer() thus always falls through to `return 0`, and any data corruption affecting only the payload (leaving the subflow/PM counters untouched) is silently reported as PASS. Assisted-by: Codex: GLM-5.2 Signed-off-by: Gang Yan --- tools/testing/selftests/net/mptcp/mptcp_join.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/testing/selftests/net/mptcp/mptcp_join.sh b/tools/testin= g/selftests/net/mptcp/mptcp_join.sh index 550a6b6117a9..2413c832af03 100755 --- a/tools/testing/selftests/net/mptcp/mptcp_join.sh +++ b/tools/testing/selftests/net/mptcp/mptcp_join.sh @@ -584,7 +584,7 @@ check_transfer() mv "$tmpfile" "$out" tmpfile=3D"" fi - cmp -l "$in" "$out" | while read -r i a b; do + while read -r i a b; do local sum=3D$((0${a} + 0${b})) if [ $check_invert -eq 0 ] || [ $sum -ne $((0xff)) ]; then fail_test "$what does not match (in, out):" @@ -595,7 +595,7 @@ check_transfer() else print_info "$what has inverted byte at ${i}" fi - done + done < <(cmp -l "$in" "$out") =20 return 0 } --=20 2.43.0 From nobody Sat Jul 25 06:36:48 2026 Received: from out-179.mta1.migadu.com (out-179.mta1.migadu.com [95.215.58.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 73AAE39A079 for ; Fri, 24 Jul 2026 06:54:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784876043; cv=none; b=nRilVk0eMfPR4NgGy/36Bi3drMlEHxfbNeA8sExU57blpQ/5cGQRaycMlFznm17zilME9SZJDjxRnrTvesk77LcNDahExqy8pewAVn8ADfeFJRmp0m0ksuwOl9wqYbyuGDedkZGUrWmyJhSLLA/7cGdGuMcJWG8dmHssPNLJMYQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784876043; c=relaxed/simple; bh=SIL+pmojdobVkXZkeQIYtzUSGxV/VukCPADyNDmjWLw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TmyeGr6qgzSR7pIX3O8TfuxMMaxYHdqajr1mStsHfcPe6IojEqvXK6S1s79e/2GZN2/tgQeZCK12kT9YXr6Z0m4m2Sl+dqM/DuxlIcQNCFkP7DBWevGCov0IWoNu722J7mZLYztEHNrmsq18mfeMbO9r0pKuzgSTldgnY1OeRvA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=WQ06n1C9; arc=none smtp.client-ip=95.215.58.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="WQ06n1C9" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784876037; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=PcaO/6pE+/43l4Y22qTDyoxMc8SNVF311cn5uKvhAvM=; b=WQ06n1C98sgmpZDZq93eDwweVtKEsQPflBkUWz8Dk1cjo6TY5Lf8b2WQIOTFgfEX5S+Q+Z 7MCieGRS0S8qYaJZbrvLGLw8wyqlRy9QJzIU7zXKCtf4DT8O8zVoeA0dDonnw4wXkZRzsH oq2wr4vKJ7D9Q+5vmBgHlutqEbEXwq0= From: Gang Yan To: mptcp@lists.linux.dev Cc: Gang Yan Subject: [PATCH mptcp-next 2/2] selftests: mptcp: simult_flows: set EXIT trap earlier Date: Fri, 24 Jul 2026 14:52:29 +0800 Message-ID: <20260724065229.36736-3-gang.yan@linux.dev> In-Reply-To: <20260724065229.36736-1-gang.yan@linux.dev> References: <20260724065229.36736-1-gang.yan@linux.dev> Precedence: bulk X-Mailing-List: mptcp@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-Migadu-Flow: FLOW_OUT Content-Type: text/plain; charset="utf-8" From: Gang Yan 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. Assisted-by: Codex: GLM-5.2 Signed-off-by: Gang Yan --- 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/test= ing/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=3D$(mktemp) cout=3D$(mktemp) capout=3D$(mktemp) + trap cleanup EXIT size=3D$((2 * 2048 * 4096)) =20 dd if=3D/dev/zero of=3D$small bs=3D4096 count=3D20 >/dev/null 2>&1 dd if=3D/dev/zero of=3D$large bs=3D4096 count=3D$((size / 4096)) >/dev/nu= ll 2>&1 =20 - trap cleanup EXIT - mptcp_lib_ns_init ns1 ns2 ns3 =20 if $capture; then --=20 2.43.0