From: "Darío Hueso Gisbert" <darihueso21@gmail.com>
To: netdev@vger.kernel.org
Cc: "Darío Hueso Gisbert" <darihueso21@gmail.com>,
"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
Subject: [PATCH net-next] selftests: rtnetlink: skip ifalias test if uuidgen is missing
Date: Thu, 8 Oct 2026 20:37:41 +0200 [thread overview]
Message-ID: <20261008183742.678-1-darihueso21@gmail.com> (raw)
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
+
namewant=$(uuidgen)
syspathname="/sys/class/net/$devdummy/ifalias"
run_cmd ip link set dev "$devdummy" alias "$namewant"
--
2.53.0
next reply other threads:[~2026-10-08 18:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-08 18:37 Darío Hueso Gisbert [this message]
2026-10-09 2:18 ` [PATCH net-next] selftests: rtnetlink: skip ifalias test if uuidgen is missing Hangbin Liu
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=20261008183742.678-1-darihueso21@gmail.com \
--to=darihueso21@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=shuah@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox