Sat Oct 1 22:15:04 2016 UTC ()
Don't expect ping to complain about sending to a local address
assigned to an interface that's down - instead it just attempts
to send, and the interface never responds (as it would if it were
a remote address).


(kre)
diff -r1.13 -r1.14 src/tests/net/if/t_ifconfig.sh

cvs diff -r1.13 -r1.14 src/tests/net/if/t_ifconfig.sh (expand / switch to unified diff)

--- src/tests/net/if/t_ifconfig.sh 2016/10/01 15:35:22 1.13
+++ src/tests/net/if/t_ifconfig.sh 2016/10/01 22:15:04 1.14
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_ifconfig.sh,v 1.13 2016/10/01 15:35:22 roy Exp $ 1# $NetBSD: t_ifconfig.sh,v 1.14 2016/10/01 22:15:04 kre Exp $
2# 2#
3# Copyright (c) 2015 The NetBSD Foundation, Inc. 3# Copyright (c) 2015 The NetBSD Foundation, Inc.
4# All rights reserved. 4# All rights reserved.
5# 5#
6# Redistribution and use in source and binary forms, with or without 6# Redistribution and use in source and binary forms, with or without
7# modification, are permitted provided that the following conditions 7# modification, are permitted provided that the following conditions
8# are met: 8# are met:
9# 1. Redistributions of source code must retain the above copyright 9# 1. Redistributions of source code must retain the above copyright
10# notice, this list of conditions and the following disclaimer. 10# notice, this list of conditions and the following disclaimer.
11# 2. Redistributions in binary form must reproduce the above copyright 11# 2. Redistributions in binary form must reproduce the above copyright
12# notice, this list of conditions and the following disclaimer in the 12# notice, this list of conditions and the following disclaimer in the
13# documentation and/or other materials provided with the distribution. 13# documentation and/or other materials provided with the distribution.
14# 14#
@@ -220,27 +220,27 @@ ifconfig_parameters_body() @@ -220,27 +220,27 @@ ifconfig_parameters_body()
220 atf_check -s exit:0 rump.ifconfig shmif0 192.168.0.2/24 220 atf_check -s exit:0 rump.ifconfig shmif0 192.168.0.2/24
221 atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.0.3/24 alias 221 atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.0.3/24 alias
222 atf_check -s exit:0 rump.ifconfig shmif0 up 222 atf_check -s exit:0 rump.ifconfig shmif0 up
223 unset RUMP_SERVER 223 unset RUMP_SERVER
224 224
225 export RUMP_SERVER=${RUMP_SERVER1} 225 export RUMP_SERVER=${RUMP_SERVER1}
226 226
227 # active 227 # active
228 atf_check -s exit:0 rump.ifconfig shmif0 link b2:a0:75:00:00:01 active 228 atf_check -s exit:0 rump.ifconfig shmif0 link b2:a0:75:00:00:01 active
229 atf_check -s exit:0 -o match:'address:.b2:a0:75:00:00:01' \ 229 atf_check -s exit:0 -o match:'address:.b2:a0:75:00:00:01' \
230 rump.ifconfig shmif0 230 rump.ifconfig shmif0
231 # down, up 231 # down, up
232 atf_check -s exit:0 rump.ifconfig shmif0 down 232 atf_check -s exit:0 rump.ifconfig shmif0 down
233 atf_check -s ignore -o ignore -e match:'down' rump.ping -c 1 \ 233 atf_check -s not-exit:0 -o ignore -e ignore rump.ping -c 1 \
234 -w $TIMEOUT -n 192.168.0.2 234 -w $TIMEOUT -n 192.168.0.2
235 atf_check -s exit:0 rump.ifconfig shmif0 up 235 atf_check -s exit:0 rump.ifconfig shmif0 up
236 atf_check -s exit:0 rump.ifconfig -w 10 236 atf_check -s exit:0 rump.ifconfig -w 10
237 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT -n 192.168.0.2 237 atf_check -s exit:0 -o ignore rump.ping -c 1 -w $TIMEOUT -n 192.168.0.2
238 238
239 # alias 239 # alias
240 atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.1.1/24 alias 240 atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.1.1/24 alias
241 atf_check -s exit:0 -o match:'192.168.1.1/24' rump.ifconfig shmif0 241 atf_check -s exit:0 -o match:'192.168.1.1/24' rump.ifconfig shmif0
242 atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.1.1/24 -alias 242 atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.1.1/24 -alias
243 atf_check -s exit:0 -o not-match:'192.168.1.1/24' rump.ifconfig shmif0 243 atf_check -s exit:0 -o not-match:'192.168.1.1/24' rump.ifconfig shmif0
244 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::1 244 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::1
245 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::2 245 atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::2
246 atf_check -s exit:0 -o match:'fc00::1' rump.ifconfig shmif0 inet6 246 atf_check -s exit:0 -o match:'fc00::1' rump.ifconfig shmif0 inet6