Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F112584847
D48585.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
5 KB
Referenced Files
None
Subscribers
None
D48585.diff
View Options
diff --git a/tests/sys/netinet/fibs_test.sh b/tests/sys/netinet/fibs_test.sh
--- a/tests/sys/netinet/fibs_test.sh
+++ b/tests/sys/netinet/fibs_test.sh
@@ -30,9 +30,6 @@
# Authors: Alan Somers (Spectra Logic Corporation)
#
-# All of the tests in this file requires the test-suite config variable "fibs"
-# to be defined to a space-delimited list of FIBs that may be used for testing.
-
# arpresolve should check the interface fib for routes to a target when
# creating an ARP table entry. This is a regression for kern/167947, where
# arpresolve only checked the default route.
@@ -48,7 +45,6 @@
{
atf_set "descr" "arpresolve should check the interface fib, not the default fib, for routes"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
atf_set "require.progs" "nping"
}
arpresolve_checks_interface_fib_body()
@@ -100,7 +96,6 @@
{
atf_set "descr" "When creating and deleting loopback IPv4 routes, use the interface's fib"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
loopback_and_network_routes_on_nondefault_fib_body()
@@ -157,7 +152,6 @@
{
atf_set "descr" "When creating and deleting loopback IPv6 routes, use the interface's fib"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
loopback_and_network_routes_on_nondefault_fib_inet6_body()
@@ -216,7 +210,6 @@
{
atf_set "descr" "Multiple interfaces on the same subnet but with different fibs can both have default IPv4 routes"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
default_route_with_multiple_fibs_on_same_subnet_body()
@@ -247,9 +240,9 @@
# Verify that the default route exists for both fibs, with their
# respective interfaces.
- atf_check -o match:"^default.*${TAP0}$" \
+ atf_check -o match:"^0\.0\.0\.0.*${TAP0}$" \
setfib ${FIB0} netstat -rn -f inet
- atf_check -o match:"^default.*${TAP1}$" \
+ atf_check -o match:"^0\.0\.0\.0.*${TAP1}$" \
setfib ${FIB1} netstat -rn -f inet
}
@@ -263,7 +256,6 @@
{
atf_set "descr" "Multiple interfaces on the same subnet but with different fibs can both have default IPv6 routes"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
default_route_with_multiple_fibs_on_same_subnet_inet6_body()
@@ -294,9 +286,9 @@
# Verify that the default route exists for both fibs, with their
# respective interfaces.
- atf_check -o match:"^default.*${TAP0}$" \
+ atf_check -o match:"^::/0.*${TAP0}$" \
setfib ${FIB0} netstat -rn -f inet6
- atf_check -o match:"^default.*${TAP1}$" \
+ atf_check -o match:"^::/0.*${TAP1}$" \
setfib ${FIB1} netstat -rn -f inet6
}
@@ -315,7 +307,6 @@
{
atf_set "descr" "Can remove an IPv4 alias from an interface when the same IPv4 is also assigned to another interface."
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
same_ip_multiple_ifaces_fib0_body()
{
@@ -358,7 +349,6 @@
{
atf_set "descr" "Can remove an IPv4 alias from an interface when the same address is also assigned to another interface, on non-default FIBs."
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
same_ip_multiple_ifaces_body()
{
@@ -404,7 +394,6 @@
{
atf_set "descr" "Can remove an IPv6 alias from an interface when the same address is also assigned to another interface, on non-default FIBs."
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
same_ip_multiple_ifaces_inet6_body()
{
@@ -446,7 +435,7 @@
{
atf_set "descr" "SLAAC correctly installs routes on non-default FIBs"
atf_set "require.user" "root"
- atf_set "require.config" "fibs" "allow_sysctl_side_effects"
+ atf_set "require.config" "allow_sysctl_side_effects"
}
slaac_on_nondefault_fib6_body()
{
@@ -490,7 +479,7 @@
atf_check -o match:"${SUBNET}:/${MASK}.*\<U\>.*$EPAIRB" \
netstat -rnf inet6 -F $FIB1
# Check default route
- atf_check -o match:"default.*\<UG\>.*$EPAIRB" \
+ atf_check -o match:"^::/0.*\<UG\>.*$EPAIRB" \
netstat -rnf inet6 -F $FIB1
# Check that none of the above routes appeared on other routes
@@ -533,7 +522,6 @@
{
atf_set "descr" "Multiple FIBs can have IPv4 subnet routes for the same subnet"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
subnet_route_with_multiple_fibs_on_same_subnet_body()
@@ -570,7 +558,6 @@
{
atf_set "descr" "Multiple FIBs can have IPv6 subnet routes for the same subnet"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
subnet_route_with_multiple_fibs_on_same_subnet_inet6_body()
@@ -620,7 +607,6 @@
{
atf_set "descr" "Source address selection for UDP packets with SO_DONTROUTE on non-default FIBs works"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
udp_dontroute_body()
@@ -671,7 +657,6 @@
{
atf_set "descr" "Source address selection for UDP IPv6 packets with SO_DONTROUTE on non-default FIBs works"
atf_set "require.user" "root"
- atf_set "require.config" "fibs"
}
udp_dontroute6_body()
@@ -748,15 +733,13 @@
{
NUMFIBS=$1
net_fibs=`sysctl -n net.fibs`
+ if [ $net_fibs -lt $(($NUMFIBS + 1)) ]; then
+ atf_check -o ignore sysctl net.fibs=$(($NUMFIBS + 1))
+ net_fibs=`sysctl -n net.fibs`
+ fi
i=0
while [ $i -lt "$NUMFIBS" ]; do
- fib=`atf_config_get "fibs" | \
- awk -v i=$(( i + 1 )) '{print $i}'`
- echo "fib is ${fib}"
- eval FIB${i}=${fib}
- if [ "$fib" -ge "$net_fibs" ]; then
- atf_skip "The ${i}th configured fib is ${fib}, which is not less than net.fibs, which is ${net_fibs}"
- fi
+ eval FIB${i}=$(($i + 1))
i=$(( $i + 1 ))
done
}
@@ -816,9 +799,7 @@
local ADDR=$4
local MASK=$5
local FLAGS=$6
- echo setfib ${FIB} \
- ifconfig $IFACE ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS
- setfib ${FIB} ifconfig $IFACE ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS
+ atf_check setfib ${FIB} ifconfig $IFACE ${PROTO} ${ADDR}/${MASK} fib $FIB $FLAGS
}
# Create a tap(4) interface, configure it, and register it for cleanup.
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Mar 21, 4:04 AM (13 h, 57 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16039573
Default Alt Text
D48585.diff (5 KB)
Attached To
Mode
D48585: fibs tests: Fix test failures and simplify
Attached
Detach File
Event Timeline
Log In to Comment