Module Name:    src
Committed By:   ozaki-r
Date:           Wed Oct 16 07:42:23 UTC 2019

Modified Files:
        src/tests/net/ndp: t_ra.sh

Log Message:
tests: add tests for the validateion of net.inet6.ip6.temppltime


To generate a diff of this commit:
cvs rdiff -u -r1.32 -r1.33 src/tests/net/ndp/t_ra.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/ndp/t_ra.sh
diff -u src/tests/net/ndp/t_ra.sh:1.32 src/tests/net/ndp/t_ra.sh:1.33
--- src/tests/net/ndp/t_ra.sh:1.32	Sat Nov 25 07:58:47 2017
+++ src/tests/net/ndp/t_ra.sh	Wed Oct 16 07:42:22 2019
@@ -1,4 +1,4 @@
-#	$NetBSD: t_ra.sh,v 1.32 2017/11/25 07:58:47 kre Exp $
+#	$NetBSD: t_ra.sh,v 1.33 2019/10/16 07:42:22 ozaki-r Exp $
 #
 # Copyright (c) 2015 Internet Initiative Japan Inc.
 # All rights reserved.
@@ -695,6 +695,15 @@ ra_temporary_address_body()
 	# autoconf, temporal address should be used as the source address
 	check_echo_request_pkt bus1 $ip_temp $IP6SRV
 
+	#
+	# Testing the validation of net.inet6.ip6.temppltime
+	#
+	# XXX should move to a better place
+	atf_check -s not-exit:0 -e match:'Invalid argument' \
+	    rump.sysctl -w net.inet6.ip6.temppltime=$((600 + 5))
+	atf_check -s exit:0 -o match:'86400 -> 606' \
+	    rump.sysctl -w net.inet6.ip6.temppltime=$((600 + 5 + 1))
+
 	unset RUMP_SERVER
 
 	terminate_rtadvd $PIDFILE

Reply via email to