🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #24360

Re: [PATCH net-next v5 3/5] selftests: seg6: move SRv6 End PSP setup into its own helper

#24360
From: Andrea Mayer
Date: Mon, 30 Nov 2026 03:47
48 lines
11741 bytes
On Thu, 26 Nov 2026 14:27:25 +0800
Hangbin Liu <hangbin.liu@linux.dev> wrote:

Hi Hangbin,

> From: Hangbin Liu <liuhangbin@kylinos.cn>
>
> setup() installs both the base topology and the End PSP policies. That
> couples general test setup with one specific flavor scenario and makes
> it hard to add further flavor cases cleanly.
>
> Extract the End PSP policy setup into setup_end_flv_psp() so flavor
> tests can set up and later tear down independently (the matching
> cleanup arrives in a following patch).
>
> Run the block under set -e so a setup failure is treated as an error
> instead of falling through into the connectivity checks. When deciding
> to report the run as skipped, keep any failure already recorded by a
> test, so a real failure is not converted into a skip.
>
> Signed-off-by: Hangbin Liu <liuhangbin@kylinos.cn>
> [snip]
> @@ -488,10 +488,15 @@ cleanup()
>  
>  	# check whether the setup phase was completed successfully or not. In
>  	# case of an error during the setup phase of the testing environment,
> -	# the selftest is considered as "skipped".
> +	# the selftest is considered as "skipped", unless a test has already
> +	# recorded a failure.
>  	if [ "${SETUP_ERR}" -ne 0 ]; then
> -		echo "SKIP: Setting up the testing environment failed"
> -		exit "${ksft_skip}"
> +		if [ "$ret" -ne "$ksft_fail" ]; then
> +			echo "SKIP: Setting up the testing environment failed"
> +			exit "${ksft_skip}"
> +		fi
> +
> +		echo "FAIL: Setting up the testing environment failed"
>  	fi
>  
>  	exit "${ret}"

Nit, a style preference: "${ret}" and "${ksft_fail}", as for the
other variables here.

Thanks,
Andrea
Technical Details
Message-ID: <20261130044714.e6c92e9a6b9999a18475c161@uniroma2.it>
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373829-linux-kernel-netdev=dewy.ru
References: <20261126-srv6_flavors_endx-v5-0-4d8232eec404@kylinos.cn> <20261126-srv6_flavors_endx-v5-3-4d8232eec404@kylinos.cn>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!srv.newsdeef.eu!newsfeed.bofh.team!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-373829-linux-kernel-netdev=dewy.ru
From: andrea.mayer@uniroma2.it (Andrea Mayer)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v5 3/5] selftests: seg6: move SRv6 End PSP
 setup into its own helper
Date: Mon, 30 Nov 2026 04:47:14 +0100
Organization: Usenet Network
Message-ID: <20261130044714.e6c92e9a6b9999a18475c161@uniroma2.it>
References: <20261126-srv6_flavors_endx-v5-0-4d8232eec404@kylinos.cn>
 <20261126-srv6_flavors_endx-v5-3-4d8232eec404@kylinos.cn>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Info: usenet.network;
	logging-data="1325052"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:AlXscuYhLlqguowyud8QmM+O4Os= sha256:K0ue1H+wKa0K5t3VjxHKyH8ki9vgBkp5rQIvcbbPupk=
	sha1:6ZIgmmc/XXq285UwQruy6cIC7RQ= sha256:2kCvBiGwwpUAuClQcvCDnbEi4zGqD+ZNpwUgyVhM11Y=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 8711E125FBD; Mon, 30 Nov 2026 06:48:33 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -4.775
X-Spam-Status: No, score=-4.775 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.249,
	MAILING_LIST_MULTI=-1, NICE_REPLY_A=-1.724, RCVD_IN_DNSWL_MED=-2.3,
	SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=neutral
	reason="invalid (unsupported algorithm ed25519-sha256)"
	header.d=uniroma2.it header.b=BcM1dmlo; dkim=pass (2048-bit key)
	header.d=uniroma2.it header.b=M/s+xLpL
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id iHsZO_aYvsL1;
	Mon, 30 Nov 2026 06:48:30 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=104.64.211.4; helo=sin.lore.kernel.org; envelope-from=netdev+bounces-373829-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=uniroma2.it
