Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/tests/net Show outputs of commands if $DEBUG
details: https://anonhg.NetBSD.org/src/rev/802b9b7c75ee
branches: trunk
changeset: 321790:802b9b7c75ee
user: ozaki-r <ozaki-r%NetBSD.org@localhost>
date: Fri Apr 06 09:22:38 2018 +0000
description:
Show outputs of commands if $DEBUG
diffstat:
tests/net/net_common.sh | 18 +++++++++++-------
1 files changed, 11 insertions(+), 7 deletions(-)
diffs (39 lines):
diff -r 3a814ca500c5 -r 802b9b7c75ee tests/net/net_common.sh
--- a/tests/net/net_common.sh Fri Apr 06 09:21:57 2018 +0000
+++ b/tests/net/net_common.sh Fri Apr 06 09:22:38 2018 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: net_common.sh,v 1.26 2018/02/01 05:22:01 ozaki-r Exp $
+# $NetBSD: net_common.sh,v 1.27 2018/04/06 09:22:38 ozaki-r Exp $
#
# Copyright (c) 2016 Internet Initiative Japan Inc.
# All rights reserved.
@@ -319,19 +319,23 @@
rump_server_destroy_ifaces()
{
local backup=$RUMP_SERVER
+ local outout=ignore
$DEBUG && cat $_rump_server_ifaces
# Try to dump states before destroying interfaces
for sock in $(cat $_rump_server_socks); do
export RUMP_SERVER=$sock
- atf_check -s exit:0 -o ignore rump.ifconfig
- atf_check -s exit:0 -o ignore rump.netstat -nr
+ if $DEBUG; then
+ output=save:/dev/stdout
+ fi
+ atf_check -s exit:0 -o $output rump.ifconfig
+ atf_check -s exit:0 -o $output rump.netstat -nr
# XXX still need hijacking
- atf_check -s exit:0 -o ignore $HIJACKING rump.netstat -nai
- atf_check -s exit:0 -o ignore rump.arp -na
- atf_check -s exit:0 -o ignore rump.ndp -na
- atf_check -s exit:0 -o ignore $HIJACKING ifmcstat
+ atf_check -s exit:0 -o $output $HIJACKING rump.netstat -nai
+ atf_check -s exit:0 -o $output rump.arp -na
+ atf_check -s exit:0 -o $output rump.ndp -na
+ atf_check -s exit:0 -o $output $HIJACKING ifmcstat
done
# XXX using pipe doesn't work. See PR bin/51667
Home |
Main Index |
Thread Index |
Old Index