Source-Changes-HG archive

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

[src/trunk]: src/tests/net/route tests: dump kernel stats on cleanup



details:   https://anonhg.NetBSD.org/src/rev/0435bf6ffb4a
branches:  trunk
changeset: 840802:0435bf6ffb4a
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Thu Apr 18 07:56:54 2019 +0000

description:
tests: dump kernel stats on cleanup

diffstat:

 tests/net/route/t_change.sh |  24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diffs (87 lines):

diff -r 28c16a2ae90e -r 0435bf6ffb4a tests/net/route/t_change.sh
--- a/tests/net/route/t_change.sh       Thu Apr 18 07:56:04 2019 +0000
+++ b/tests/net/route/t_change.sh       Thu Apr 18 07:56:54 2019 +0000
@@ -1,4 +1,4 @@
-#      $NetBSD: t_change.sh,v 1.12 2017/12/18 04:11:46 ozaki-r Exp $
+#      $NetBSD: t_change.sh,v 1.13 2019/04/18 07:56:54 ozaki-r Exp $
 #
 # Copyright (c) 2011 The NetBSD Foundation, Inc.
 # All rights reserved.
@@ -32,6 +32,14 @@
 
 DEBUG=${DEBUG:-false}
 
+route_cleanup_common()
+{
+
+       $DEBUG && dump_kernel_stats unix://commsock
+       $DEBUG && extract_rump_server_core
+       env RUMP_SERVER=unix://commsock rump.halt
+}
+
 atf_test_case route_change_reject2blackhole cleanup
 route_change_reject2blackhole_head()
 {
@@ -58,7 +66,7 @@
 route_change_reject2blackhole_cleanup()
 {
 
-       env RUMP_SERVER=unix://commsock rump.halt
+       route_cleanup_common
 }
 
 atf_test_case route_change_gateway cleanup
@@ -91,7 +99,7 @@
 route_change_gateway_cleanup()
 {
 
-       env RUMP_SERVER=unix://commsock rump.halt
+       route_cleanup_common
 }
 
 atf_test_case route_change_ifa cleanup
@@ -156,7 +164,7 @@
 route_change_ifa_cleanup()
 {
 
-       env RUMP_SERVER=unix://commsock rump.halt
+       route_cleanup_common
 }
 
 atf_test_case route_change_ifp cleanup
@@ -223,7 +231,7 @@
 route_change_ifp_cleanup()
 {
 
-       env RUMP_SERVER=unix://commsock rump.halt
+       route_cleanup_common
 }
 
 atf_test_case route_change_ifp_ifa cleanup
@@ -290,7 +298,7 @@
 route_change_ifp_ifa_cleanup()
 {
 
-       env RUMP_SERVER=unix://commsock rump.halt
+       route_cleanup_common
 }
 
 atf_test_case route_change_flags cleanup
@@ -326,7 +334,7 @@
 route_change_flags_cleanup()
 {
 
-       env RUMP_SERVER=unix://commsock rump.halt
+       route_cleanup_common
 }
 
 atf_test_case route_change_default_flags cleanup
@@ -361,7 +369,7 @@
 route_change_default_flags_cleanup()
 {
 
-       env RUMP_SERVER=unix://commsock rump.halt
+       route_cleanup_common
 }
 
 atf_init_test_cases()



Home | Main Index | Thread Index | Old Index