From patchwork Wed Jul 6 12:38:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Boca X-Patchwork-Id: 645281 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 3rl0jt2Fthz9sds for ; Wed, 6 Jul 2016 22:41:22 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 0971A109F9; Wed, 6 Jul 2016 05:41:21 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e4.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 2BA00109FB for ; Wed, 6 Jul 2016 05:41:19 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id AE86F1E02CA for ; Wed, 6 Jul 2016 06:41:18 -0600 (MDT) X-ASG-Debug-ID: 1467808877-09eadd1b181063b0001-byXFYA Received: from mx3-pf3.cudamail.com ([192.168.14.3]) by bar5.cudamail.com with ESMTP id ezT12txlXXkSPJ5l (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 06 Jul 2016 06:41:17 -0600 (MDT) X-Barracuda-Envelope-From: pboca@cloudbasesolutions.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.14.3 Received: from unknown (HELO cbssmtp1.cloudbase.local) (91.232.152.5) by mx3-pf3.cudamail.com with SMTP; 6 Jul 2016 12:41:16 -0000 Received-SPF: pass (mx3-pf3.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 525A2405FE for ; Wed, 6 Jul 2016 15:41:15 +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 RlD6_cmhJm6B for ; Wed, 6 Jul 2016 15:40:54 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id A5DDF40264 for ; Wed, 6 Jul 2016 15:38:31 +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; Wed, 6 Jul 2016 14:38:31 +0200 X-CudaMail-Envelope-Sender: pboca@cloudbasesolutions.com From: Paul Boca To: "dev@openvswitch.org" X-CudaMail-MID: CM-V3-705008138 X-CudaMail-DTE: 070616 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [PATCH V6 14/17] python tests: Ignore stderr output X-ASG-Orig-Subj: [##CM-V3-705008138##][PATCH V6 14/17] python tests: Ignore stderr output Thread-Index: AQHR14NNhkhU0nJlfUGV4wfpidalpg== Date: Wed, 6 Jul 2016 12:38:30 +0000 Message-ID: <1467808691-17280-15-git-send-email-pboca@cloudbasesolutions.com> References: <1467808691-17280-1-git-send-email-pboca@cloudbasesolutions.com> In-Reply-To: <1467808691-17280-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.36638 p=-0.371429 Source Normal X-MessageSniffer-Rules: 0-0-0-8085-c X-Barracuda-Connect: UNKNOWN[192.168.14.3] X-Barracuda-Start-Time: 1467808877 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.31058 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 V6 14/17] 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 V4: No changes V5: No changes V6: Redirect stderr to /dev/null and ignore it in AT_CHECK command instead of redirecting it to a file. The detailed explanation for this can be found in commit bcbc886ee7fc5725afac7c8cfc56fc3b595b91fb. Added same modification for VLOG_CLOSE_PYN in order to enable the tests that uses it. --- tests/unixctl-py.at | 3 ++- tests/vlog.at | 10 ++++++---- 2 files changed, 8 insertions(+), 5 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..3a3d435 100644 --- a/tests/vlog.at +++ b/tests/vlog.at @@ -192,7 +192,7 @@ 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 @@ -319,7 +319,8 @@ m4_define([VLOG_CLOSE_PYN], AT_CAPTURE_FILE([log]) AT_CAPTURE_FILE([log.old]) - 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 2>/dev/null], + [0], [], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py log message]) AT_CHECK([APPCTL -t test-unixctl.py log message2]) @@ -403,7 +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 2>/dev/null], [0], [], [ignore]) AT_CHECK([APPCTL -t test-unixctl.py vlog/list], [0], [dnl console syslog file @@ -499,7 +501,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