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 7438544039; Wed, 15 May 2024 21:14:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 416F24025C; Wed, 15 May 2024 21:14:04 +0200 (CEST) Received: from mail-pg1-f169.google.com (mail-pg1-f169.google.com [209.85.215.169]) by mails.dpdk.org (Postfix) with ESMTP id 975054021D for ; Wed, 15 May 2024 21:14:02 +0200 (CEST) Received: by mail-pg1-f169.google.com with SMTP id 41be03b00d2f7-6123726725eso5795071a12.3 for ; Wed, 15 May 2024 12:14:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=iol.unh.edu; s=unh-iol; t=1715800442; x=1716405242; darn=dpdk.org; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=AA811zSsIK4PI+4eVXz31FYJX6TYfjo0n5A5cyC+XPo=; b=LYnK8Vyytux+kP2fNDttDM2XQMFmyA3sjeRsWTNVPoW23+uFGZVSOzzTeL4j2ArThQ OD3/FU7VsCdUVyYmK8mFE48w/FYYe95mIfFOGV0Wm49Rek4DVhbrdgGvw4r4jFqVkuDe 9TGRuNPT/UGDpcFaRuqsWMdlB0mEbhzJ8cZdo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1715800442; x=1716405242; h=content-transfer-encoding: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=AA811zSsIK4PI+4eVXz31FYJX6TYfjo0n5A5cyC+XPo=; b=LVagkxWUigcnWwQzblk2LJUjV47S+z1aJTtsUkEc7cIqC69/Y0SkhJWjypPtVhLu4d XHKSShGMRFnt7VUwd6GKEA5B1UgIJZ+1wu7iIWDKjNnSzSv5LXBO0y4FcQNeS1OikBC1 ZbMsRDS4GYSZyyVacCvAhHW0e0JwnS5hFpRCAJ8w0T0ES3pzjP9NHhNyRkFEq/QcOvPI e/QOk8/nZoNm+uRcTbAIZ3cqsGJHWHIhj/r1u3zESPLUld93lMwPDkypzNw/iEJvvPSu aNrfkHI4VRd8Hwavlr1KKeKpWrPw1e1sP5UkDYHK/izE2cX4rMmI4DbDNCRvv1A103f4 iGqQ== X-Forwarded-Encrypted: i=1; AJvYcCVHq/oUgUXQywrnlilfEmGlYZYJpVjyHxXuZ4agduNDWUMXja7uszOgYBTLs7kL5//viqNWO6qCw9k46CQ= X-Gm-Message-State: AOJu0YyTu59/EtZASa4Y56quoQVhOVWV4r5MPXJhclTp0TNbyyaEs3tm 6ZsVcwyuLeE149OH3AOV+WSLN2dPNDDW/hviv37fHwV+RkryI7XA8t88YgwvgpCH1QU5Ru/evL1 gLuP7Zdo0mPjexy+9KxrCPF+CFjAQQoU23/pZ7Q== X-Google-Smtp-Source: AGHT+IFlL/BOUyRBHN/Lo1CpR4v3Cjkl17K36vd05UQHkvjxaV4kK3ybEEJFol259zSBn2jdeB5G973EN827+VgtZFw= X-Received: by 2002:a17:90a:d48e:b0:2b2:7e94:c5fa with SMTP id 98e67ed59e1d1-2b6cc144814mr15275974a91.5.1715800441813; Wed, 15 May 2024 12:14:01 -0700 (PDT) MIME-Version: 1.0 References: <20240312172558.11844-1-jspewock@iol.unh.edu> <20240501161623.26672-1-jspewock@iol.unh.edu> <20240501161623.26672-2-jspewock@iol.unh.edu> In-Reply-To: From: Jeremy Spewock Date: Wed, 15 May 2024 15:13:50 -0400 Message-ID: Subject: Re: [PATCH v2 1/3] dts: Improve output gathering in interactive shells To: =?UTF-8?Q?Juraj_Linke=C5=A1?= Cc: Luca.Vizzarro@arm.com, wathsala.vithanage@arm.com, yoan.picchi@foss.arm.com, paul.szczepanek@arm.com, probb@iol.unh.edu, thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, dev@dpdk.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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, May 13, 2024 at 10:58=E2=80=AFAM Juraj Linke=C5=A1 wrote: > > Other than the one minor documentation nitpick, > Reviewed-by: Juraj Linke=C5=A1 > > > > diff --git a/dts/framework/remote_session/interactive_shell.py b/dts/fr= amework/remote_session/interactive_shell.py > > > @@ -124,20 +130,34 @@ def send_command(self, command: str, prompt: str = | None =3D None) -> str: > > - self._stdin.write(f"{command}{self._command_extra_chars}\n") > > - self._stdin.flush() > > out: str =3D "" > > - for line in self._stdout: > > - out +=3D line > > - if prompt in line and not line.rstrip().endswith( > > - command.rstrip() > > - ): # ignore line that sent command > > - break > > - self._logger.debug(f"Got output: {out}") > > + try: > > + self._stdin.write(f"{command}{self._command_extra_chars}\n= ") > > + self._stdin.flush() > > + for line in self._stdout: > > + out +=3D line > > + if line.rstrip().endswith(prompt): > > + break > > We should document the (currently) hidden assumption of us needing to > use the extra command chars to force another prompt in the docstring. > This is a good point, it is mostly internal knowledge currently so it would be good to explain this more. I'll add it to the comment documenting what the class var is for. > > 2.44.0 > >