Source-Changes-HG archive

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

[src/trunk]: src/tests/net/net Add a test case for net.inet.ip.mtudisctimeout



details:   https://anonhg.NetBSD.org/src/rev/2a79b747b84e
branches:  trunk
changeset: 822176:2a79b747b84e
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Mar 06 07:33:27 2017 +0000

description:
Add a test case for net.inet.ip.mtudisctimeout

The test case just reproduces PR kern/52029 and needs more tests.

diffstat:

 tests/net/net/t_mtudisc.sh |  32 +++++++++++++++++++++++++++++++-
 1 files changed, 31 insertions(+), 1 deletions(-)

diffs (52 lines):

diff -r 818a58bf1d0d -r 2a79b747b84e tests/net/net/t_mtudisc.sh
--- a/tests/net/net/t_mtudisc.sh        Mon Mar 06 07:31:15 2017 +0000
+++ b/tests/net/net/t_mtudisc.sh        Mon Mar 06 07:33:27 2017 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_mtudisc.sh,v 1.9 2017/02/16 08:12:47 ozaki-r Exp $
+#      $NetBSD: t_mtudisc.sh,v 1.10 2017/03/06 07:33:27 ozaki-r Exp $
 #
 # Copyright (c) 2016 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -175,12 +175,42 @@
 
 mtudisc_basic_cleanup()
 {
+
        $DEBUG && dump
        stop_nc_server
        cleanup
 }
 
+atf_test_case mtudisc_timeout cleanup
+mtudisc_timeout_head()
+{
+
+       atf_set "descr" "Tests for IPv4 Path MTU Dicorvery timeout behavior"
+       atf_set "require.progs" "rump_server nc"
+}
+
+mtudisc_timeout_body()
+{
+
+       rump_server_start $SOCKLOCAL
+
+       export RUMP_SERVER=$SOCKLOCAL
+       atf_check -s exit:0 -o match:'600 -> 600' \
+           rump.sysctl -w net.inet.ip.mtudisctimeout=600
+
+       # TODO more tests
+}
+
+mtudisc_timeout_cleanup()
+{
+
+       $DEBUG && dump
+       cleanup
+}
+
 atf_init_test_cases()
 {
+
        atf_add_test_case mtudisc_basic
+       atf_add_test_case mtudisc_timeout
 }



Home | Main Index | Thread Index | Old Index