selftests: net: improve missing modules error message
Subsystems (3)
PATCH v4 1/1 selftests: net: improve missing modules error message
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.
---
V1
- https://lore.kernel.org/all/[email protected]/
V2
- https://lore.kernel.org/all/[email protected]/
- 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/[email protected]/#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(-)
tools/testing/selftests/net/test_ingress_egress_chaining.sh +11 -1
@@ -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))"
Signature · 1 line
2.43.0
Paolo Abeni
maintainerQuoted 9 lines · David Hunter
The error message describing the required modules is inaccurate. Currently, only "SKIP: Need
act_mirredmodule" 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 <[email protected]>
## 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
Signature · 1 line
pw-bot: defer
Paolo Abeni
maintainerQuoted 6 lines · Paolo Abeni
Quoted 5 lines · David Hunter
The error message describing the required modules is inaccurate. Currently, only "SKIP: Need
act_mirredmodule" is printed when any of the modules are missing. As a result, users might only include that module; however, three modules are required.
Quoted 8 lines
Quoted 4 lines
Fix the error message to show any/all modules needed for the script file to properly execute.
Signed-off-by David Hunter <[email protected]>## 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.
Quoted 9 lines
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