From patchwork Thu Aug 4 09:38:31 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Paul Boca X-Patchwork-Id: 655714 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 3s4lJG21Yyz9sCy for ; Thu, 4 Aug 2016 19:39:10 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id 72FDC108ED; Thu, 4 Aug 2016 02:39:09 -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 DE683108E3 for ; Thu, 4 Aug 2016 02:39:08 -0700 (PDT) Received: from bar5.cudamail.com (unknown [192.168.21.12]) by mx1e4.cudamail.com (Postfix) with ESMTPS id 71BDE1E045E for ; Thu, 4 Aug 2016 03:39:08 -0600 (MDT) X-ASG-Debug-ID: 1470303547-09eadd5083e9160001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id JTfNroFOHEZMnG2W (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Thu, 04 Aug 2016 03:39:07 -0600 (MDT) X-Barracuda-Envelope-From: pboca@cloudbasesolutions.com X-Barracuda-RBL-Trusted-Forwarder: 192.168.24.1 Received: from unknown (HELO cbssmtp1.cloudbase.local) (91.232.152.5) by mx1-pf1.cudamail.com with SMTP; 4 Aug 2016 09:39:06 -0000 Received-SPF: pass (mx1-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 176A34166C; Thu, 4 Aug 2016 12:39:06 +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 z1PJkagBlOtf; Thu, 4 Aug 2016 12:38:45 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id DB82841651; Thu, 4 Aug 2016 12:38:32 +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, 4 Aug 2016 11:38:32 +0200 X-CudaMail-Envelope-Sender: pboca@cloudbasesolutions.com From: Paul Boca To: Guru Shetty X-CudaMail-MID: CM-E1-803003264 X-CudaMail-DTE: 080416 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [ovs-dev] [PATCH V11 08/17] python tests: Skip python tests on Windows where POSIX pid is used X-ASG-Orig-Subj: [##CM-E1-803003264##]RE: [ovs-dev] [PATCH V11 08/17] python tests: Skip python tests on Windows where POSIX pid is used Thread-Index: AQHR7OWxcLVxjLhjBkqIr8SjLB8kK6A3QjSAgAFLr2A= Date: Thu, 4 Aug 2016 09:38:31 +0000 Message-ID: <508339EC0242094682895ED3EC4EBA312E55B7CE@CBSEX1.cloudbase.local> References: <1470159883-4648-1-git-send-email-pboca@cloudbasesolutions.com> <1470159883-4648-9-git-send-email-pboca@cloudbasesolutions.com> In-Reply-To: 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-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1470303547 X-Barracuda-Encrypted: ECDHE-RSA-AES256-GCM-SHA384 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=BSF_SC0_MISMATCH_TO, HTML_MESSAGE, RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.31743 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- 0.00 BSF_SC0_MISMATCH_TO Envelope rcpt doesn't match header 0.00 HTML_MESSAGE BODY: HTML included in message 0.10 RDNS_NONE Delivered to trusted network by a host with no rDNS X-Content-Filtered-By: Mailman/MimeDel 2.1.16 Cc: "dev@openvswitch.org" Subject: Re: [ovs-dev] [PATCH V11 08/17] python tests: Skip python tests on Windows where POSIX pid is used 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" Hi Guru! Indeed there are some cases where that comment doesn’t apply. Thanks for reporting this, I will update the comments accordingly. Paul From: Guru Shetty [mailto:guru@ovn.org] Sent: Wednesday, August 3, 2016 6:51 PM To: Paul Boca Cc: dev@openvswitch.org Subject: Re: [ovs-dev] [PATCH V11 08/17] python tests: Skip python tests on Windows where POSIX pid is used On 2 August 2016 at 10:45, Paul Boca > wrote: There is a difference between POSIX pid and Windows pid, not all the time are equal. On Windows when a python script is started, a sh command is triggered as the parent for script. So when we try to get the daemon pid with 'echo $!', this will get the pid of sh not of python.exe as expected. Also the 'kill' command expects a POSIX pid, not the Windows pid written by the python daemons in pid file. Signed-off-by: Paul-Daniel Boca > Acked-by: Alin Gabriel Serdean > I applied the patches till here. In this change, the following comment has been added for all the tests that are being skipped. Even those tests for which the comment is not relevant: "Skip this test for Windows, echo $! gives shell pid instead of parent process". So I am skipping this. Please re-look this patch. --- V2: No changes V3: No changes V4: No changes V5: No changes V6: No changes V7: Added comments explaining why the tests are skipped. Enabled back the JSON-RPC tests V8: No changes V9: No changes V10: No changes V11: No changes --- tests/daemon-py.at | 14 ++++++++++++++ 1 file changed, 14 insertions(+) -- 2.7.2.windows.1 _______________________________________________ dev mailing list dev@openvswitch.org http://openvswitch.org/mailman/listinfo/dev diff --git a/tests/daemon-py.at b/tests/daemon-py.at index e59c11d..b1ff4fd 100644 --- a/tests/daemon-py.at +++ b/tests/daemon-py.at @@ -3,6 +3,8 @@ AT_BANNER([daemon unit tests - Python]) m4_define([DAEMON_PYN], [AT_SETUP([daemon - $1]) AT_SKIP_IF([test $2 = no]) + # Skip this test for Windows, echo $! gives shell pid instead of parent process + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_KEYWORDS([python daemon]) AT_CAPTURE_FILE([pid]) AT_CAPTURE_FILE([expected]) @@ -26,6 +28,8 @@ DAEMON_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3]) m4_define([DAEMON_MONITOR_PYN], [AT_SETUP([daemon --monitor - $1]) AT_SKIP_IF([test $2 = no]) + # Skip this test for Windows, echo $! gives shell pid instead of parent process + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([pid]) AT_CAPTURE_FILE([parent]) AT_CAPTURE_FILE([parentpid]) @@ -73,6 +77,8 @@ DAEMON_MONITOR_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3]) m4_define([DAEMON_MONITOR_RESTART_PYN], [AT_SETUP([daemon --monitor restart exit code - $1]) AT_SKIP_IF([test $2 = no]) + # Skip this test for Windows, echo $! gives shell pid instead of parent process + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([pid]) AT_CAPTURE_FILE([parent]) AT_CAPTURE_FILE([parentpid]) @@ -120,6 +126,8 @@ DAEMON_MONITOR_RESTART_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3]) m4_define([DAEMON_DETACH_PYN], [AT_SETUP([daemon --detach - $1]) AT_SKIP_IF([test $2 = no]) + # Skip this test for Windows, echo $! gives shell pid instead of parent process + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([pid]) # Start the daemon and make sure that the pidfile exists immediately. # We don't wait for the pidfile to get created because the daemon is @@ -142,6 +150,8 @@ m4_define([CHECK], m4_define([DAEMON_DETACH_MONITOR_PYN], [AT_SETUP([daemon --detach --monitor - $1]) AT_SKIP_IF([test $2 = no]) + # Skip this test for Windows, echo $! gives shell pid instead of parent process + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([daemon]) AT_CAPTURE_FILE([olddaemon]) AT_CAPTURE_FILE([newdaemon]) @@ -219,6 +229,8 @@ DAEMON_DETACH_MONITOR_ERRORS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3]) m4_define([DAEMON_DETACH_CLOSES_FDS_PYN], [AT_SETUP([daemon --detach closes standard fds - $1]) AT_SKIP_IF([test $2 = no]) + # Skip this test for Windows, echo $! gives shell pid instead of parent process + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([pid]) AT_CAPTURE_FILE([status]) AT_CAPTURE_FILE([stderr]) @@ -243,6 +255,8 @@ DAEMON_DETACH_CLOSES_FDS_PYN([Python3], [$HAVE_PYTHON3], [$PYTHON3]) m4_define([DAEMON_DETACH_MONITOR_CLOSES_FDS_PYN], [AT_SETUP([daemon --detach --monitor closes standard fds - $1]) AT_SKIP_IF([test $2 = no]) + # Skip this test for Windows, echo $! gives shell pid instead of parent process + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([pid]) AT_CAPTURE_FILE([status]) AT_CAPTURE_FILE([stderr])