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 4A5B7A0471 for ; Wed, 14 Aug 2019 16:07:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id EF0E61B19; Wed, 14 Aug 2019 16:07:48 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by dpdk.org (Postfix) with ESMTP id CE1401252 for ; Wed, 14 Aug 2019 16:07:46 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id x7EE4qCg002219 for ; Wed, 14 Aug 2019 07:07:46 -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=YCXMuex3WlpONp3Db2rfksly0olanOzwt9luobBaaiY=; b=nnfn+Uf+86sEhLO9U9OgKNjpetnba25qjXO54h6rY8RT81wksh93HL1Ukt/X/G/0dhco nHNq8Tq9aVRXDO4lKxnO/o2UOBGCfm/kQo2xgh4zBKTTLSAjypCHn/MxvkLF4dksI00J McqpgjJaZl/Ezf+NvqLR91IrPSZ6ZdQWAf+Z8uFv3IZGPuOwpEuVRKMRshO3IxpsyAmB jKWHI+0ONlC8AeJ4fZTbXE+rRTocKK0z3G7ERz0Ewzb1tpDPqrgQnnpXVJuYW5LjyW+r nsU18E5TxEom+XLUL84WPN63UqVpHxL0jSsHIcFq8n9/6hXE01YV1RLqYAGJ5eKU7i2j dA== Received: from sc-exch03.marvell.com ([199.233.58.183]) by mx0b-0016f401.pphosted.com with ESMTP id 2ubfabfaba-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-SHA384 bits=256 verify=NOT) for ; Wed, 14 Aug 2019 07:07:45 -0700 Received: from SC-EXCH03.marvell.com (10.93.176.83) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server (TLS) id 15.0.1367.3; Wed, 14 Aug 2019 07:07:44 -0700 Received: from maili.marvell.com (10.93.176.43) by SC-EXCH03.marvell.com (10.93.176.83) with Microsoft SMTP Server id 15.0.1367.3 via Frontend Transport; Wed, 14 Aug 2019 07:07:44 -0700 Received: from phanendra-system.marvell.com (unknown [10.28.11.20]) by maili.marvell.com (Postfix) with ESMTP id B27693F703F; Wed, 14 Aug 2019 07:07:42 -0700 (PDT) From: To: CC: , , Phanendra Vukkisala Date: Wed, 14 Aug 2019 19:37:38 +0530 Message-ID: <1565791658-32718-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-14_05:2019-08-14,2019-08-14 signatures=0 Subject: [dts] [PATCH] pktgen_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/pktgen_ixia.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/framework/pktgen_ixia.py b/framework/pktgen_ixia.py index 2895c6b..1e0675d 100644 --- a/framework/pktgen_ixia.py +++ b/framework/pktgen_ixia.py @@ -601,14 +601,18 @@ class Ixia(SSHConnection): "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