CVS commit: src/tests/net/if
Module Name:src Committed By: gson Date: Fri Nov 26 15:45:52 UTC 2021 Modified Files: src/tests/net/if: t_compat.c Log Message: Delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/net/if/t_compat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if/t_compat.c diff -u src/tests/net/if/t_compat.c:1.4 src/tests/net/if/t_compat.c:1.5 --- src/tests/net/if/t_compat.c:1.4 Sat Nov 12 15:12:59 2016 +++ src/tests/net/if/t_compat.c Fri Nov 26 15:45:52 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: t_compat.c,v 1.4 2016/11/12 15:12:59 kre Exp $ */ +/* $NetBSD: t_compat.c,v 1.5 2021/11/26 15:45:52 gson Exp $ */ #include #include @@ -25,9 +25,9 @@ struct oifreq { struct sockaddr ifru_addr; struct sockaddr ifru_dstaddr; struct sockaddr ifru_broadaddr; -short ifru_flags; +short ifru_flags; int ifru_metric; -int ifru_mtu; +int ifru_mtu; int ifru_dlt; u_int ifru_value; void * ifru_data; @@ -36,7 +36,7 @@ struct oifreq { void*b_buf; } ifru_b; } ifr_ifru; -}; +}; #define OOSIOCGIFBRDADDR _IOWR('i', 18, struct oifreq) ATF_TC(OOSIOCGIFBRDADDR);
CVS commit: src/tests/net/if
Module Name:src Committed By: gson Date: Fri Nov 26 15:45:52 UTC 2021 Modified Files: src/tests/net/if: t_compat.c Log Message: Delete trailing whitespace To generate a diff of this commit: cvs rdiff -u -r1.4 -r1.5 src/tests/net/if/t_compat.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/if
Module Name:src Committed By: ozaki-r Date: Thu Aug 15 04:21:33 UTC 2019 Modified Files: src/tests/net/if: t_ifconfig.sh Log Message: tests: check if ifconfig (ioctl) works after a failure of ifconfig destroy This is a test for PR kern/54434. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/tests/net/if/t_ifconfig.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if/t_ifconfig.sh diff -u src/tests/net/if/t_ifconfig.sh:1.20 src/tests/net/if/t_ifconfig.sh:1.21 --- src/tests/net/if/t_ifconfig.sh:1.20 Thu Jul 4 02:46:40 2019 +++ src/tests/net/if/t_ifconfig.sh Thu Aug 15 04:21:33 2019 @@ -1,4 +1,4 @@ -# $NetBSD: t_ifconfig.sh,v 1.20 2019/07/04 02:46:40 ozaki-r Exp $ +# $NetBSD: t_ifconfig.sh,v 1.21 2019/08/15 04:21:33 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -69,6 +69,11 @@ ifconfig_create_destroy_body() atf_check -s exit:0 rump.ifconfig shmif0 up atf_check -s exit:0 rump.ifconfig shmif0 destroy + # Check if ifconfig (ioctl) works after a failure of ifconfig destroy + atf_check -s exit:0 -o ignore rump.ifconfig lo0 + atf_check -s not-exit:0 -e ignore rump.ifconfig lo0 destroy + atf_check -s exit:0 -o ignore rump.ifconfig lo0 + unset RUMP_SERVER }
CVS commit: src/tests/net/if
Module Name:src Committed By: ozaki-r Date: Thu Aug 15 04:21:33 UTC 2019 Modified Files: src/tests/net/if: t_ifconfig.sh Log Message: tests: check if ifconfig (ioctl) works after a failure of ifconfig destroy This is a test for PR kern/54434. To generate a diff of this commit: cvs rdiff -u -r1.20 -r1.21 src/tests/net/if/t_ifconfig.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/if
Module Name:src Committed By: ozaki-r Date: Thu Jul 4 02:46:40 UTC 2019 Modified Files: src/tests/net/if: t_ifconfig.sh Log Message: Add ATF test for a description. >From t-kusaba@IIJ To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/tests/net/if/t_ifconfig.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
CVS commit: src/tests/net/if
Module Name:src Committed By: ozaki-r Date: Thu Jul 4 02:46:40 UTC 2019 Modified Files: src/tests/net/if: t_ifconfig.sh Log Message: Add ATF test for a description. >From t-kusaba@IIJ To generate a diff of this commit: cvs rdiff -u -r1.19 -r1.20 src/tests/net/if/t_ifconfig.sh Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. Modified files: Index: src/tests/net/if/t_ifconfig.sh diff -u src/tests/net/if/t_ifconfig.sh:1.19 src/tests/net/if/t_ifconfig.sh:1.20 --- src/tests/net/if/t_ifconfig.sh:1.19 Mon May 13 17:55:08 2019 +++ src/tests/net/if/t_ifconfig.sh Thu Jul 4 02:46:40 2019 @@ -1,4 +1,4 @@ -# $NetBSD: t_ifconfig.sh,v 1.19 2019/05/13 17:55:08 bad Exp $ +# $NetBSD: t_ifconfig.sh,v 1.20 2019/07/04 02:46:40 ozaki-r Exp $ # # Copyright (c) 2015 The NetBSD Foundation, Inc. # All rights reserved. @@ -478,6 +478,40 @@ ifconfig_number_cleanup() cleanup } +atf_test_case ifconfig_description cleanup +ifconfig_description_head() +{ + atf_set "descr" "tests of setting and unsetting interface description" + atf_set "require.progs" "rump_server" +} + +ifconfig_description_body() +{ + + rump_server_start $RUMP_SERVER1 + + export RUMP_SERVER=$RUMP_SERVER1 + for descr in description descr; do + atf_check -s exit:0 rump.ifconfig lo0 $descr DESCRIPTION-TEST + atf_check -s exit:0 -o match:"DESCRIPTION-TEST" rump.ifconfig lo0 + atf_check -s exit:0 rump.ifconfig lo0 $descr DESCRIPTION-TEST-MODIFIED + atf_check -s exit:0 -o match:"DESCRIPTION-TEST-MODIFIED" rump.ifconfig lo0 + atf_check -s exit:0 rump.ifconfig lo0 -$descr + atf_check -s exit:0 -o not-match:'DESCRIPTION-TEST-MODIFIED' rump.ifconfig lo0 + + atf_check -s exit:0 rump.ifconfig lo0 $descr `printf "%063d" 0` + atf_check -s not-exit:0 -e match:"description too long" rump.ifconfig lo0 $descr `printf "%064d" 0` + atf_check -s exit:0 rump.ifconfig lo0 $descr "" + done +} + +ifconfig_description_cleanup() +{ + + $DEBUG && dump + cleanup +} + atf_init_test_cases() { @@ -487,4 +521,5 @@ atf_init_test_cases() atf_add_test_case ifconfig_up_down_ipv4 atf_add_test_case ifconfig_up_down_ipv6 atf_add_test_case ifconfig_number + atf_add_test_case ifconfig_description }
Re: CVS commit: src/tests/net/if
On Fri, Mar 17, 2017 at 5:31 AM, Roy Marples wrote: > On 16/03/17 09:43, Ryota Ozaki wrote: >> I don't know if is expected to be accepted instead of >> an interface name. Please update the test case if the behavior is >> just a bug and ifconfig gets fixed. > > ifconfig(8) says interface name in a lot of places - makes no mention of > using the index integer value. Sure. I hope someone ifconfig wizard fixes it; its argument parser is too complex to tweak for me :-/ ozaki-r
Re: CVS commit: src/tests/net/if
On 16/03/17 09:43, Ryota Ozaki wrote: > I don't know if is expected to be accepted instead of > an interface name. Please update the test case if the behavior is > just a bug and ifconfig gets fixed. ifconfig(8) says interface name in a lot of places - makes no mention of using the index integer value. Roy