Skip to content

Commit 781fe63

Browse files
jpirkodavem330
authored andcommitted
selftests: forwarding: Allow to get netdev interfaces names from commandline
Signed-off-by: Jiri Pirko <[email protected]> Signed-off-by: Ido Schimmel <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 4e4272d commit 781fe63

File tree

1 file changed

+15
-0
lines changed
  • tools/testing/selftests/net/forwarding

1 file changed

+15
-0
lines changed

tools/testing/selftests/net/forwarding/lib.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,21 @@ if [[ ! -v NUM_NETIFS ]]; then
4545
exit 0
4646
fi
4747

48+
##############################################################################
49+
# Command line options handling
50+
51+
count=0
52+
53+
while [[ $# -gt 0 ]]; do
54+
if [[ "$count" -eq "0" ]]; then
55+
unset NETIFS
56+
declare -A NETIFS
57+
fi
58+
count=$((count + 1))
59+
NETIFS[p$count]="$1"
60+
shift
61+
done
62+
4863
##############################################################################
4964
# Network interfaces configuration
5065

0 commit comments

Comments
 (0)