Article View: linux.kernel.netdev
Article #1022Re: [PATCH net-next] selftests: rtnetlink: skip ifalias test if uuidgen is missing
From: Hangbin Liu
Date: Fri, 09 Oct 2026 02:18
Date: Fri, 09 Oct 2026 02:18
52 lines
7463 bytes
7463 bytes
Hi Darío,
On Thu, Oct 08, 2026 at 08:37:41PM +0200, Darío Hueso Gisbert wrote:
> kci_test_ifalias() uses uuidgen to generate the alias names, but
> uuidgen is not always installed on minimal systems. When it is
> missing, the test fails with "uuidgen: command not found" instead of
> being reported as skipped.
>
> Check for uuidgen before running the test and return SKIP when it is
> not available, as kci_test_promote_secondaries() already does for
> ifconfig.
>
> Assisted-by: LLM
> Signed-off-by: Darío Hueso Gisbert <darihueso21@gmail.com>
> ---
> The commit message and the added check were drafted with the help of
> an LLM (Claude). I reviewed both and tested the script on a kernel
> built from mainline, with uuidgen installed (unchanged behaviour) and
> with it removed (the ifalias test now reports SKIP instead of FAIL).
>
> On that kernel the unrelated ipsec_offload test fails with and without
> this change.
>
> tools/testing/selftests/net/rtnetlink.sh | 7 +++++++
> 1 file changed, 7 insertions(+)
>
> diff --git a/tools/testing/selftests/net/rtnetlink.sh b/tools/testing/selftests/net/rtnetlink.sh
> index 4843d474538f..c758efb734da 100755
> --- a/tools/testing/selftests/net/rtnetlink.sh
> +++ b/tools/testing/selftests/net/rtnetlink.sh
> @@ -412,6 +412,13 @@ kci_test_addrlabel()
> kci_test_ifalias()
> {
> local ret=0
> +
> + run_cmd uuidgen
> + if [ $ret -ne 0 ]; then
> + end_test "SKIP: uuidgen not installed"
> + return $ksft_skip
> + fi
You can use check_command, which will log test and return correctly.
Thanks
Hangbin
> +
> namewant=$(uuidgen)
> syspathname="/sys/class/net/$devdummy/ifalias"
> run_cmd ip link set dev "$devdummy" alias "$namewant"
> --
> 2.53.0
>
Technical Details
Message-ID:
<ashPChZWM1ZMRMjL@fedora>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343399-linux-kernel-netdev=dewy.ruReferences:
<20261008183742.678-1-darihueso21@gmail.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343399-linux-kernel-netdev=dewy.ru From: hangbin.liu@linux.dev (Hangbin Liu) Newsgroups: linux.kernel.netdev Subject: Re: [PATCH net-next] selftests: rtnetlink: skip ifalias test if uuidgen is missing Date: Fri, 9 Oct 2026 10:18:50 +0800 Organization: Usenet Network Message-ID: <ashPChZWM1ZMRMjL@fedora> References: <20261008183742.678-1-darihueso21@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Injection-Info: usenet.network; logging-data="1017994"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:AWIVfw5r20eTr6bohoXh7cMg1Y4= sha256:7TMLC1Nf92Gu6MLiz4QjaFH7dGNBnJRsc3DMSNoWtP0= sha1:ubwpTB6pv8EZm7whezhv8bB3rPs= sha256:do23iAD+tFulD7ve7bggR5YGm2kRqHdOrbE/4QkUWwE= Content-Disposition: inline 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 AD9D010F59C; Fri, 9 Oct 2026 05:21:46 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.75 X-Spam-Status: No, score=-0.75 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (1024-bit key) header.d=linux.dev 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 HmPraGxDflm6; Fri, 9 Oct 2026 05:21:38 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-343399-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=fail (p=none dis=none) header.from=linux.dev X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 7429010F59A; Fri, 9 Oct 2026 05:21:28 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 980986285A; Fri, 9 Oct 2026 02:19:08 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id BDE8B3264C2; Fri, 9 Oct 2026 02:19:07 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="FtLFzIbm" X-Received: from mta1.migadu.com (out-187.mta1.migadu.com [95.215.58.187]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1FF342F361B for <netdev@vger.kernel.org>; Fri, 9 Oct 2026 02:19:03 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.187 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791512347; cv=none; b=a3Qy6oNznOhSq4y/oYpEOhAXYGmCWc8tsHHLMxkeMoCcHxuVCYaglJkQGzrAocA4EP21tzD9XwaWIvO+68qQzgZy6PcAVm5dnJr5exHUeAPJHNiKBp0FwqCtzJ9RJK5k9wpziJfVJgLtrVcoVpwI85eOz2n+g+1wNuCGbvHlEis= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791512347; c=relaxed/simple; bh=AXIi5l9EgmU9TpFEGlZP7Wof8wFRLyDVW5am2ssOVqk=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=PmT7+GepD4aKE7Zjn3mjonaiAIpuowpKQDA81LTO+ZsR6DWe3Zc02Ztki4/HnTbXO+6bSfCqe0+RB+qlZl0GRFqK0tLtpjlSt2QlaFLQ1jE4xz9uuwpztbOKzcKGowByKQVBR5ls61YjbZPAqJL5fwIvaRDs5FYFBJua8iEWTqg= X-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=FtLFzIbm; arc=none smtp.client-ip=95.215.58.187 X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev X-Envelope-To: netdev@vger.kernel.org X-DKIM-Signature: a=rsa-sha256; bh=AXIi5l9EgmU9TpFEGlZP7Wof8wFRLyDVW5am2ssOVqk=; c=simple/simple; d=linux.dev; h=from:to:subject:date:message-id:mime-version:content-type; s=key1; t=1791512341; v=1; x=1792117141; b=FtLFzIbm88y9d80nYvmcduWjs2s7kX+xky2BUaefrMnZ+Sp0+hpYc8uFF3p6U7DsDch5snPw QLOUcPnWXG3lm0406GiE8NLC4W9/w/K0WR5OCIlCo+aNWUDVt7Pt6j2hD+Xcf+rpqA75fnGhBXe mFcCYVdf8Y6CaDVAKg71R6so= X-Envelope-To: netdev@vger.kernel.org X-Received: by mta10.migadu.com with ESMTPS id b3c6c0365d398abd; Fri, 09 Oct 2026 02:19:01 +0000 X-Mizu-Trace-ID: b3c6c0365d398abd X-Migadu-Flow: FLOW_OUT X-Cc: netdev@vger.kernel.org, "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>, linux-kselftest@vger.kernel.org, linux-kernel@vger.kernel.org X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <20261008183742.678-1-darihueso21@gmail.com>