X-Received: from sin.lore.kernel.org (sin.lore.kernel.org [104.64.211.4])
	by mail.dewy.ru (Postfix) with ESMTPS id 030C1125D6D; Mon, 30 Nov 2026 06:48:15 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sin.lore.kernel.org (Postfix) with ESMTP id 3962E21BE7; Mon, 30 Nov 2026 03:48:13 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1796010491;
	b=jMfeVM70cT0hgPGFUfis1YlP7C2PghA6mz2KYqazdvSRfW5FUPej2YbxyibRCFzvwGUl
	 F5CKWzOcVYmYFs6raEH09n9q4pr/+4FthVTTFPi3n7yXEtVOQvnUR8VJG7Jd8/Fu7iKWj
	 S26xR4y+Fvctr/8PYp9hpNTfWh8y7uJxBWsElm5dr7Vn5X0Fe0rmBZML6amHZdDZeiS2k
	 pVIy6d393Ch7qxK8lnpmA/S51uLdj40+aDGxU50rjRqAWegPVSXZ2cljSukvKM4AlXVAd
	 cLlx6Iy1UVI/tijpjwu0twbV1r3xiiZLLvkHouUilNVlpPOwrtoH36B5P5NtYlBCtbA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796010491;
	h=X-Original-To:Received:DMARC-Filter:Received:Received:DKIM-Signature:
	 DKIM-Signature:Date:From:To:Cc:Subject:Message-Id:In-Reply-To:
	 References:X-Mailer:X-Mailing-List:List-Id:List-Post:List-Help:
	 List-Subscribe:List-Unsubscribe:List-Owner:Precedence:Mime-Version:
	 Content-Type:Content-Transfer-Encoding:X-Virus-Scanned:
	 X-Virus-Status;
	bh=OCzZlFumJzIIhZkmHiSyuWEg42H69InsqQNQdYBxePo=;
	b=qFFKLNaEMmU1RO1qS1WNLOzMuN2jXx8LTGanr+4UVoulorbOOEGCWA0Y1LE5zcTxoQ95
	 sdTBmGVxAZRed3dunx4P2/4bwcq49RYDOW+ZcvOsfZBiQ7ouaZLcrILsxliyjCKKzPOqE
	 J8KKXbn8N4Vv2vKGWZMdVz7czb7VBLlx/YvT3SJrcGXkkdhsw3mchCuWb3mb8CegWghtv
	 J0PYSuabtqfQKuVjCMxrldHFfqUL6TgUduXJXMc7/4mPHP7S8Za6vw3z4r6z6QasSxJev
	 W+QQzn9fEABRNu8QWGCu7eLqfcDb3o6ge5u/WLIaBWDXsSS8tGMIqtUdAWJqHntwniA==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=ed25519-sha256 header.s=ed201904 header.b=BcM1dmlo;
	dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=rsa-sha256 header.s=rsa201904 header.b="M/s+xLpL";
	dmarc=pass header.from=uniroma2.it;
	spf=pass smtp.mailfrom=uniroma2.it;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 77E29606A685;
	Mon, 30 Nov 2026 03:48:11 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=ed25519-sha256 header.s=ed201904 header.b=BcM1dmlo;
	dkim=pass (2048-bit key) header.d=uniroma2.it header.i=@uniroma2.it header.a=rsa-sha256 header.s=rsa201904 header.b=M/s+xLpL
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=160.80.4.32
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1796010490;
	b=xAP57o6UOTNGVlGqO+4Qx/7lD/nR4Mp8WQwMZpn4XOr5IYLaHLunDjaak02XUPrLfRHh
	 u3sV5+jNk4KOwHk7Y8hJ1SUR7KVj2rZuALzFWo6Q/bamFSY3tjeh5ndLmm1d8ZqkwhgK2
	 OD4K4WLYb7z+NMD/guwnRDTlJsfqVaTKYzDv89FYP7kXFZ87PvYh48LjrjBBCTZf4xJC5
	 jYz10lw+RR3L7TBYIGAZGRUWW2Ol5kecslzyU8VOIONwcpxlxR4Woa/yc4qAm5grohlfv
	 Sk+cooUifWhoO+ZkkP7GwM/Ea+AYA86/ngdHj2BYds+zAaJZ7+8yGCF7Z14gIV53+/w==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1796010490;
	h=DMARC-Filter:Received:Received:DKIM-Signature:DKIM-Signature:Date:
	 From:To:Cc:Subject:Message-Id:In-Reply-To:References:X-Mailer:
	 Mime-Version:Content-Type:Content-Transfer-Encoding:X-Virus-Scanned:
	 X-Virus-Status;
	bh=OCzZlFumJzIIhZkmHiSyuWEg42H69InsqQNQdYBxePo=;
	b=LctzjWZRQuwB7XVOI23TdVysPS2/FKUG0O8PlN3iEMyLyZJ2hHEzFFIWK5L7t7MEOywa
	 zGEg63OBfptyRdyULQZHw11CGrCqrmCKZ6MrGCeTt1bteAFgnbelFBNHnLetHqwECSmMq
	 jon+5xnJWiwQslf1iNMhyUMLaTncdp3CHbQrY4AnY5TNVMrdBDQdyrnEO3OzT+QO6mokG
	 FZBDlArNkrjc3eoJHKfpZ993cdPE+U3O0k/NTYZrWmeoGV0BM7/2jQbOPdW1a0us/hxpL
	 AQUw7Ji+HMSiX9KsOQBTmnSQUKXjO4I4PMlIepMggQngiuuxjYNV8VameQxh6y/oiVw==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=pass header.from=uniroma2.it;
	spf=pass smtp.mailfrom=uniroma2.it;
	dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=ed25519-sha256 header.s=ed201904 header.b=BcM1dmlo;
	dkim=pass header.d=uniroma2.it header.i=@uniroma2.it header.a=rsa-sha256 header.s=rsa201904 header.b="M/s+xLpL";
	arc=none smtp.remote-ip=160.80.4.32
