From patchwork Fri May 22 13:23:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70520 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D807DA0350; Fri, 22 May 2020 15:24:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 52D9C1D98F; Fri, 22 May 2020 15:24:22 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 1B3D81D960 for ; Fri, 22 May 2020 15:24:18 +0200 (CEST) IronPort-SDR: hT5o7fUPNkGeh/Re+eWAAbwsBbcB/Lz+o+HbSVQ8YCbpGfYhaOEHLZakpJyWrwJK6CuujNaulA Oae16UfWXt9w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:18 -0700 IronPort-SDR: Y3WjqYGM72qjdhSyucwrUJafdOrVUFTt19Ce2rHrKKrxHFTohVyjzxsTHC8yMPp6RX0pCpLkGt 9IVaIUCEGcQg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283397998" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:17 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney , Nicolas Chautru Date: Fri, 22 May 2020 14:23:12 +0100 Message-Id: <20200522132320.26373-2-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 1/9] app/test-bbdev: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Cc: Nicolas Chautru Signed-off-by: Louise Kilheeney Acked-by: Nic Chautru --- app/test-bbdev/test-bbdev.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/test-bbdev/test-bbdev.py b/app/test-bbdev/test-bbdev.py index 0194be046..50add4580 100755 --- a/app/test-bbdev/test-bbdev.py +++ b/app/test-bbdev/test-bbdev.py @@ -1,5 +1,4 @@ -#!/usr/bin/env python - +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Intel Corporation @@ -12,7 +11,7 @@ from threading import Timer def kill(process): - print "ERROR: Test app timed out" + print ("ERROR: Test app timed out") process.kill() if "RTE_SDK" in os.environ: @@ -66,7 +65,7 @@ def kill(process): args = parser.parse_args() if not os.path.exists(args.testapp_path): - print "No such file: " + args.testapp_path + print ("No such file: " + args.testapp_path) sys.exit(1) params = [args.testapp_path] From patchwork Fri May 22 13:23:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70521 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 97BADA0350; Fri, 22 May 2020 15:24:38 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 85B521D997; Fri, 22 May 2020 15:24:23 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 492DA1D97E for ; Fri, 22 May 2020 15:24:20 +0200 (CEST) IronPort-SDR: 4ikUYzYZv6QQ42ek8s6XMlEVaK+cP8TSP0mzOSP+vaidxxhdnJjiCcH7VG/2m6r34WKJQzMf6q VhS1LqqOZhWA== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:19 -0700 IronPort-SDR: v8PKEa/jXDUGcoqmDy/Iu5xk7JirkCYFv/aJ8+eGpe8pVd8nXK0AXeYxt7Tzjdz8Rzb1jlD90j ioea9X2Q4AKw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283398005" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:18 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney Date: Fri, 22 May 2020 14:23:13 +0100 Message-Id: <20200522132320.26373-3-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 2/9] usertools/dpdk-devbind: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Signed-off-by: Louise Kilheeney --- usertools/dpdk-devbind.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/usertools/dpdk-devbind.py b/usertools/dpdk-devbind.py index 40b4beea4..441301f2d 100755 --- a/usertools/dpdk-devbind.py +++ b/usertools/dpdk-devbind.py @@ -1,9 +1,8 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # -from __future__ import print_function import sys import os import getopt From patchwork Fri May 22 13:23:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70522 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 32EC1A0350; Fri, 22 May 2020 15:24:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 690C31D99A; Fri, 22 May 2020 15:24:25 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id DC5681D97F for ; Fri, 22 May 2020 15:24:20 +0200 (CEST) IronPort-SDR: i7tgZihn6IIq3JykXf5+jAho1Gj6pwZlTujuGznBfSiabjMqTqhYNXq144xKiZX51cKAb8ccIU TpW/WFYhNpMQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:20 -0700 IronPort-SDR: 7AZnU1Dt7gTOU/7fxwO3/SY8eGjqCEkaYJ6jrfPbyj3jxAhmxoWHX2bXAofWMGwMje7UcRf96G MK8CgrFYyNMA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283398010" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:19 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney , Kevin Laatz Date: Fri, 22 May 2020 14:23:14 +0100 Message-Id: <20200522132320.26373-4-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 3/9] usertools/dpdk-telemetry-client: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Cc: Kevin Laatz Signed-off-by: Louise Kilheeney --- usertools/dpdk-telemetry-client.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/usertools/dpdk-telemetry-client.py b/usertools/dpdk-telemetry-client.py index 35edb7cd2..fa599046a 100755 --- a/usertools/dpdk-telemetry-client.py +++ b/usertools/dpdk-telemetry-client.py @@ -1,10 +1,7 @@ -#! /usr/bin/env python +#! /usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -from __future__ import print_function -from __future__ import unicode_literals - import socket import os import sys @@ -18,11 +15,6 @@ GLOBAL_METRICS_REQ = "{\"action\":0,\"command\":\"global_stat_values\",\"data\":null}" DEFAULT_FP = "/var/run/dpdk/default_client" -try: - raw_input # Python 2 -except NameError: - raw_input = input # Python 3 - class Socket: def __init__(self): @@ -49,7 +41,7 @@ def __init__(self): # Creates a client instance def __del__(self): try: if self.unregistered == 0: - self.unregister(); + self.unregister() except: print("Error - Client could not be destroyed") @@ -82,7 +74,7 @@ def requestMetrics(self): # Requests metrics for given client def repeatedlyRequestMetrics(self, sleep_time): # Recursively requests metrics for given client print("\nPlease enter the number of times you'd like to continuously request Metrics:") - n_requests = int(raw_input("\n:")) + n_requests = int(input("\n:")) print("\033[F") #Removes the user input from screen, cleans it up print("\033[K") for i in range(n_requests): @@ -103,7 +95,7 @@ def interactiveMenu(self, sleep_time): # Creates Interactive menu within the scr print("[4] Unregister client") try: - self.choice = int(raw_input("\n:")) + self.choice = int(input("\n:")) print("\033[F") #Removes the user input for screen, cleans it up print("\033[K") if self.choice == 1: From patchwork Fri May 22 13:23:15 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70523 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2FA8DA0350; Fri, 22 May 2020 15:24:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B67841D9A1; Fri, 22 May 2020 15:24:26 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id A381D1D992 for ; Fri, 22 May 2020 15:24:22 +0200 (CEST) IronPort-SDR: LTEfIMqh4fBoMpSSqsP8lVIkWXu0Q2UYTWuoVVST2Z7D88S3IVzt/vA/W2xNP8wKICsO3DAfoo MeUgDG12mdTQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:21 -0700 IronPort-SDR: btimAJYwDDIefDOfOzJD7iVk6ULuFVGtP28pMb/sTOVV2JdsBOL/2pFahQYaovz/9BvzwZ8Yr2 xoU6FB2Qneyw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283398014" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:20 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney , Neil Horman Date: Fri, 22 May 2020 14:23:15 +0100 Message-Id: <20200522132320.26373-5-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 4/9] usertools/dpdk-pmdinfo: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Cc: Neil Horman Signed-off-by: Louise Kilheeney --- usertools/dpdk-pmdinfo.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/usertools/dpdk-pmdinfo.py b/usertools/dpdk-pmdinfo.py index 12f20735e..f5cd077f5 100755 --- a/usertools/dpdk-pmdinfo.py +++ b/usertools/dpdk-pmdinfo.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2016 Neil Horman @@ -7,8 +7,6 @@ # Utility to dump PMD_INFO_STRING support from an object file # # ------------------------------------------------------------------------- -from __future__ import print_function -from __future__ import unicode_literals import json import io import os From patchwork Fri May 22 13:23:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70524 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 98E7CA0350; Fri, 22 May 2020 15:25:04 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 13D0A1D9A9; Fri, 22 May 2020 15:24:28 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 4397D1D995 for ; Fri, 22 May 2020 15:24:23 +0200 (CEST) IronPort-SDR: 5/1v9TZ2ucbq8I+kirBDFpFNVQvQxZEarSlsA5Y/a3L5L85Gq4ZCGV/J3a7zNqEFaoS07k3o0x DMYYKrxXwUJg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:23 -0700 IronPort-SDR: eNUeaJkj65qnU5lPAXVzBO9GrGjIZTAYBkkK6Zn35ikgAwlD8bR8vsemFsx5JPr1Ks1Qqu8fx/ 3D1BEf8ZXsYw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283398019" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:22 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney Date: Fri, 22 May 2020 14:23:16 +0100 Message-Id: <20200522132320.26373-6-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 5/9] usertools/cpu_layout: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Signed-off-by: Louise Kilheeney --- usertools/cpu_layout.py | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/usertools/cpu_layout.py b/usertools/cpu_layout.py index 6f129b1db..89a48cec4 100755 --- a/usertools/cpu_layout.py +++ b/usertools/cpu_layout.py @@ -1,14 +1,9 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Copyright(c) 2017 Cavium, Inc. All rights reserved. -from __future__ import print_function import sys -try: - xrange # Python 2 -except NameError: - xrange = range # Python 3 sockets = [] cores = [] @@ -17,7 +12,7 @@ fd = open("{}/kernel_max".format(base_path)) max_cpus = int(fd.read()) fd.close() -for cpu in xrange(max_cpus + 1): +for cpu in range(max_cpus + 1): try: fd = open("{}/cpu{}/topology/core_id".format(base_path, cpu)) except IOError: From patchwork Fri May 22 13:23:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70525 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 4205AA0350; Fri, 22 May 2020 15:25:14 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6598C1D9AE; Fri, 22 May 2020 15:24:29 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id C92FA1D995 for ; Fri, 22 May 2020 15:24:24 +0200 (CEST) IronPort-SDR: dTby7BgtUrU3IKX6/TQPc1WhAxaDfUymbSyOEbROokdazdOJuJmqQg5laXY1kZ4KS5NDfzBsqm 5/WbDx/3WA/A== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:24 -0700 IronPort-SDR: Qh7SQ1s7+JD/etn/eDurAiNqDDprJ++aUdLeKT/wa/Agg+qxcboukz+ofFcCGBPDCM61IOtQG0 lKKKFxNvVN0A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283398023" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:23 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney , Olivier Matz Date: Fri, 22 May 2020 14:23:17 +0100 Message-Id: <20200522132320.26373-7-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 6/9] app/test-cmdline: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Cc: Olivier Matz Signed-off-by: Louise Kilheeney --- app/test-cmdline/cmdline_test.py | 3 +-- app/test-cmdline/cmdline_test_data.py | 1 + mk/rte.sdktest.mk | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/test-cmdline/cmdline_test.py b/app/test-cmdline/cmdline_test.py index 3a8fac426..0e7c72459 100755 --- a/app/test-cmdline/cmdline_test.py +++ b/app/test-cmdline/cmdline_test.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Script that runs cmdline_test app and feeds keystrokes into it. -from __future__ import print_function import cmdline_test_data import os import pexpect diff --git a/app/test-cmdline/cmdline_test_data.py b/app/test-cmdline/cmdline_test_data.py index 114d2cb6a..2d9b3262a 100644 --- a/app/test-cmdline/cmdline_test_data.py +++ b/app/test-cmdline/cmdline_test_data.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation diff --git a/mk/rte.sdktest.mk b/mk/rte.sdktest.mk index 803018ba3..ad7ef138f 100644 --- a/mk/rte.sdktest.mk +++ b/mk/rte.sdktest.mk @@ -63,7 +63,7 @@ coverage: @mkdir -p $(AUTOTEST_DIR) ; \ cd $(AUTOTEST_DIR) ; \ if [ -f $(RTE_OUTPUT)/app/test ]; then \ - python $(RTE_SDK)/test/cmdline_test/cmdline_test.py \ + python3 $(RTE_SDK)/test/cmdline_test/cmdline_test.py \ $(RTE_OUTPUT)/app/cmdline_test; \ ulimit -S -n 100 ; \ python $(RTE_SDK)/app/test/autotest.py \ From patchwork Fri May 22 13:23:18 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70526 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 43B7DA0350; Fri, 22 May 2020 15:25:23 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 8D02A1D9B4; Fri, 22 May 2020 15:24:30 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 74C7E1D99B for ; Fri, 22 May 2020 15:24:25 +0200 (CEST) IronPort-SDR: rDHC4BeIEjEGM5qRiKaLaZr+U6A6qiB0Gb+gkse1S9s6SxltsCzMWAoE2hNb8fpDSsoC0+1stn 7q20FW/UENgQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:25 -0700 IronPort-SDR: ZffzbIbfYnscwpd6x21O2JajSSczmNNfGC+uJvB5VPFrxMVyR7tkSyhlSfEWp6ZAidrQTIBMSg al8EXCpKgLPA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283398028" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:24 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney Date: Fri, 22 May 2020 14:23:18 +0100 Message-Id: <20200522132320.26373-8-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 7/9] app/test: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Signed-off-by: Louise Kilheeney --- app/test/autotest.py | 3 +-- app/test/autotest_data.py | 1 + app/test/autotest_runner.py | 14 +++++++------- app/test/autotest_test_funcs.py | 1 + mk/rte.sdktest.mk | 4 ++-- 5 files changed, 12 insertions(+), 11 deletions(-) diff --git a/app/test/autotest.py b/app/test/autotest.py index b42f48879..9eef1efbe 100644 --- a/app/test/autotest.py +++ b/app/test/autotest.py @@ -1,9 +1,8 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # Script that uses either test app or qemu controlled by python-pexpect -from __future__ import print_function import autotest_data import autotest_runner import sys diff --git a/app/test/autotest_data.py b/app/test/autotest_data.py index 7b1d01389..e33258026 100644 --- a/app/test/autotest_data.py +++ b/app/test/autotest_data.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation diff --git a/app/test/autotest_runner.py b/app/test/autotest_runner.py index 95e74c760..8c15cbdc2 100644 --- a/app/test/autotest_runner.py +++ b/app/test/autotest_runner.py @@ -1,10 +1,10 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation # The main logic behind running autotests in parallel -from __future__ import print_function -import StringIO +import io import csv from multiprocessing import Pool, Queue import pexpect @@ -78,7 +78,7 @@ def pool_init(queue, result_queue): cmdline = "%s %s" % (cmdline, prefix_cmdline) # prepare logging of init - startuplog = StringIO.StringIO() + startuplog = io.StringIO() # run test app try: @@ -86,7 +86,7 @@ def pool_init(queue, result_queue): print("\n%s %s\n" % ("=" * 20, prefix), file=startuplog) print("\ncmdline=%s" % cmdline, file=startuplog) - pool_child = pexpect.spawn(cmdline, logfile=startuplog) + pool_child = pexpect.spawn(cmdline, logfile=startuplog, encoding='utf-8') # wait for target to boot if not wait_prompt(pool_child): @@ -138,7 +138,7 @@ def run_test(target, test): # create log buffer for each test # in multiprocessing environment, the logging would be # interleaved and will create a mess, hence the buffering - logfile = StringIO.StringIO() + logfile = io.StringIO() pool_child.logfile = logfile # make a note when the test started @@ -210,9 +210,9 @@ def __init__(self, cmdline, target, blacklist, whitelist, n_processes): # parse the binary for available test commands binary = cmdline.split()[0] stripped = 'not stripped' not in \ - subprocess.check_output(['file', binary]) + subprocess.check_output(['file', binary]).decode() if not stripped: - symbols = subprocess.check_output(['nm', binary]).decode('utf-8') + symbols = subprocess.check_output(['nm', binary]).decode() self.avail_cmds = re.findall('test_register_(\w+)', symbols) else: self.avail_cmds = None diff --git a/app/test/autotest_test_funcs.py b/app/test/autotest_test_funcs.py index 26688b713..775dfd1dc 100644 --- a/app/test/autotest_test_funcs.py +++ b/app/test/autotest_test_funcs.py @@ -1,3 +1,4 @@ +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2010-2014 Intel Corporation diff --git a/mk/rte.sdktest.mk b/mk/rte.sdktest.mk index ad7ef138f..81eff0c08 100644 --- a/mk/rte.sdktest.mk +++ b/mk/rte.sdktest.mk @@ -49,7 +49,7 @@ test test-fast test-perf test-drivers test-dump: @mkdir -p $(AUTOTEST_DIR) ; \ cd $(AUTOTEST_DIR) ; \ if [ -f $(RTE_OUTPUT)/app/test ]; then \ - python $(RTE_SDK)/app/test/autotest.py \ + python3 $(RTE_SDK)/app/test/autotest.py \ $(RTE_OUTPUT)/app/test \ $(RTE_TARGET) \ $(BLACKLIST) $(WHITELIST); \ @@ -66,7 +66,7 @@ coverage: python3 $(RTE_SDK)/test/cmdline_test/cmdline_test.py \ $(RTE_OUTPUT)/app/cmdline_test; \ ulimit -S -n 100 ; \ - python $(RTE_SDK)/app/test/autotest.py \ + python3 $(RTE_SDK)/app/test/autotest.py \ $(RTE_OUTPUT)/app/test \ $(RTE_TARGET) \ $(BLACKLIST) $(WHITELIST) ; \ From patchwork Fri May 22 13:23:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70527 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8D58EA0350; Fri, 22 May 2020 15:25:32 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 7B3711D9BB; Fri, 22 May 2020 15:24:31 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id E68FC1D9A4 for ; Fri, 22 May 2020 15:24:26 +0200 (CEST) IronPort-SDR: Qzo0sSNzl1yBWvVF8cS6ZxQdScLzw6lesplfu7pHjoxJYjlGpeARmEQvjdwosuDoFo3G0NJzJl 2eKZpX9b2KKw== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:26 -0700 IronPort-SDR: oOuEyC3mk+BimPLBTkS0I3JINiS7YakzEnUci+tG72zuRiQAjgEMM9uG2K8xjHVsLYYzE4sbi9 MSlPS208o7rQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283398032" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:25 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney , Neil Horman , Ray Kinsella Date: Fri, 22 May 2020 14:23:19 +0100 Message-Id: <20200522132320.26373-9-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 8/9] devtools: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Cc: Neil Horman Cc: Ray Kinsella Signed-off-by: Louise Kilheeney Acked-by: Ray Kinsella --- devtools/update_version_map_abi.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/devtools/update_version_map_abi.py b/devtools/update_version_map_abi.py index 616412a1c..58aa368f9 100755 --- a/devtools/update_version_map_abi.py +++ b/devtools/update_version_map_abi.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019 Intel Corporation @@ -9,7 +9,6 @@ from the devtools/update-abi.sh utility. """ -from __future__ import print_function import argparse import sys import re From patchwork Fri May 22 13:23:20 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Louise Kilheeney X-Patchwork-Id: 70528 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 05C71A0350; Fri, 22 May 2020 15:25:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id DD2011D9C0; Fri, 22 May 2020 15:24:32 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 32C461D9A4 for ; Fri, 22 May 2020 15:24:28 +0200 (CEST) IronPort-SDR: frF6zTLOdbBjMEDvO665solM/nAFrMOyEo9QQjPz0CZPjzh2e/tk3Q2rhaQ522EARGj2W4Mx8c nG5+ZWF8X2eg== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga002.jf.intel.com ([10.7.209.21]) by orsmga104.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 May 2020 06:24:27 -0700 IronPort-SDR: aHNzrA2k0+0eKKDA+nnoIlo//hrW8dk2CvO9e/kwkr9gRZBhX5l/RLbXpWO2MNp4kj9uoUmM3D BjAK0mi5lzQQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,421,1583222400"; d="scan'208";a="283398037" Received: from silpixa00389033.ir.intel.com (HELO silpixa00389033.ger.corp.intel.com) ([10.237.223.171]) by orsmga002.jf.intel.com with ESMTP; 22 May 2020 06:24:26 -0700 From: Louise Kilheeney To: dev@dpdk.org Cc: Louise Kilheeney , Thomas Monjalon Date: Fri, 22 May 2020 14:23:20 +0100 Message-Id: <20200522132320.26373-10-louise.kilheeney@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20200522132320.26373-1-louise.kilheeney@intel.com> References: <20200522132320.26373-1-louise.kilheeney@intel.com> Subject: [dpdk-dev] [PATCH 20.08 9/9] config/arm: support python3 only X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Changed script to explicitly use python3 only. Cc: Thomas Monjalon Signed-off-by: Louise Kilheeney Tested-by: Harman Kalra --- config/arm/armv8_machine.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/arm/armv8_machine.py b/config/arm/armv8_machine.py index 404866d2f..a0e6a8769 100755 --- a/config/arm/armv8_machine.py +++ b/config/arm/armv8_machine.py @@ -1,4 +1,4 @@ -#!/usr/bin/python +#!/usr/bin/python3 # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Cavium, Inc