From patchwork Tue Aug 30 12:00:57 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Boca X-Patchwork-Id: 664120 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 3sNnDX2wpNz9s4n for ; Tue, 30 Aug 2016 22:01:32 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id D7A0A10601; Tue, 30 Aug 2016 05:01:29 -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 6543D105ED for ; Tue, 30 Aug 2016 05:01:28 -0700 (PDT) Received: from bar6.cudamail.com (localhost [127.0.0.1]) by mx3v3.cudamail.com (Postfix) with ESMTPS id F0B0D162693 for ; Tue, 30 Aug 2016 06:01:27 -0600 (MDT) X-ASG-Debug-ID: 1472558484-0b32370aed23c30001-byXFYA Received: from mx3-pf1.cudamail.com ([192.168.14.2]) by bar6.cudamail.com with ESMTP id lPu3daWe6e8ufIwf (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Tue, 30 Aug 2016 06:01:24 -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; 30 Aug 2016 12:01:23 -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 19F723FF81 for ; Tue, 30 Aug 2016 15:01:22 +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 BPth6vZaz1Dt for ; Tue, 30 Aug 2016 15:01:01 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id 2579141A18 for ; Tue, 30 Aug 2016 15:00:59 +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; Tue, 30 Aug 2016 14:00:59 +0200 X-CudaMail-Envelope-Sender: pboca@cloudbasesolutions.com From: Paul Boca To: "dev@openvswitch.org" X-CudaMail-MID: CM-V1-829007043 X-CudaMail-DTE: 083016 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [PATCH V2 01/10] python tests: Skip python tests specific to Linux X-ASG-Orig-Subj: [##CM-V1-829007043##][PATCH V2 01/10] python tests: Skip python tests specific to Linux Thread-Index: AQHSArYrg8QsHFa0Q02HVBp0GJxTjA== Date: Tue, 30 Aug 2016 12:00:57 +0000 Message-ID: <1472558417-2016-2-git-send-email-pboca@cloudbasesolutions.com> References: <1472558417-2016-1-git-send-email-pboca@cloudbasesolutions.com> In-Reply-To: <1472558417-2016-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.247104 p=-0.272727 Source Normal X-MessageSniffer-Rules: 0-0-0-8224-c X-Barracuda-Connect: UNKNOWN[192.168.14.2] X-Barracuda-Start-Time: 1472558484 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.32455 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 V2 01/10] python tests: Skip python tests specific to Linux 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" 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. Some tests use undefined switches, on Windows, for `kill` command. Signed-off-by: Paul-Daniel Boca --- V2: Splitted patch in 2 patches. --- tests/daemon-py.at | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tests/daemon-py.at b/tests/daemon-py.at index e59c11d..96dea07 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]) @@ -142,6 +148,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, uses Linux specific kill signal + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([daemon]) AT_CAPTURE_FILE([olddaemon]) AT_CAPTURE_FILE([newdaemon]) @@ -219,6 +227,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, uses Linux specific kill signal + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([pid]) AT_CAPTURE_FILE([status]) AT_CAPTURE_FILE([stderr]) @@ -243,6 +253,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, uses Linux specific kill signal + AT_SKIP_IF([test "$IS_WIN32" = "yes"]) AT_CAPTURE_FILE([pid]) AT_CAPTURE_FILE([status]) AT_CAPTURE_FILE([stderr])