From patchwork Thu Jun 23 11:17:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Boca X-Patchwork-Id: 639606 X-Patchwork-Delegate: guru@ovn.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from archives.nicira.com (archives.nicira.com [96.126.127.54]) by ozlabs.org (Postfix) with ESMTP id 3rZzYC6xd9z9t15 for ; Thu, 23 Jun 2016 21:21:03 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 3A61610A2A; Thu, 23 Jun 2016 04:21:03 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx3v3.cudamail.com (mx3.cudamail.com [64.34.241.5]) by archives.nicira.com (Postfix) with ESMTPS id ABFDE10A24 for ; Thu, 23 Jun 2016 04:21:02 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 44429162629 for ; Thu, 23 Jun 2016 05:21:02 -0600 (MDT) X-ASG-Debug-ID: 1466680860-0b32375af088ef0001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id X5pTDi0XjNc6WQ8p (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 23 Jun 2016 05:21:00 -0600 (MDT) X-Barracuda-Envelope-From: pboca@cloudbasesolutions.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.2 Received: from unknown (HELO cbssmtp1.cloudbase.local) (91.232.152.5) by mx3-pf1.cudamail.com with SMTP; 23 Jun 2016 11:20:59 -0000 Received-SPF: pass (mx3-pf1.cudamail.com: SPF record at cloudbasesolutions.com designates 91.232.152.5 as permitted sender) X-Barracuda-Apparent-Source-IP: 91.232.152.5 X-Barracuda-RBL-IP: 91.232.152.5 Received: from localhost (localhost [127.0.0.1]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id B7BB64164D for ; Thu, 23 Jun 2016 14:20:58 +0300 (EEST) X-Virus-Scanned: amavisd-new at cloudbasesolutions.com Received: from cbssmtp1.cloudbase.local ([127.0.0.1]) by localhost (cbssmtp1.cloudbase.local [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id D8O3_FztbJPb for ; Thu, 23 Jun 2016 14:20:38 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id BFE5D414A7 for ; Thu, 23 Jun 2016 14:17:21 +0300 (EEST) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0301.000; Thu, 23 Jun 2016 13:17:21 +0200 X-CudaMail-Envelope-Sender: pboca@cloudbasesolutions.com From: Paul Boca To: "dev@openvswitch.org" X-CudaMail-MID: CM-V1-622005299 X-CudaMail-DTE: 062316 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [PATCH V3 17/21] python tests: Ignore stderr output X-ASG-Orig-Subj: [##CM-V1-622005299##][PATCH V3 17/21] python tests: Ignore stderr output Thread-Index: AQHRzUDOeF4Xvqdhok6PeLKXdo5LGg== Date: Thu, 23 Jun 2016 11:17:20 +0000 Message-ID: <1466680602-18584-18-git-send-email-pboca@cloudbasesolutions.com> References: <1466680602-18584-1-git-send-email-pboca@cloudbasesolutions.com> In-Reply-To: <1466680602-18584-1-git-send-email-pboca@cloudbasesolutions.com> Accept-Language: en-US, it-IT Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.77.78.1] MIME-Version: 1.0 X-GBUdb-Analysis: 0, 91.232.152.5, Ugly c=0.372106 p=-0.297297 Source Normal X-MessageSniffer-Rules: 0-0-0-10016-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1466680860 X-Barracuda-Encrypted: DHE-RSA-AES256-SHA X-Barracuda-URL: https://web.cudamail.com:443/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at cudamail.com X-Barracuda-BRTS-Status: 1 X-Barracuda-Spam-Score: 0.10 X-Barracuda-Spam-Status: No, SCORE=0.10 using global scores of TAG_LEVEL=3.5 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=4.0 tests=RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.30688 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS Subject: [ovs-dev] [PATCH V3 17/21] python tests: Ignore stderr output X-BeenThere: dev@openvswitch.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@openvswitch.org Sender: "dev" test-unixctl.py and test-vlog.py outputs on stderr and on Windows stderr is not overriden by every AT_CHECK call, the logs are only apended to the file and subsequent AT_CHECKs get errors from previous call. Signed-off-by: Paul-Daniel Boca --- V3: Initial commit --- tests/unixctl-py.at | 3 ++- tests/vlog.at | 34 +++++++++++++++++++--------------- 2 files changed, 21 insertions(+), 16 deletions(-) diff --git a/tests/unixctl-py.at b/tests/unixctl-py.at index 2031897..0ed3c41 100644 --- a/tests/unixctl-py.at +++ b/tests/unixctl-py.at @@ -114,7 +114,8 @@ m4_define([UNIXCTL_SERVER_PYN], AT_SKIP_IF([test $2 = no]) on_exit 'kill `cat test-unixctl.py.pid`' AT_CAPTURE_FILE([`pwd`/test-unixctl.py.log]) - AT_CHECK([$3 $srcdir/test-unixctl.py --log-file --pidfile --detach]) + AT_CHECK([$3 $srcdir/test-unixctl.py --log-file --pidfile --detach], + [0], [], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py help], [0], [stdout]) AT_CHECK([cat stdout], [0], [dnl diff --git a/tests/vlog.at b/tests/vlog.at index b96f394..c260b5e 100644 --- a/tests/vlog.at +++ b/tests/vlog.at @@ -5,7 +5,7 @@ m4_define([VLOG_PYN], AT_SKIP_IF([test $2 = no]) AT_CAPTURE_FILE([log_file]) AT_CAPTURE_FILE([stderr_log]) - AT_CHECK([$3 $srcdir/test-vlog.py --log-file log_file \ + AT_CHECK([$3 $srcdir/test-vlog.py --log-file=log_file \ -v dbg module_1:info module_2:warn syslog:off 2>stderr_log]) AT_CHECK([sed -e 's/.*-.*-.*T..:..:..Z |//' \ @@ -192,7 +192,8 @@ m4_define([VLOG_REOPEN_WITHOUT_FILE_PYN], AT_SKIP_IF([test $2 = no]) on_exit 'kill `cat test-unixctl.py.pid`' - AT_CHECK([$3 $srcdir/test-unixctl.py --pidfile --detach]) + AT_CHECK([$3 $srcdir/test-unixctl.py --pidfile --detach], + [0], [], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py vlog/reopen], [0], [Logging to file not configured @@ -403,8 +404,8 @@ m4_define([VLOG_SET_AND_LIST_PYN], on_exit 'kill `cat test-unixctl.py.pid`' AT_CAPTURE_FILE([log]) - AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile --detach]) - + AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile --detach], + [0], [], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py vlog/list], [0], [dnl console syslog file ------- ------ ------ @@ -417,13 +418,15 @@ socket_util info info info stream info info info test-unixctl info info info unixctl_server info info info -]) +], [ignore]) - AT_CHECK([APPCTL -t test-unixctl.py vlog/set daemon:syslog:err]) - AT_CHECK([APPCTL -t test-unixctl.py vlog/set file:dbg]) + AT_CHECK([APPCTL -t test-unixctl.py vlog/set daemon:syslog:err], + [0], [], [ignore]) + AT_CHECK([APPCTL -t test-unixctl.py vlog/set file:dbg], + [0], [], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py vlog/set nonexistent], [0], [no destination, level, or module "nonexistent" -]) +], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py vlog/list], [0], [dnl console syslog file ------- ------ ------ @@ -436,17 +439,18 @@ socket_util info info dbg stream info info dbg test-unixctl info info dbg unixctl_server info info dbg -]) +], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py vlog/set pattern], [0], [Please supply a valid pattern and destination -]) +], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py vlog/set pattern:nonexistent], [0], [Destination nonexistent does not exist -]) - AT_CHECK([APPCTL -t test-unixctl.py vlog/set pattern:file:'I<3OVS|%m']) - AT_CHECK([APPCTL -t test-unixctl.py log patterntest]) - AT_CHECK([grep -q 'I<3OVS' log]) +], [ignore]) + AT_CHECK([APPCTL -t test-unixctl.py vlog/set pattern:file:'I<3OVS|%m'], + [0], [], [ignore]) + AT_CHECK([APPCTL -t test-unixctl.py log patterntest], [0], [], [ignore]) + AT_CHECK([grep -q 'I<3OVS' `pwd`/log]) AT_CLEANUP]) VLOG_SET_AND_LIST_PYN([Python2], [$HAVE_PYTHON], [$PYTHON]) @@ -499,7 +503,7 @@ m4_define([VLOG_RFC5424_PYN], ]) AT_CHECK([$3 $srcdir/test-unixctl.py --log-file=`pwd`/log --pidfile \ --vFACILITY:daemon --detach]) +-vFACILITY:daemon --detach], [0], [], [ignore]) AT_CHECK([ovs-appctl -t test-unixctl.py vlog/set FACILITY:invalid], [0], [Facility invalid is invalid