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 0D086A0032; Wed, 14 Sep 2022 09:46:23 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE21140151; Wed, 14 Sep 2022 09:46:22 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id C47C140141 for ; Wed, 14 Sep 2022 09:46:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663141580; x=1694677580; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=+e2/DW09WfVlua+hmAfT0Kz9r/WylwQYU3bb4X0KL3M=; b=U7h/OQ7KEtX81K0hBzEXX91utxBmckFhCm5z46aSRK7bu6EAwnyIdun0 yN3XYtsnHsqfBScydAftjTHBEU70b2j2V89pcxrbjdE9/K8qB9vHVDVQ5 YOqO2FKXcE6/TSDZVMSbWTV0fBEtSb9kTINatjPE1dmD6k9/V7CKR4LuZ FT///eJNSsgdBA0G/AbRM9gOx1YsX/FZLO2V/aUzu9RZ9BGAnH4Diqt0Q eXv75BJeB0cu8mmezSprycjSZCCSMXRVkd1XIecNKWxdyKhpemayd2Qcy raIPFAx1G8vwV3cfcD8jZx8c8NQRLuwBASuKlDgOSekCJ0JPyFXFh0eFK g==; X-IronPort-AV: E=McAfee;i="6500,9779,10469"; a="324613595" X-IronPort-AV: E=Sophos;i="5.93,313,1654585200"; d="scan'208";a="324613595" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Sep 2022 00:46:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,313,1654585200"; d="scan'208";a="647284784" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga008.jf.intel.com with ESMTP; 14 Sep 2022 00:46:19 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 14 Sep 2022 00:46:18 -0700 Received: from orsmsx607.amr.corp.intel.com (10.22.229.20) by ORSMSX607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 14 Sep 2022 00:46:18 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx607.amr.corp.intel.com (10.22.229.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Wed, 14 Sep 2022 00:46:18 -0700 Received: from NAM12-MW2-obe.outbound.protection.outlook.com (104.47.66.48) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 14 Sep 2022 00:46:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OpAXAxR+RPc0I2YrvNZdWUswS6OYWb9TWRapSjLGgyu5VMmHnNyMQ0IbTinyvhZ3GMzB8kIXsHZzRNzhNWqCQo8V4bYM+DdN5sEGbZWr4f1M9+kKz+S2hVAPN6t2rv3yK66TbzThx4wKOVGEZdqCcQIyACPqX4Wor8qCG3rKCZawFPQBpKB1g1Z1k4INfn7lPWU3ZrVm6D78doP/WSOUlgCSo1bTkciwDjaGtTdJ7M+RgaoLYfSFyzwh/1cRXo3qRPPnC7W79edp+4RX95f1j8csu9Ap8t7UlRQRelG+NFtGrub4gzQOoPVfkB2vud24wppES4vQbPd+9jmgyMoMdw== 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=7l8YUvyq4Tqv3yAN5qn4q4+Nh6VXyOs/ycDBjjDkm2U=; b=bROnh+cIZwbpzxNOZ5ICvzzqJYb8gcXxI0MxobQWB6zyct0lrFSegKGAK6cUIqnoLhujpMivoaUzi0eoXHY/FSBx62Iu42R/NH3a8yC2HJIYWoi7lYAM8mQ93yd/TySWTh6mtSb+ZacL9hQerlHWHtDUCWxE/Bk5hR8l+Nkz6RDAgNmu6hxAoFlE2Z7747zCkVS9ymbNlYmTJ0joF7vu23eg8+2UZo88R772JYcwtTnfCoXcYULWVwe3FJPvOCCXf/eSWQLA8OVQEEI4pfOQQsOh44zPkMNpSBE5gZxGOZKaWZC41GRh5fDomCndRAq7w69InEnazxarG8gxoarXoQ== 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 MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) by SA1PR11MB6992.namprd11.prod.outlook.com (2603:10b6:806:2b6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5612.22; Wed, 14 Sep 2022 07:46:17 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::13c:8120:d994:16d2]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::13c:8120:d994:16d2%6]) with mapi id 15.20.5612.022; Wed, 14 Sep 2022 07:46:17 +0000 Date: Wed, 14 Sep 2022 08:46:10 +0100 From: Bruce Richardson To: Owen Hilyard CC: Juraj =?utf-8?Q?Linke=C5=A1?= , "Thomas Monjalon" , David Marchand , , Honnappa Nagarahalli , "Tu, Lijuan" , dev Subject: Re: [PATCH v4 5/9] dts: add ssh connection extension Message-ID: References: <20220728100044.1318484-1-juraj.linkes@pantheon.tech> <20220729105550.1382664-1-juraj.linkes@pantheon.tech> <20220729105550.1382664-6-juraj.linkes@pantheon.tech> Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: X-ClientProxiedBy: LO4P123CA0502.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1ab::21) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR11MB1629:EE_|SA1PR11MB6992:EE_ X-MS-Office365-Filtering-Correlation-Id: c225e25a-6f6c-4b34-4ba5-08da962534b4 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: yxocW66KWghbPthED/eGUn3nraf6weQOic4e0LVVE7pR8vC9hTV4H1Ol6Dqf6SbelcdaWcVqhm963Uuu+jNZZ0VRpUfoHhhIZPteiCSuAyp7OWz1BiIeLKwZSNZVfTmL4mgvkAADqNW0mfYfV/eyocqjaRwOOrxv59pzLXOGHaf5vLiVoBRXu28My6yGdqQmRcviB2SbhUEHWmlm3XEud6raiStXtfRWNH5gslwBvSOExmhM1+2tOh9qUUzg+E8/Re38Linyqj8vhPzWYT3WtfHyPlA62TriNYQ3M6jgdsa7L8nPaj9ef3CxePdH0Pw6yj0Rb2V0GTTcYrd5z80M8XTUo82EJeW5Z8cuObTlhX0NFrZv77c7JdrTK0ee8G1MUlAhVb+BGLnZNUQ0Wz3U3WJPGphB/Y5syufrxiEPRjEDlt+zQ38fdGg3z31c92jcFp/dxBlLKltOQC8j7X4bpCkeaAU6elftp8RFtYtueYIKZjwlt5bYjrKaM1elOHvWYtdiHaScGjWq1MSca6Q7T6bECkF2CVXi4/mfR720+EoiWLs7Rda99xGKK0CFSI7dBDnjiyLYalL1kHgvVhOiuwKd/wtxWpdbEvJ89kpCaj+cKfRZvEneb24+EQe88e/1uBq1dHwOnvv9Zv0nmk3WuvWE+YOm4pMo1zme3N3OHD2YP4gp9jQZUDdUpEIDNHGPYSRgT4wUfejUe4noOZVvrg== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1629.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(39860400002)(136003)(366004)(396003)(376002)(346002)(451199015)(6506007)(6666004)(66476007)(66556008)(54906003)(2906002)(4326008)(41300700001)(8936002)(8676002)(6916009)(82960400001)(38100700002)(26005)(6512007)(6486002)(86362001)(5660300002)(66946007)(44832011)(478600001)(83380400001)(316002)(186003); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?dVdETjB2ZHpZM0RWUlJJRFowYWJaTEI2NWlzUkdzVGlLU3NXTFFJVEhEOSsv?= =?utf-8?B?bHFUVk54QlYyZTYvVHFWa3VtcnNzbERpc09yTjlEZW44eHdMS0FZeFBkVHBE?= =?utf-8?B?TWhXYWtqMTQ3akRUR05STy95RGdNTmhCRWhIZ3dNdUQrM0E3Wkw1VjYyT2RO?= =?utf-8?B?THJ5U3duYk0zRUIyNU5lZnZ4ZWVSVHhpRUVxMktkWUhlWU94RHlSL1d2SUNv?= =?utf-8?B?b01WNmROMGhrVGFXYVZFUU14dkwzd00rRzhRVmt2cEFySU1ScFpvckhFSDkz?= =?utf-8?B?ZHg4aHlRMlB3NnprS0xYWlE1cVJlM3l1YnBsa282Q3lhb2piS2Y4UGs1anhs?= =?utf-8?B?b2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ekEra0J6SWdR?= =?utf-8?B?eUE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: c225e25a-6f6c-4b34-4ba5-08da962534b4 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 14 Sep 2022 07:46:17.1346 (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: fyZq2HuWRCO5zc4Zav9dKqhz2/XKoFzhkaVv+JJV508AecfTr6ZL+eLvwziOxeh1P24G0qf6SDMmUihMdrbDt6f6rBNccgY80kPmFenHKh8= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB6992 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 Tue, Sep 13, 2022 at 01:32:33PM -0400, Owen Hilyard wrote: > On Fri, Jul 29, 2022 at 10:55:46AM +0000, Juraj Linkeš wrote: > > The class adds logging and history records to existing pexpect > methods. > > > > Signed-off-by: Owen Hilyard <[1]ohilyard@iol.unh.edu> > > Signed-off-by: Juraj Linkeš > > --- > > dts/framework/ssh_connection.py | 70 > +++++++++++++++++++++++++++++++++ > > 1 file changed, 70 insertions(+) > > create mode 100644 dts/framework/ssh_connection.py > > > > One comment inline below. > > /Bruce > > Two questions on this function: > > * Is the getattr() check not equivalent to "if self.logger:"? > > It is. I missed it when looking over this code. I know that this close > function can run in a context where it loses the ability to make system > calls (an exit hook), but that doesn't matter for this as far as I > know. > > * Why the check for a non-none logger in this function, when other > > functions above always seem to call the logger directly without > checking? > > "close" can be called before "init_log" if the program crashes early > enough, so this is avoiding calling a function on a null object. No > other function can have that issue because by the time control is > returned to the user the logger is properly initalized. This is > especially important because an early failure in the community lab will > only be able to use logs to figure out what happened. > I'm a little confused by that explanation - can you perhaps clarify? This close function in part of an class, and the logger member is assigned its value in the constructor for that class, so how is it possible to call obj.close() before obj has been constructed?