From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 49A2CA00E6 for ; Fri, 9 Aug 2019 14:51:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0B0612082; Fri, 9 Aug 2019 14:51:23 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com [67.231.148.174]) by dpdk.org (Postfix) with ESMTP id A8DFB137C for ; Fri, 9 Aug 2019 14:51:21 +0200 (CEST) Received: from pps.filterd (m0045849.ppops.net [127.0.0.1]) by mx0a-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x79CeYgU024526 for ; Fri, 9 Aug 2019 05:51:20 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=from : to : cc : subject : date : message-id : mime-version : content-type; s=pfpt0818; bh=dJCyWiRyYgFhwdp2LWXyHrm+tBFYegJRw55GIlCr4pA=; b=nGEzR/U/fHleNCC/CafyPFEHB1Hmzrkp406dbH2FzcwYgNMTW418TueWSR7sTKhxNNsl KezsVHCUtlSZspqm9GI4FRSGykU0+jGyV2HctjkilatJlsCWYcY5xIIEbHqbQX62yGKi 4GWgxtCrxZOXVCxLe187EId9FR91NGxBHcxEVmUCKoTj6FdukQsxhA/ghXkOMkpToc4a /u7LUXZ5kGmLAshuG0+tdh5pq1hjN/Pzm7lGg21B+QuoCm/CBa/Rj3OCZo6GpQZqNVdm jxrnfHi/dM/GnWeUxAYDUXLfn6xJeb+cRtSQBUh5lTLlWgzQHepJuHNz7YSRUtcPWrAC 8A== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0a-0016f401.pphosted.com with ESMTP id 2u8cqje4mc-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Fri, 09 Aug 2019 05:51:20 -0700 Received: from SC-EXCH01.marvell.com (10.93.176.81) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Fri, 9 Aug 2019 05:51:19 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH01.marvell.com (10.93.176.81) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Fri, 9 Aug 2019 05:51:19 -0700 Received: from phanendra-system.marvell.com (unknown [10.28.11.20]) by maili.marvell.com (Postfix) with ESMTP id A983B3F7043; Fri, 9 Aug 2019 05:51:17 -0700 (PDT) From: To: CC: , , Phanendra Vukkisala Date: Fri, 9 Aug 2019 18:21:11 +0530 Message-ID: <1565355071-16059-1-git-send-email-pvukkisala@marvell.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:5.22.84,1.0.8 definitions=2019-08-09_03:2019-08-09,2019-08-09 signatures=0 Subject: [dts] [PATCH] IXIA: Exit on failure of clear/take port ownership X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org Sender: "dts" From: Phanendra Vukkisala Signed-off-by: Phanendra Vukkisala --- framework/etgen.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/etgen.py b/framework/etgen.py index 212b9c2..a47d8cd 100644 --- a/framework/etgen.py +++ b/framework/etgen.py @@ -427,10 +427,14 @@ class IxiaPacketGenerator(SSHConnection): out = self.send_expect("set chasId [ixGetChassisID %s]" % self.tclServerIP, "% ") self.chasId = int(out.strip()) - self.send_expect("ixClearOwnership [list %s]" % string.join( + out = self.send_expect("ixClearOwnership [list %s]" % string.join( ['[list %d %d %d]' % (self.chasId, item['card'], item['port']) for item in self.ports], ' '), "% ", 10) - self.send_expect("ixTakeOwnership [list %s] force" % string.join( + if out.strip()[-1] != '0': + return False + out = self.send_expect("ixTakeOwnership [list %s] force" % string.join( ['[list %d %d %d]' % (self.chasId, item['card'], item['port']) for item in self.ports], ' '), "% ", 10) + if out.strip()[-1] != '0': + return False return True -- 1.7.9.5