netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1 V4] selftests: net: improve missing modules error message
@ 2024-09-14 16:00 David Hunter
  2024-09-19  8:10 ` Paolo Abeni
  0 siblings, 1 reply; 3+ messages in thread
From: David Hunter @ 2024-09-14 16:00 UTC (permalink / raw)
  To: davem, edumazet, kuba, pabeni, shuah
  Cc: David Hunter, netdev, linux-kselftest, linux-kernel

The error message describing the required modules is inaccurate.
Currently, only  "SKIP: Need act_mirred module" is printed when any of
the modules are missing. As a result, users might only include that
module; however, three modules are required.

Fix the error message to show any/all modules needed for the script file
to properly execute.

Signed-off-by: David Hunter <david.hunter.linux@gmail.com>
---

V1 
	- https://lore.kernel.org/all/20240820202116.6124-1-david.hunter.linux@gmail.com/
V2
	- https://lore.kernel.org/all/20240823054833.144612-1-david.hunter.linux@gmail.com/
	- included subject prefixes
	- split the patch into two separate patches (one for each issue)
	- fixed typos in message body
	- removed second, unnecessary for loop
V3
	- https://lore.kernel.org/all/20240827205629.51004-1-david.hunter.linux@gmail.com/#r
	- fixed subject prefix (omit capitilization)
	- fixed spelling mistake in commit message
	- fixed coding style based on recommendations
---
 .../selftests/net/test_ingress_egress_chaining.sh    | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/tools/testing/selftests/net/test_ingress_egress_chaining.sh b/tools/testing/selftests/net/test_ingress_egress_chaining.sh
index 08adff6bb3b6..007a5d04c3e1 100644
--- a/tools/testing/selftests/net/test_ingress_egress_chaining.sh
+++ b/tools/testing/selftests/net/test_ingress_egress_chaining.sh
@@ -13,10 +13,20 @@ if [ "$(id -u)" -ne 0 ];then
 fi
 
 needed_mods="act_mirred cls_flower sch_ingress"
+mods_missing=""
+numb_mods_needed=0
+
 for mod in $needed_mods; do
-	modinfo $mod &>/dev/null || { echo "SKIP: Need act_mirred module"; exit $ksft_skip; }
+	modinfo $mod &>/dev/null && continue
+	mods_missing="$mods_missing$mod "
+	numb_mods_needed=$(expr $numb_mods_needed + 1)
 done
 
+if [ $numb_mods_needed -gt 0 ]; then
+	echo "SKIP: $numb_mods_needed modules needed: $mods_missing"
+	exit $ksft_skip
+fi
+
 ns="ns$((RANDOM%899+100))"
 veth1="veth1$((RANDOM%899+100))"
 veth2="veth2$((RANDOM%899+100))"
-- 
2.43.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1 V4] selftests: net: improve missing modules error message
  2024-09-14 16:00 [PATCH 1/1 V4] selftests: net: improve missing modules error message David Hunter
@ 2024-09-19  8:10 ` Paolo Abeni
  2024-09-19  8:28   ` Paolo Abeni
  0 siblings, 1 reply; 3+ messages in thread
From: Paolo Abeni @ 2024-09-19  8:10 UTC (permalink / raw)
  To: David Hunter, davem, edumazet, kuba, shuah
  Cc: netdev, linux-kselftest, linux-kernel



On 9/14/24 18:00, David Hunter wrote:
> The error message describing the required modules is inaccurate.
> Currently, only  "SKIP: Need act_mirred module" is printed when any of
> the modules are missing. As a result, users might only include that
> module; however, three modules are required.
> 
> Fix the error message to show any/all modules needed for the script file
> to properly execute.
> 
> Signed-off-by: David Hunter <david.hunter.linux@gmail.com>

## Form letter - net-next-closed

The merge window for v6.11 and therefore net-next is closed for new
drivers, features, code refactoring and optimizations. We are currently
accepting bug fixes only.

Please repost when net-next reopens after Sept 30th.

RFC patches sent for review only are obviously welcome at any time.

See:
https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
-- 
pw-bot: defer


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 1/1 V4] selftests: net: improve missing modules error message
  2024-09-19  8:10 ` Paolo Abeni
@ 2024-09-19  8:28   ` Paolo Abeni
  0 siblings, 0 replies; 3+ messages in thread
From: Paolo Abeni @ 2024-09-19  8:28 UTC (permalink / raw)
  To: David Hunter, davem, edumazet, kuba, shuah
  Cc: netdev, linux-kselftest, linux-kernel

On 9/19/24 10:10, Paolo Abeni wrote:
> On 9/14/24 18:00, David Hunter wrote:
>> The error message describing the required modules is inaccurate.
>> Currently, only  "SKIP: Need act_mirred module" is printed when any of
>> the modules are missing. As a result, users might only include that
>> module; however, three modules are required.
>>
>> Fix the error message to show any/all modules needed for the script file
>> to properly execute.
>>
>> Signed-off-by: David Hunter <david.hunter.linux@gmail.com>
> 
> ## Form letter - net-next-closed
> 
> The merge window for v6.11 and therefore net-next is closed for new

FTR, typo above        ^^^^^ is actually v6.12. The rest is accurate.

> drivers, features, code refactoring and optimizations. We are currently
> accepting bug fixes only.
> 
> Please repost when net-next reopens after Sept 30th.
> 
> RFC patches sent for review only are obviously welcome at any time.
> 
> See:
> https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-19  8:28 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-14 16:00 [PATCH 1/1 V4] selftests: net: improve missing modules error message David Hunter
2024-09-19  8:10 ` Paolo Abeni
2024-09-19  8:28   ` Paolo Abeni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).