From patchwork Fri Jul 15 14:21:26 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Boca X-Patchwork-Id: 648848 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 3rrZZN4Nr0z9s8d for ; Sat, 16 Jul 2016 00:24:12 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id D84D822C3B1; Fri, 15 Jul 2016 07:24:11 -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 748A822C39E for ; Fri, 15 Jul 2016 07:24:10 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id 0D9D61630F8 for ; Fri, 15 Jul 2016 08:24:10 -0600 (MDT) X-ASG-Debug-ID: 1468592647-0b32373da50ba60001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id 2j2B4rGrl10QWvkG (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 15 Jul 2016 08:24:07 -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; 15 Jul 2016 14:24:06 -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 BB068405A1 for ; Fri, 15 Jul 2016 17:24:05 +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 R48bIh5sjmCT for ; Fri, 15 Jul 2016 17:23:45 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id 1E1B74055F for ; Fri, 15 Jul 2016 17:21:28 +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; Fri, 15 Jul 2016 16:21:27 +0200 X-CudaMail-Envelope-Sender: pboca@cloudbasesolutions.com From: Paul Boca To: "dev@openvswitch.org" X-CudaMail-MID: CM-V1-714014602 X-CudaMail-DTE: 071516 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [PATCH V7 14/16] python tests: Ignore stderr output X-ASG-Orig-Subj: [##CM-V1-714014602##][PATCH V7 14/16] python tests: Ignore stderr output Thread-Index: AQHR3qQsEhZH9/ei/0mjt5fKjCDHiA== Date: Fri, 15 Jul 2016 14:21:26 +0000 Message-ID: <1468592469-10160-15-git-send-email-pboca@cloudbasesolutions.com> References: <1468592469-10160-1-git-send-email-pboca@cloudbasesolutions.com> In-Reply-To: <1468592469-10160-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.350494 p=-0.466667 Source Normal X-MessageSniffer-Rules: 0-0-0-8166-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1468592647 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.31284 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 V7 14/16] 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 Acked-by: Alin Gabriel Serdean --- 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. V7: Redirect stderr to /dev/null or add 'ignore' to stderr parameter of AT_CHECK --- tests/unixctl-py.at | 3 ++- tests/vlog.at | 9 +++++---- 2 files changed, 7 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..4907a1b 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,7 @@ 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]) AT_CHECK([APPCTL -t test-unixctl.py log message]) AT_CHECK([APPCTL -t test-unixctl.py log message2]) @@ -403,7 +403,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]) AT_CHECK([APPCTL -t test-unixctl.py vlog/list], [0], [dnl console syslog file @@ -499,7 +500,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