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 5306044111; Thu, 30 May 2024 17:47:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 18FC14064A; Thu, 30 May 2024 17:47:58 +0200 (CEST) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by mails.dpdk.org (Postfix) with ESMTP id D2543402DE for ; Thu, 30 May 2024 17:47:55 +0200 (CEST) Received: by mail-ej1-f42.google.com with SMTP id a640c23a62f3a-a635a74e031so128204666b.0 for ; Thu, 30 May 2024 08:47:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1717084075; x=1717688875; darn=dpdk.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=uLxx2IfnvbKTtfE9EaXHESgB2iTO8EpU4RaiMpbwPDE=; b=WJfRWP6SBWf9r2hTDpfbxkq7MP0Hh7toaJYdZeF+f/wbo6dW6gvtwpQsIBmcavdeVx Iv2CbD5XhN41VT0OUPR6he7vGVr9O6UWMW+YVPXK/EKiwLYAtiefJVOz5PhVIFbYNGk+ JBSrPZ+QDezwWe50PKJ5Klpio7PmhHVJv3Wp7xQ7uJaldSMNzXe5kD9k8Abhek3aM5ig W0VAKpMxYM/WPEZwnUecpb5X03vIUlm2QVOIaAJhaCezRukTn3PFyPw3vmU2fWuzEiKT iLWwUfPam6H6VwLXH8rDOiKsRlXOf4ifkdaLuUa7Ak3WzwlJVR71lT24kL6gZ1w/aPXK 3V4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1717084075; x=1717688875; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=uLxx2IfnvbKTtfE9EaXHESgB2iTO8EpU4RaiMpbwPDE=; b=jBmGVs47fUWiioY7vIl3GpnWJa3hLjBbMkr3lDmw9N8B7964VpJAQx1fclq0Fc4Pki MhkUq3F3NGUMgoB4d3J1uxb6e3/R3thYX3Zw/PV6TGfh23bGC01wTOpMtfb5ecyioCmu R00qszU/Guot+MMyavnwsawo2D6IzxcQXL0V20jWqLmmZfGE5i5uXSaGycQY51eXFaGv 5vgVJGdj9WW2kJykYMkqxN6MloNoK/UMlan6UM8eAAchKY9vOMvFAMS3EvQvqGeTN+c4 xXcCbfPQUvkxYqjE5/NNxeo0NzAtSWdZv37spb7Tlos5mlk7B2gSz5OHJeoxODWtDNZ7 3jfw== X-Gm-Message-State: AOJu0YwzZTGeBwa2b5pu8/w8HqEn8Keil/NQveTkP1/+ShZYUURSDJMc LsMqoh9kZOt+rNE5L7dOdTaZpTlKNiT26XOdxRfqMxgVelGBf7nSAKJJa3yhllY6tA9q5rapicF SjKU7glnpUF1P6HrOUI9gco8mrOM1tyDryTN5FA== X-Google-Smtp-Source: AGHT+IEwD6z0s4f9320zaNCwno4YTtcuBIplMovokVimnDXrBYG/Pmy9X8oHchBG17O/2NvetgADrt7tra6PpIJCD60= X-Received: by 2002:a17:906:f288:b0:a5a:1b60:7c9a with SMTP id a640c23a62f3a-a65e923ee5bmr248471066b.71.1717084075404; Thu, 30 May 2024 08:47:55 -0700 (PDT) MIME-Version: 1.0 References: <20240122182611.1904974-1-luca.vizzarro@arm.com> <20240514121023.1957025-1-luca.vizzarro@arm.com> <20240514121023.1957025-4-luca.vizzarro@arm.com> In-Reply-To: <20240514121023.1957025-4-luca.vizzarro@arm.com> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Thu, 30 May 2024 17:47:43 +0200 Message-ID: Subject: Re: [PATCH v5 3/3] dts: store stderr in RemoteCommandExecutionError To: Luca Vizzarro Cc: dev@dpdk.org, Jeremy Spewock , Paul Szczepanek Content-Type: text/plain; charset="UTF-8" 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 > diff --git a/dts/framework/exception.py b/dts/framework/exception.py > index cce1e0231a..50724acdf2 100644 > --- a/dts/framework/exception.py > +++ b/dts/framework/exception.py > @@ -2,6 +2,7 @@ > # Copyright(c) 2010-2014 Intel Corporation > # Copyright(c) 2022-2023 PANTHEON.tech s.r.o. > # Copyright(c) 2022-2023 University of New Hampshire > +# Copyright(c) 2024 Arm Limited > > """DTS exceptions. > > @@ -129,21 +130,27 @@ class RemoteCommandExecutionError(DTSError): > severity: ClassVar[ErrorSeverity] = ErrorSeverity.REMOTE_CMD_EXEC_ERR > #: The executed command. > command: str > + _command_stderr: str > _command_return_code: int > > - def __init__(self, command: str, command_return_code: int): > + def __init__(self, command: str, command_return_code: int, command_stderr: str): I wanted to change the order here as well to command, command_stderr and command_return_code last. The API change doesn't matter as DTS is still experimental > """Define the meaning of the first two arguments. > > Args: > command: The executed command. > command_return_code: The return code of the executed command. > + command_stderr: The stderr of the executed command. And here. > """ > self.command = command > self._command_return_code = command_return_code > + self._command_stderr = command_stderr And here. > > def __str__(self) -> str: > - """Include both the command and return code in the string representation.""" > - return f"Command {self.command} returned a non-zero exit code: {self._command_return_code}" > + """Include the command, its return code and stderr in the string representation.""" > + return ( > + f"Command '{self.command}' returned a non-zero exit code: " > + f"{self._command_return_code}\nStderr: {self._command_stderr}" > + ) > > > class InteractiveCommandExecutionError(DTSError):