X-Received: from smtp.uniroma2.it (smtp-2015.uniroma2.it [160.80.4.32])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id ADED0606A338;
	Mon, 30 Nov 2026 03:48:08 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org ADED0606A338
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=uniroma2.it
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=uniroma2.it
X-Received: from smtpauth-2019-1.uniroma2.it (smtpauth.uniroma2.it [160.80.5.46])
	by smtp-2015.uniroma2.it (8.14.4/8.14.4/Debian-8) with ESMTP id 6AU3lJsY003400;
	Mon, 30 Nov 2026 04:47:24 +0100
X-Received: from lubuntu-18.04 (unknown [160.80.103.126])
	by smtpauth-2019-1.uniroma2.it (Postfix) with ESMTPSA id B23811206DD;
	Mon, 30 Nov 2026 04:47:14 +0100 (CET)
X-DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=uniroma2.it;
	s=ed201904; t=1796010435; h=from:from:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=OCzZlFumJzIIhZkmHiSyuWEg42H69InsqQNQdYBxePo=;
	b=BcM1dmloLhRlpNosWaR39bW0BqiJCEayAJxS2rnLQ2YjY2LIw2SS3miXphSJlwcL7sWV1N
	Wk2H1//PWt7bgfAg==
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=uniroma2.it; s=rsa201904;
	t=1796010435; h=from:from:sender:reply-to:subject:subject:date:date:
	 message-id:message-id:to:to:cc:cc:mime-version:mime-version:
	 content-type:content-type:
	 content-transfer-encoding:content-transfer-encoding:
	 in-reply-to:in-reply-to:references:references;
	bh=OCzZlFumJzIIhZkmHiSyuWEg42H69InsqQNQdYBxePo=;
	b=M/s+xLpLu6RTs5KfqMR9UcsMGpMbrNc2VOy8iRyeG5scpDhxjc453mcnFQvI6xm59GXoQ3
	e2Hg3xbwGV0qq1iZ4PuP8yzBqcRhYI78TxcBroHCauvV7GnuHSoes1C182rccsMQBJeokO
	8wXszRv1qATtCKr9HZwHw4eZml3DFmLf/EhVwf48dt94qazpo0ONxjZkksaVBpQeaLa3Ai
	RXpl7Pvw07Ma3mfhLntfMG4LXFNSFRLmLpcNVnXgJY8P5B3pxTfH+Zgkd7djnqdRNIROo9
	lEDZT4P56SibEHnIMiP7FecdKz49R8hga7o13q/p93Hu86d4WVEYoMjdGPYEzg==
X-Cc: "David S. Miller" <davem@davemloft.net>,
        Eric Dumazet
 <edumazet@kernel.org>, Jakub Kicinski <kuba@kernel.org>,
        Paolo Abeni
 <pabeni@redhat.com>, Simon Horman <horms@kernel.org>,
        Shuah Khan
 <shuah@kernel.org>, netdev@vger.kernel.org,
        linux-kernel@vger.kernel.org, linux-kselftest@vger.kernel.org,
        Hangbin Liu <liuhangbin@kylinos.cn>,
        Stefano Salsano <stefano.salsano@uniroma2.it>,
        Andrea Mayer
 <andrea@common-net.org>,
        Andrea Mayer <andrea.mayer@uniroma2.it>
X-In-Reply-To: <20261126-srv6_flavors_endx-v5-3-4d8232eec404@kylinos.cn>
X-Mailer: Sylpheed 3.5.1 (GTK+ 2.24.32; x86_64-pc-linux-gnu)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-Virus-Scanned: clamav-milter 0.100.0 at smtp-2015
X-Virus-Status: Clean