Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795050125; b=ZL/Dc8rxTBqfynZb1agkeX9cF4yR8s1vsWAMT6ooxelGGvUUn2eL2rqv2AeBDH+oaQ2y qhLJR3z4vDjQ7Uzz455qczIL1nBXfBp11pW6bcU+bvquIBo+VqzdEO1Jkv0gWm2ewi4Dy m/BMydeF/Zg7Z1D8WJFpGkrt+lioVe0R/qcn/L0FWPrTOII4oyEWBV2gN3AssEYoi2z2M hQ5eV+7qwnJgbvNjh0RJ23gAhDr3e9vXOxe24LLndBYlAlrzkOJfDQ3o/wuxjR05A/NSX svqC27QWAE7X8hxxyIh6m5XBLgdbypBAiMqP7MdZViyHHhsSEdvMPqHFtiEueVzeOGw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795050125; h=Received:DKIM-Signature:From:To:Cc:Subject:Date:Message-ID:X-Mailer: In-Reply-To:References:User-Agent:X-stable:X-Patchwork-Hint: MIME-Version:Content-Transfer-Encoding; bh=r5VD3vkOuo3OIa/J+67o9q+QDb52yQTY9TONr4i7xVQ=; b=VQLxhXsf74ik9KprBi8RTO0SRN+8LLKB2Gt3OP6AbRBDfi9G/18tbASc3oyEd6DmOa6B X2ZzBeGOs6w/s4Lur8wOSwKyAbJ2J1+CQGchGERNFTyRN+uf2zeXJu8P0FaV13aNGSZ6e T1X0OngLdFa+uskSYZbsO/IvIENVPHsmd7AOgSaIhD2THE1OjEw2fEoPiYcIS6+LvceEz J2U+/N6WgUudr+udyOgK7M1RLPeiVtFafGML+UFXRgbhbuefU4h4/oZ/J8RGXcWwAtq0L +HSUgShNopXeeiJP63MgK3wCLi2yf9jVA0uEv+4k5bEraagp5OzL7IWnuek1gFT5D5w== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=iYIS5jlZ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E8BED606A320; Thu, 19 Nov 2026 01:02:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=iYIS5jlZ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 39C741F000C4; Thu, 19 Nov 2026 01:02:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1795050124; bh=r5VD3vkOuo3OIa/J+67o9q+QDb52yQTY9TONr4i7xVQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=iYIS5jlZLBR3Hr40u54z8G1Ju29JYYOidCcuHZU330YbhzsCxZKsmihtaN6zJyGsT J8ZnAM0U6lJpzJN6sP2BrNIM2bP+axk3kTYsYnxxiZEYl9s2glI9mHYcj28rf9VNKO i+caGZSNqULKAHqD7aBahpXzNAAhUe2OVqG/bRMU= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Florian Westphal , Fernando Fernandez Mancera , Pablo Neira Ayuso , Sasha Levin Subject: [PATCH 6.1 2597/2857] selftests: netfilter: fix return value in zone subtest Date: Wed, 18 Nov 2026 16:00:31 +0100 Message-ID: <20261118150335.047066015@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261118150201.293410965@linuxfoundation.org> References: <20261118150201.293410965@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore X-Mailing-List: patches@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.1-stable review patch. If anyone has any objections, please let me know. ------------------ From: Florian Westphal [ Upstream commit a20a01ae89813ef493dc416d69f2b2ad17afb54c ] zone subtest prints FAIL, but did not set 'ret=1', so kselftest framework reports success. While at it, also fail when "nft -f" returns an error. Noticed thanks to a (broken) local patch that should have caused this selftest (resp. the kselftest framework) to report a failure. Fixes: 33b8aad21ac1 ("selftests: netfilter: add a vrf+conntrack testcase") Signed-off-by: Florian Westphal Reviewed-by: Fernando Fernandez Mancera Signed-off-by: Pablo Neira Ayuso Signed-off-by: Sasha Levin --- .../selftests/netfilter/conntrack_vrf.sh | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/tools/testing/selftests/netfilter/conntrack_vrf.sh b/tools/testing/selftests/netfilter/conntrack_vrf.sh index 073e8e62d350b..e099221acbcc7 100755 --- a/tools/testing/selftests/netfilter/conntrack_vrf.sh +++ b/tools/testing/selftests/netfilter/conntrack_vrf.sh @@ -88,7 +88,7 @@ busywait $BUSYWAIT_TIMEOUT listener_ready "$ns1" # as decided by the first iteration of the ruleset. test_ct_zone_in() { -ip netns exec "$ns0" nft -f - < /dev/null # should be in zone 1, not zone 2 @@ -117,6 +123,7 @@ EOF echo "PASS: entry found in conntrack zone 1" else echo "FAIL: entry not found in conntrack zone 1" + ret=1 count=$(ip netns exec "$ns0" conntrack -L -s $IP1 -d $IP0 -p icmp --zone 2 2> /dev/null | wc -l) if [ "$count" -eq 1 ]; then echo "FAIL: entry found in zone 2 instead" @@ -141,7 +148,7 @@ test_masquerade_vrf() ip netns exec "$ns0" conntrack -F 2>/dev/null -ip netns exec "$ns0" nft -f - < /dev/null;then echo "FAIL: connect failure with masquerade + sport rewrite on vrf device" ret=1 @@ -188,7 +201,7 @@ EOF test_masquerade_veth() { ip netns exec "$ns0" conntrack -F 2>/dev/null -ip netns exec "$ns0" nft -f - < /dev/null;then echo "FAIL: connect failure with masquerade + sport rewrite on veth device" ret=1 -- 2.53.0