From patchwork Fri Jun 3 13:05:54 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Boca X-Patchwork-Id: 629798 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 3rLkr23h4vz9sxR for ; Fri, 3 Jun 2016 23:06:26 +1000 (AEST) Received: from archives.nicira.com (localhost [127.0.0.1]) by archives.nicira.com (Postfix) with ESMTP id B184010989; Fri, 3 Jun 2016 06:06:24 -0700 (PDT) X-Original-To: dev@openvswitch.org Delivered-To: dev@openvswitch.org Received: from mx1e3.cudamail.com (mx1.cudamail.com [69.90.118.67]) by archives.nicira.com (Postfix) with ESMTPS id 9C12E10988 for ; Fri, 3 Jun 2016 06:06:22 -0700 (PDT) Received: from bar5.cudamail.com (localhost [127.0.0.1]) by mx1e3.cudamail.com (Postfix) with ESMTPS id D13FB420058 for ; Fri, 3 Jun 2016 07:06:21 -0600 (MDT) X-ASG-Debug-ID: 1464959178-09eadd4ab6111260001-byXFYA Received: from mx1-pf1.cudamail.com ([192.168.24.1]) by bar5.cudamail.com with ESMTP id fx5Gaw9RZHZSN6eA (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 03 Jun 2016 07:06:18 -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; 3 Jun 2016 13:06:18 -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 7C225419F0 for ; Fri, 3 Jun 2016 16:06:17 +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 h2iIfmo_rKrC for ; Fri, 3 Jun 2016 16:05:55 +0300 (EEST) Received: from CBSEX1.cloudbase.local (unknown [10.77.78.3]) by cbssmtp1.cloudbase.local (Postfix) with ESMTP id CB0F141C07 for ; Fri, 3 Jun 2016 16:05:55 +0300 (EEST) Received: from CBSEX1.cloudbase.local ([10.77.78.3]) by CBSEX1.cloudbase.local ([10.77.78.3]) with mapi id 14.03.0224.002; Fri, 3 Jun 2016 15:05:55 +0200 X-CudaMail-Envelope-Sender: pboca@cloudbasesolutions.com From: Paul Boca To: "dev@openvswitch.org" X-CudaMail-MID: CM-E1-602014316 X-CudaMail-DTE: 060316 X-CudaMail-Originating-IP: 91.232.152.5 Thread-Topic: [PATCH V3 1/4] tests: Fixed access denied on ovs-vswitchd.log X-ASG-Orig-Subj: [##CM-E1-602014316##][PATCH V3 1/4] tests: Fixed access denied on ovs-vswitchd.log Thread-Index: AQHRvZipHBkMG6RS9kyzqdqOQljyNg== Date: Fri, 3 Jun 2016 13:05:54 +0000 Message-ID: <1464959151-11128-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-Barracuda-Connect: UNKNOWN[192.168.24.1] X-Barracuda-Start-Time: 1464959178 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=RDNS_NONE X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.3.30141 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 1/4] tests: Fixed access denied on ovs-vswitchd.log 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" On Windows trying to overwrite the opened ovs-vswitchd.log fails with access denied. Closing it before trying to overwrite it solves the problem Signed-off-by: Paul-Daniel Boca --- V2: Use same command both for Windows and Linux. Previous version had '.exe' extension at ovs-appctl. --- tests/ofproto-dpif.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/ofproto-dpif.at b/tests/ofproto-dpif.at index bf9cf88..094a699 100644 --- a/tests/ofproto-dpif.at +++ b/tests/ofproto-dpif.at @@ -6923,7 +6923,7 @@ OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log]) AT_CHECK([ovs-vsctl set interface p0 bfd:enable=false]) # check log. OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log]) -AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) +AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && ovs-appctl vlog/close && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) # enable cfm on p0. AT_CHECK([ovs-vsctl set interface p0 cfm_mpid=10]) @@ -6933,7 +6933,7 @@ OVS_WAIT_UNTIL([grep "monitor thread created" ovs-vswitchd.log]) AT_CHECK([ovs-vsctl remove interface p0 cfm_mpid 10]) # check log. OVS_WAIT_UNTIL([grep "monitor thread terminated" ovs-vswitchd.log]) -AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) + AT_CHECK([sed -e '/^.*ofproto_dpif_monitor.*$/d' < ovs-vswitchd.log > tmp && ovs-appctl vlog/close && mv tmp ovs-vswitchd.log && ovs-appctl vlog/reopen]) # enable both bfd and cfm on p0. AT_CHECK([ovs-vsctl set interface p0 bfd:enable=true cfm_mpid=10])