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

This commit is contained in:
ozaki-r 2019-10-16 07:42:22 +00:00
parent 367904e3e7
commit 3cb3151cb2
1 changed files with 10 additions and 1 deletions

View File

@ -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