Sun Mar 8 09:05:34 2020 UTC ()
address to ATF t_vlan failure. adapt ifmcstat(8) output format change.


(nisimura)
diff -r1.16 -r1.17 src/tests/net/if_vlan/t_vlan.sh

cvs diff -r1.16 -r1.17 src/tests/net/if_vlan/t_vlan.sh (expand / switch to unified diff)

--- src/tests/net/if_vlan/t_vlan.sh 2019/11/11 02:40:48 1.16
+++ src/tests/net/if_vlan/t_vlan.sh 2020/03/08 09:05:33 1.17
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1# $NetBSD: t_vlan.sh,v 1.16 2019/11/11 02:40:48 yamaguchi Exp $ 1# $NetBSD: t_vlan.sh,v 1.17 2020/03/08 09:05:33 nisimura Exp $
2# 2#
3# Copyright (c) 2016 Internet Initiative Japan Inc. 3# Copyright (c) 2016 Internet Initiative Japan 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#
@@ -782,40 +782,40 @@ vlan_multicast_body_common() @@ -782,40 +782,40 @@ vlan_multicast_body_common()
782 atf_check -s exit:0 -o match:"$eth_mcaddr" $HIJACKING ifmcstat 782 atf_check -s exit:0 -o match:"$eth_mcaddr" $HIJACKING ifmcstat
783 783
784 # delete the address 784 # delete the address
785 $atf_siocXmulti del vlan0 $mcaddr 785 $atf_siocXmulti del vlan0 $mcaddr
786 atf_check -s exit:0 -o not-match:"$eth_mcaddr" $HIJACKING ifmcstat 786 atf_check -s exit:0 -o not-match:"$eth_mcaddr" $HIJACKING ifmcstat
787 787
788 # delete a non-existing address 788 # delete a non-existing address
789 atf_check -s not-exit:0 -e match:"Invalid argument" \ 789 atf_check -s not-exit:0 -e match:"Invalid argument" \
790 $HIJACKING $siocXmulti del vlan0 $mcaddr 790 $HIJACKING $siocXmulti del vlan0 $mcaddr
791 791
792 # add an address to different interfaces 792 # add an address to different interfaces
793 $atf_siocXmulti add vlan0 $mcaddr 793 $atf_siocXmulti add vlan0 $mcaddr
794 $atf_siocXmulti add vlan1 $mcaddr 794 $atf_siocXmulti add vlan1 $mcaddr
795 atf_check -s exit:0 -o match:"${eth_mcaddr}: 2" $HIJACKING ifmcstat 795 atf_check -s exit:0 -o match:"${eth_mcaddr} refcount 2" $HIJACKING ifmcstat
796 $atf_siocXmulti del vlan0 $mcaddr 796 $atf_siocXmulti del vlan0 $mcaddr
797 797
798 # delete the address with invalid interface 798 # delete the address with invalid interface
799 atf_check -s not-exit:0 -e match:"Invalid argument" \ 799 atf_check -s not-exit:0 -e match:"Invalid argument" \
800 $HIJACKING $siocXmulti del vlan0 $mcaddr 800 $HIJACKING $siocXmulti del vlan0 $mcaddr
801 801
802 $atf_siocXmulti del vlan1 $mcaddr 802 $atf_siocXmulti del vlan1 $mcaddr
803 803
804 # add and delete a same address more than once 804 # add and delete a same address more than once
805 $atf_siocXmulti add vlan0 $mcaddr 805 $atf_siocXmulti add vlan0 $mcaddr
806 $atf_siocXmulti add vlan0 $mcaddr 806 $atf_siocXmulti add vlan0 $mcaddr
807 $atf_siocXmulti add vlan0 $mcaddr 807 $atf_siocXmulti add vlan0 $mcaddr
808 atf_check -s exit:0 -o match:"${eth_mcaddr}: 3" $HIJACKING ifmcstat 808 atf_check -s exit:0 -o match:"${eth_mcaddr} refcount 3" $HIJACKING ifmcstat
809 $atf_siocXmulti del vlan0 $mcaddr 809 $atf_siocXmulti del vlan0 $mcaddr
810 $atf_siocXmulti del vlan0 $mcaddr 810 $atf_siocXmulti del vlan0 $mcaddr
811 $atf_siocXmulti del vlan0 $mcaddr 811 $atf_siocXmulti del vlan0 $mcaddr
812 atf_check -s exit:0 -o not-match:"$eth_mcaddr" $HIJACKING ifmcstat 812 atf_check -s exit:0 -o not-match:"$eth_mcaddr" $HIJACKING ifmcstat
813 813
814 # delete all address added to parent device when remove 814 # delete all address added to parent device when remove
815 # the config of parent interface 815 # the config of parent interface
816 $atf_siocXmulti add vlan0 $mcaddr 816 $atf_siocXmulti add vlan0 $mcaddr
817 $atf_siocXmulti add vlan0 $mcaddr 817 $atf_siocXmulti add vlan0 $mcaddr
818 $atf_siocXmulti add vlan0 $mcaddr 818 $atf_siocXmulti add vlan0 $mcaddr
819 $atf_ifconfig vlan0 -vlanif shmif0 819 $atf_ifconfig vlan0 -vlanif shmif0
820 atf_check -s exit:0 -o not-match:"$eth_mcaddr" $HIJACKING ifmcstat 820 atf_check -s exit:0 -o not-match:"$eth_mcaddr" $HIJACKING ifmcstat
821} 821}