From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id D64FC41CC1; Fri, 17 Feb 2023 18:44:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BF83040F18; Fri, 17 Feb 2023 18:44:38 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 32ED340EE3 for ; Fri, 17 Feb 2023 18:44:37 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676655877; x=1708191877; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=aaX8H1KFtbb+8XS/fxfetGJpEYK3diz4e6OAasorWxY=; b=Bs5eTR1tzILnqGdhDLzUeeFYbB9x1fbkX0flZ39gPpU/LQp04PpwNadQ IGXXENGFAFCVzijBM8gYxm1fT+3VEAStUJyK8OGToVKcQRrL6wDP2Bos2 47iQvbBZ+dX+1CS5TVzuMS/5q/UFXJxMvm1OXpNinnjyfAptgKaur6D4d 1l6rlohtmF2pRW642tRjvh23AuhJOlqK0fAPOw7yH8WjTR6Vg6IoHLUxg JYlKkXrBglzTOnxxp4QOcaOI9A/exyFH+Q7p4JhmA49dCVbLoP2TMtu6V L+To1fQ0E3W+Y/E94X8bdcHLeFASfimNHX3y1PUvIwT7qwr1B1rKiczOH A==; X-IronPort-AV: E=McAfee;i="6500,9779,10624"; a="333401299" X-IronPort-AV: E=Sophos;i="5.97,306,1669104000"; d="scan'208";a="333401299" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2023 09:44:36 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10624"; a="844650147" X-IronPort-AV: E=Sophos;i="5.97,306,1669104000"; d="scan'208";a="844650147" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga005.jf.intel.com with ESMTP; 17 Feb 2023 09:44:35 -0800 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Fri, 17 Feb 2023 09:44:33 -0800 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16 via Frontend Transport; Fri, 17 Feb 2023 09:44:32 -0800 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (104.47.57.170) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Fri, 17 Feb 2023 09:44:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QSUsnZIe5R6bBHxIHh2/mnavpYtLuYD6BGv5cdp/5arRAeBVa8+ytGVarzKAzyDBc5DC7DzJ1xU+x0izc5tnTh7MOsdNspytOiVAdaiRAcyZry6LXBN7Y1ude5eZKGpRlQYY/iTtofZY2pTRyeFOAihntB0fQE8bv6mlWz/8SSMxV1Ji0PL9ILl1eLxrgfidcbkBTYRLVEVldIRyxFrE4OobOX+smS1IAsUq9efRJxHtivHdsoogtMW5JQRDSgpfiNoMaYUNXv0J94rWTAaYPpVjK9ak+f+NabCLCq3vdvhc+KYUAH1LBg3AZz7hBmPLmD3ZrQO7fQ+n8Hgx1LnTEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=r1f/lV92nUf+E2KUOEcf2Xzu3XUVAoXoibKSQSzkMJc=; b=VbL00quS7QcR5s1eHe/NCF4IPRza0C5lKdIokR9/H9Je/zjsDsxvJHvvlBKC3TlkYmKAJSRao/YkifS7atj8w0OhbhvLG7isY0H77lkKBSg1Q3mAbbE3mbC+N97r/+IRoyaxTzkdhSp8BarHSiJrfmi4KvwHaVDYG5zYvN2EL0Mghx0buqT/NOs7z39QraY4rkfx9R/Npbty+XymLo0W7Vt71k3MGSs4RMqI4/ArN9OJXtO0OTguL2J7wwclczysSQEZ9XYzAZLWW2OQ64RfQ+tcrYdO6UNWQZwMkl8b2VvvMfccGftOAaJcsvYP9j70Y8k6AbUf5JQRTEOnwMLJgQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by IA1PR11MB7174.namprd11.prod.outlook.com (2603:10b6:208:41a::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.13; Fri, 17 Feb 2023 17:44:30 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def%9]) with mapi id 15.20.6111.013; Fri, 17 Feb 2023 17:44:30 +0000 Date: Fri, 17 Feb 2023 17:44:24 +0000 From: Bruce Richardson To: Juraj =?utf-8?Q?Linke=C5=A1?= CC: , , , , , , Subject: Re: [PATCH v4 01/10] dts: add node and os abstractions Message-ID: References: <20230117154906.860916-1-juraj.linkes@pantheon.tech> <20230213152846.284191-1-juraj.linkes@pantheon.tech> <20230213152846.284191-2-juraj.linkes@pantheon.tech> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20230213152846.284191-2-juraj.linkes@pantheon.tech> X-ClientProxiedBy: LNXP265CA0026.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:5c::14) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|IA1PR11MB7174:EE_ X-MS-Office365-Filtering-Correlation-Id: 6f32b853-5978-4531-8113-08db110e9f66 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: pNwydyw44uYKai+kdFJFHKocCRd1yVWsxRuzudawEgf9kEmHOA0CSrD43ooIvhgZeWrR4zrIGmvYhZuJJCJXiigHZS2rjWe2Fd9XXBURju7JDYDl8PGxWmSqbQ03rGuWQbhDAIiiXNJa4K8JycuxBOr0dZMfAUUW2d4En/iqBB3l/Jrr887LtBngouYJwnyn2NGEPC+BalnBbXechQfT+PjT83M/ey0f7i6qMq3BnM4Ajk+YX5zRMIDvEwdBnP3fnGLGCscy2EQu/i7gPdrd55oHHw0iFk9fvxJagveiHOYYUaOvSy62iHuSEgSg16gojtwDdOufGtCGHGxIuaH0nJFiC26uC2XWoyjBcnbUXhktel4veUShe6ZROWLBJbpswAr0IKD+eU9wk4/hKtjxOptAC3WIgimt4Dw8bysUgpE1aqsgj/Y3m3CUqfi13VNA8IYzoRyBzD5vdTXupv4pSKWodezpJM/1Jr6Dx7BlqfdQJI3z4SrZE0DiIreU1Ra8MJJxVeNtJF2VIf1aR0JL/XMpJ/3d2IVVi0+PZWiOG9mBl7hUoPRBGeYsEBFhk6SxgkkWTBgHVKfvXBHZUQgMOhLk+qjO5784/b1M4pjm6MnqKW1PXo3vwCmEY4mDZOoFMBE1dTwwZnd8nEZPcQysDg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230025)(396003)(366004)(346002)(39860400002)(376002)(136003)(451199018)(83380400001)(6486002)(86362001)(186003)(6506007)(26005)(6512007)(6666004)(478600001)(38100700002)(8936002)(44832011)(316002)(2906002)(82960400001)(8676002)(41300700001)(6916009)(4326008)(5660300002)(66946007)(66556008)(66476007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?TEhEUmw4MzQ2VDUrZk9ZNVFFMDZTdlRiUzdwL2YrRzlXQVYxU3A0dmhLc0Fa?= =?utf-8?B?YXNDUGcvUW13VU5FdU1RWWQ2cmZqTGhaYmk0U1BuTVI4TGxvV3lVbHloZmp0?= =?utf-8?B?bGFVUFpsaEl5eXVlN0VsQ0ZoaTZCYks2QjdHZFd5L3lUeWljL0xRcTUvak5w?= =?utf-8?B?M1ozbnhOMEpoblF0RjhzM3pwZG5wZVhvaXovUE1Qa0NpZXE5OFpMeUxURjJN?= =?utf-8?B?TGpWeWlJL2NVR04yUmxoOHZlYUszOVNlTmFaaW0vY2NOSlViRGhUMDFxR2x1?= =?utf-8?B?YURFeEhkdUtUYjNXbmc1ai9jalZhN3pVNjdValFUamN2K0FNV0t2T1hlM0lI?= =?utf-8?B?aVMvMERFbUN0Yld6S3Q4M0F2Z2RlS3BadHBLTWV3amFvQ1dNdnMxQ2pFYXlC?= =?utf-8?B?MWFhb3J1U3ZUWTk4a1FaV1JHQjY4UkVOWUVIUGI2M283dnllNDZHNDVzaFp5?= =?utf-8?B?Sjd4b3FMUFpYbUFRWU9OVHdtVWhvL1RSdVlBejBDMlF4V0ticUVBa3E2TkN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a0h0YkM5QmFEV1Bw?= =?utf-8?B?VlRYVmNpUE5DZklaWkw1N2tDVDNkWVpHTlRsNm4waE1BR2FzUGZra2svMi9G?= =?utf-8?B?M1JnUnF3aFdrL1JOUXZCbXFTTGNaUHIrZmJWZnB3TEo2ODZraEJsNVlhUFRW?= =?utf-8?B?cGw4NWdKN01HcGtWNDNKQ21mTzlkMmU0L2xIRVE0TG5uMEZVY3FvS1grR05I?= =?utf-8?B?NVVuVmpPa3FXYUZpSkV4S3pwWnpKQXhIWDJKWmcvTjNZSTcwN20vYUlwR3Vi?= =?utf-8?B?T0t5VlVwdmF3a0VwV1FWWWdHWWRHR0xUQWVuN1pDdVpLR3NTUFpJcjdmdXlF?= =?utf-8?B?ZGJyNEdmZVlWTWR4SGlDQWJtL3RUZ2g4MDVyQm5WVTJTWUorZENuVjE5RU1w?= =?utf-8?B?bmNCaFIxM3B1ZUR3Y3Q1WEJtUHFYUXRCYXdIUW9TL2ZjZVNBM25PN1kyYzZZ?= =?utf-8?B?WWR6RUszTk5kNDVnOExRbHB4R2dySEFGVFY5UFM5YTZJOFdwUDlqUkZsOGRJ?= =?utf-8?B?OWw4SHZVZ2NPMFZ5dmhEdm9TMktIUVRrZnl1MHo4U0VBSnNPVGgrcFhlblN0?= =?utf-8?B?ekJ5V0VLZDlRSHo1ZXNYeGdjd2JQKzRESDVGS093YUg1N04xZ0oyRHlMTzN5?= =?utf-8?B?SVRQNHVmc0kwc3JCSXFtdlN4a2k0bU1NUzlHZlBkK3pMckprV2tRNnNLeFNI?= =?utf-8?B?TWdEK3FWZ0w4cFloNnhoV0MzZEduT2hTM09BaVRnbHJwa0RSZXBidUsxYVRC?= =?utf-8?B?SVE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6f32b853-5978-4531-8113-08db110e9f66 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 17 Feb 2023 17:44:30.7235 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: undAI9TfosYsqEDMezZU68B9Uh5iqb51LsV2rf5QcRaezDUSc680rpSHq3UsDF8rcX89i1Q6JwiQGgB9O9ib02Pi97u3lb/XiH0ooEyZAes= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB7174 X-OriginatorOrg: intel.com X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Mon, Feb 13, 2023 at 04:28:37PM +0100, Juraj Linkeš wrote: > The abstraction model in DTS is as follows: > Node, defining and implementing methods common to and the base of SUT > (system under test) Node and TG (traffic generator) Node. > Remote Session, defining and implementing methods common to any remote > session implementation, such as SSH Session. > OSSession, defining and implementing methods common to any operating > system/distribution, such as Linux. > > OSSession uses a derived Remote Session and Node in turn uses a derived > OSSession. This split delegates OS-specific and connection-specific code > to specialized classes designed to handle the differences. > > The base classes implement the methods or parts of methods that are > common to all implementations and defines abstract methods that must be > implemented by derived classes. > > Part of the abstractions is the DTS test execution skeleton: > execution setup, build setup and then test execution. > > Signed-off-by: Juraj Linkeš > --- > dts/conf.yaml | 11 +- > dts/framework/config/__init__.py | 73 +++++++- > dts/framework/config/conf_yaml_schema.json | 76 +++++++- > dts/framework/dts.py | 162 ++++++++++++++---- > dts/framework/exception.py | 46 ++++- > dts/framework/logger.py | 24 +-- > dts/framework/remote_session/__init__.py | 30 +++- > dts/framework/remote_session/linux_session.py | 11 ++ > dts/framework/remote_session/os_session.py | 46 +++++ > dts/framework/remote_session/posix_session.py | 12 ++ > .../remote_session/remote/__init__.py | 16 ++ > .../{ => remote}/remote_session.py | 41 +++-- > .../{ => remote}/ssh_session.py | 20 +-- > dts/framework/settings.py | 15 +- > dts/framework/testbed_model/__init__.py | 10 +- > dts/framework/testbed_model/node.py | 104 ++++++++--- > dts/framework/testbed_model/sut_node.py | 13 ++ > 17 files changed, 591 insertions(+), 119 deletions(-) > create mode 100644 dts/framework/remote_session/linux_session.py > create mode 100644 dts/framework/remote_session/os_session.py > create mode 100644 dts/framework/remote_session/posix_session.py > create mode 100644 dts/framework/remote_session/remote/__init__.py > rename dts/framework/remote_session/{ => remote}/remote_session.py (61%) > rename dts/framework/remote_session/{ => remote}/ssh_session.py (91%) > create mode 100644 dts/framework/testbed_model/sut_node.py > > + > +def _exit_dts() -> None: > + """ > + Process all errors and exit with the proper exit code. > + """ > + if errors and dts_logger: > + dts_logger.debug("Summary of errors:") > + for error in errors: > + dts_logger.debug(repr(error)) This is nice to have at the end. However, what I think is a definite niceer-to-have here, is the actual commands which produced the errors. In my case, the summary just reports: 2023/02/17 16:59:59 - dts_runner - DEBUG - ValueError("invalid literal for int() with base 10: '\\x1b[?2004l\\r\\r\\n0'") What is really missing and I had to hunt for, was what command produced the invalid literal. Perhaps that's the responsibility of the error message to include the details, but either way it would be great to get! /Bruce