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 B353043746; Tue, 19 Dec 2023 17:50:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7D82542E11; Tue, 19 Dec 2023 17:50:41 +0100 (CET) Received: from mail-lf1-f49.google.com (mail-lf1-f49.google.com [209.85.167.49]) by mails.dpdk.org (Postfix) with ESMTP id C0AC142DED for ; Tue, 19 Dec 2023 17:50:40 +0100 (CET) Received: by mail-lf1-f49.google.com with SMTP id 2adb3069b0e04-50d176eb382so6437137e87.2 for ; Tue, 19 Dec 2023 08:50:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon.tech; s=google; t=1703004640; x=1703609440; 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=Z3TPrWK3H+Zs71zmaNkwiJThDC6m7s2J0UHUcRv2XZE=; b=GH2dfcEfmKrcteB6VY2vV9Jpv3FbCClVDaMR/0zuJDRgbxNLA89655co/dmyONG+MM VmNVzEfDZnf3v0GH3ti8RnkwucXr6S/Wj0i7qOq0gRRVbn3qq9mutRXGh4qTL1m2huBi alW+nUqUT9WTtc5Zr0INA2WHLoAWP2CZ8Cn1Oxdd71cd9LigTNhLVZ7LM1btt+LVUh0y BpmIz5y8BTuHVhoiO4T441mC+34ySy94AHC4f6CKx6MwXxe793q3FB5XcaApCWFQn6vK sMbnK283+yEyXmEMuQfV1Id7PvnTG6Vvdo4nYk1RMh5LqEK8HFY91Bdym3f0nVTnIBXn NDnw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703004640; x=1703609440; 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=Z3TPrWK3H+Zs71zmaNkwiJThDC6m7s2J0UHUcRv2XZE=; b=pZx3LhsUcN/EC9L/u2Djt+cIP5GZnsrWpFbp/Rb7JGDsFPesPD3TolnnijNNXzSW3e +odBN8hsEi1h39+vct9FVSpy/DEYrScZw95Fbs/2UHFe+/l2ZyY1ZHgB7DrcftZJXtJd AMsAl+LDAeaI8XFGErhVMyox60eFXpmkIGL7WSQJRx6kglMANe/fEk/+npwNLj/wVNYW MIrOfB3B5pgZipTyT2Whq8wqERPU3Dc6wx2f9NymaAbHVyEoBXow5sAhBMq+hDSl2SVi 6UNIz6jSk234kG8tbCBJZNQnW+78ub4hocJ4nHssmOOa8Jott6WLeqHXmsa/tQck4Q/X 3yNg== X-Gm-Message-State: AOJu0YwCTYs9fD9W4UluSuFGffxulDe0NPCVH44JXW+GppD5Kn61eZmZ KbJhFk/lEfcj8slUp8Tfn1dYqrsRPBjxJ33OJHSh/A== X-Google-Smtp-Source: AGHT+IFZMX941aCiiMgu71sisuOwZ1+QCc1c5Mm7nzYPl4GimLIFAueGMUsBW9JeHfyWZR5/0ciH6wRHiqSQRSc6VKM= X-Received: by 2002:ac2:41cb:0:b0:50e:2742:aa6a with SMTP id d11-20020ac241cb000000b0050e2742aa6amr2995605lfi.97.1703004640095; Tue, 19 Dec 2023 08:50:40 -0800 (PST) MIME-Version: 1.0 References: <20231218181221.10057-1-jspewock@iol.unh.edu> <20231218181221.10057-3-jspewock@iol.unh.edu> In-Reply-To: <20231218181221.10057-3-jspewock@iol.unh.edu> From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Tue, 19 Dec 2023 17:50:29 +0100 Message-ID: Subject: Re: [PATCH v4 2/7] dts: allow passing parameters into interactive apps To: jspewock@iol.unh.edu Cc: Honnappa.Nagarahalli@arm.com, thomas@monjalon.net, wathsala.vithanage@arm.com, probb@iol.unh.edu, paul.szczepanek@arm.com, yoan.picchi@foss.arm.com, ferruh.yigit@amd.com, andrew.rybchenko@oktetlabs.ru, 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 We should also update the subject and the body based on our previous discussion. I don't think they properly describe the change, as we're also updating the method's behavior of DPDK apps. On Mon, Dec 18, 2023 at 7:13=E2=80=AFPM wrote: > > From: Jeremy Spewock > > Modified interactive applications to allow for the ability to pass > parameters into the app on start up. Also modified the way EAL > parameters are handled so that the trailing "--" separator is added be > default after all EAL parameters. > > Signed-off-by: Jeremy Spewock > --- > .../remote_session/remote/testpmd_shell.py | 2 +- > dts/framework/testbed_model/sut_node.py | 16 ++++++++++------ > 2 files changed, 11 insertions(+), 7 deletions(-) > > diff --git a/dts/framework/remote_session/remote/testpmd_shell.py b/dts/f= ramework/remote_session/remote/testpmd_shell.py > index b5e4cba9b3..369807a33e 100644 > --- a/dts/framework/remote_session/remote/testpmd_shell.py > +++ b/dts/framework/remote_session/remote/testpmd_shell.py > @@ -62,7 +62,7 @@ class TestPmdShell(InteractiveShell): > > def _start_application(self, get_privileged_command: Callable[[str],= str] | None) -> None: > """See "_start_application" in InteractiveShell.""" > - self._app_args +=3D " -- -i" > + self._app_args +=3D " -i" > super()._start_application(get_privileged_command) > > def start(self, verify: bool =3D True) -> None: > diff --git a/dts/framework/testbed_model/sut_node.py b/dts/framework/test= bed_model/sut_node.py > index 7f75043bd3..9c92232d9e 100644 > --- a/dts/framework/testbed_model/sut_node.py > +++ b/dts/framework/testbed_model/sut_node.py > @@ -361,7 +361,8 @@ def create_interactive_shell( > shell_cls: Type[InteractiveShellType], > timeout: float =3D SETTINGS.timeout, > privileged: bool =3D False, > - eal_parameters: EalParameters | str | None =3D None, > + eal_parameters: EalParameters | None =3D None, > + app_parameters: str =3D "", > ) -> InteractiveShellType: > """Factory method for creating a handler for an interactive sess= ion. > > @@ -376,19 +377,22 @@ def create_interactive_shell( > eal_parameters: List of EAL parameters to use to launch the = app. If this > isn't provided or an empty string is passed, it will def= ault to calling > create_eal_parameters(). > + app_parameters: Additional arguments to pass into the applic= ation on the > + command-line. > Returns: > Instance of the desired interactive application. > """ > - if not eal_parameters: > - eal_parameters =3D self.create_eal_parameters() > - > - # We need to append the build directory for DPDK apps > + # We need to append the build directory and add EAL parameters f= or DPDK apps > if shell_cls.dpdk_app: > + if not eal_parameters: > + eal_parameters =3D self.create_eal_parameters() > + app_parameters =3D f"{eal_parameters} -- {app_parameters}" > + > shell_cls.path =3D self.main_session.join_remote_path( > self.remote_dpdk_build_dir, shell_cls.path > ) > > - return super().create_interactive_shell(shell_cls, timeout, priv= ileged, str(eal_parameters)) > + return super().create_interactive_shell(shell_cls, timeout, priv= ileged, app_parameters) > > def bind_ports_to_driver(self, for_dpdk: bool =3D True) -> None: > """Bind all ports on the SUT to a driver. > -- > 2.43.0 >