Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/tests/net/if Add tests deleting active/inactive links



details:   https://anonhg.NetBSD.org/src/rev/5f8e7aeff901
branches:  trunk
changeset: 343866:5f8e7aeff901
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Feb 29 08:13:41 2016 +0000

description:
Add tests deleting active/inactive links

diffstat:

 tests/net/if/t_ifconfig.sh |  8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diffs (22 lines):

diff -r c64bbe6c8864 -r 5f8e7aeff901 tests/net/if/t_ifconfig.sh
--- a/tests/net/if/t_ifconfig.sh        Mon Feb 29 04:22:21 2016 +0000
+++ b/tests/net/if/t_ifconfig.sh        Mon Feb 29 08:13:41 2016 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: t_ifconfig.sh,v 1.6 2015/11/20 05:05:40 ozaki-r Exp $
+# $NetBSD: t_ifconfig.sh,v 1.7 2016/02/29 08:13:41 ozaki-r Exp $
 #
 # Copyright (c) 2015 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -247,6 +247,12 @@
        atf_check -s exit:0 rump.ifconfig shmif0 inet6 fc00::2 delete
        atf_check -s exit:0 -o not-match:'fc00::1' rump.ifconfig shmif0 inet6
        atf_check -s exit:0 -o not-match:'fc00::2' rump.ifconfig shmif0 inet6
+       # can delete inactive link
+       atf_check -s exit:0 rump.ifconfig shmif0 link b2:a0:75:00:00:02
+       atf_check -s exit:0 rump.ifconfig shmif0 link b2:a0:75:00:00:02 delete
+       # cannot delete active link
+       atf_check -s not-exit:0 -e match:'SIOCDLIFADDR: Device busy' \
+           rump.ifconfig shmif0 link b2:a0:75:00:00:01 delete
 
        atf_check -s exit:0 rump.ifconfig shmif0 inet 192.168.0.1/24
 



Home | Main Index | Thread Index | Old Index