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 0D2D341D49; Thu, 23 Feb 2023 09:27:20 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2134430DE; Thu, 23 Feb 2023 09:27:19 +0100 (CET) Received: from mail-vs1-f52.google.com (mail-vs1-f52.google.com [209.85.217.52]) by mails.dpdk.org (Postfix) with ESMTP id 282A243081 for ; Thu, 23 Feb 2023 09:27:19 +0100 (CET) Received: by mail-vs1-f52.google.com with SMTP id g12so15658389vsf.12 for ; Thu, 23 Feb 2023 00:27:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=pantheon-tech.20210112.gappssmtp.com; s=20210112; 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=yEBDyramRd2s974Rg1KlDzdNldYNc9tyEqDyXo0RLXU=; b=6XYRIuNhqDAG468f4CGXqzfcWWKs2OKmj9aSaHxgEWn+t0GmgzUjcfHM2L0b0msZ9B HkvGUvVCFmfT+o6uGP1gcgEEka0nOdabBcQrBU4htao+Sx+i4ICIhl/1PBpFvXkzIvso HhpJ4WVyzl1KFb5BhsNvMaNiwI1REuHiHo8RC4Rf2J+dcmRM37ICJ6g1Mv4QUgqhcClu HzaH4JeH2/jj5QEr7xgaSq4CkqjUdYu/tNfr8PLPV4nvBA8KDgRyeTbAHviMFK5L/pRb Fb4LBcySGrsKrDLEnPMZbpYiOZxb+oFWIRFiJUYSWMT6xJR4EttQ7sOzVxzrN5lWlB24 CALA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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=yEBDyramRd2s974Rg1KlDzdNldYNc9tyEqDyXo0RLXU=; b=ImRUZuSa9WSX0sqop1qrqy7lL6n4D4SkJGMFJXCZhgkcUGiFi8zI3fg/ekGSa5Ravi y35Xon9Gva5roBD+hRZuWO1VDOBkXJwu8OGolEsDtg3vgdWHcw0+6eBtoEZNWdmyrvHD jhcztD2FjsRFba92Tf+ugTH0SorSIP/nZ/W+i8uRmQeL+Ccx2TtjA0d9sS5WMXEQWEyr ouyA85Sg67k9lTqx4Fa/CDfDZ3i46Dd3mTFyV3SBOPC3S4yOHxb/hgoTG1GBHcqg7oNX U5Jht1DHMS3zNkWrS/huaZ6Osv8ZT6sojVHVAq6s02Pc4yeyrlU+F1dQBudx/xOJQbdf cusA== X-Gm-Message-State: AO0yUKU9EY+joDkn3mhOWwDmlJtCVXjWihDY7kvvCTfeXPjCB+ijCsAO rkKnVF8wqZYa/PAuB/y7hUbHKW48/+PKN9GnAeJ01Q== X-Google-Smtp-Source: AK7set/swNtqlw4ayHCI2VDhrs5ggxsFf4cRkNddQ5hyQdB16OmhW/+s82M8wufl20BElASTVSfxAWXOZZkMWow4w3Y= X-Received: by 2002:a05:6102:1cb:b0:411:e02a:99f2 with SMTP id s11-20020a05610201cb00b00411e02a99f2mr1900720vsq.82.1677140838449; Thu, 23 Feb 2023 00:27:18 -0800 (PST) MIME-Version: 1.0 References: <20230117154906.860916-1-juraj.linkes@pantheon.tech> <20230213152846.284191-1-juraj.linkes@pantheon.tech> In-Reply-To: From: =?UTF-8?Q?Juraj_Linke=C5=A1?= Date: Thu, 23 Feb 2023 09:27:05 +0100 Message-ID: Subject: Re: [PATCH v4 00/10] dts: add hello world testcase To: Bruce Richardson Cc: thomas@monjalon.net, Honnappa.Nagarahalli@arm.com, ohilyard@iol.unh.edu, lijuan.tu@intel.com, wathsala.vithanage@arm.com, probb@iol.unh.edu, 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 Wed, Feb 22, 2023 at 5:43 PM Bruce Richardson wrote: > > On Mon, Feb 20, 2023 at 11:13:45AM +0100, Juraj Linke=C5=A1 wrote: > > Thanks for the comments, Bruce. > > > > On Fri, Feb 17, 2023 at 6:26 PM Bruce Richardson > > wrote: > > > > > > On Mon, Feb 13, 2023 at 04:28:36PM +0100, Juraj Linke=C5=A1 wrote: > > > > Add code needed to run the HelloWorld testcase which just runs the = hello > > > > world dpdk application. > > > > > > > > The patchset currently heavily refactors this original DTS code nee= ded > > > > to run the testcase: > > > > * The whole architecture has been redone into more sensible class > > > > hierarchy > > > > * DPDK build on the System under Test > > > > * DPDK eal args construction, app running and shutting down > > > > * Optional SUT hugepage memory configuration > > > > * Test runner > > > > * Test results > > > > * TestSuite class > > > > * Test runner parts interfacing with TestSuite > > > > * The HelloWorld testsuite itself > > > > > > > > > > * When running as root, things progressed further but I hit an error = when > > > DTS was trying to get the CPU config. No idea what is happening her= e, > > > because running the same commands manually over ssh seemed to work = fine. > > > Below is the error. Any hints as to what is the problem appreciated= . > > > > > > > I remember running into the same issue as well. I think it's related > > to the bracketed paste feature of some terminal emulators: > > https://askubuntu.com/questions/662222/why-bracketed-paste-mode-is-enab= led-sporadically-in-my-terminal-screen > > Please try disabling it and see whether that helps. > > I haven't gone to great lengths to harden this part of SSH > > implementation as we'll be moving to Fabric (from pexpect) after this > > patch (which uses a mature Python SSH implementation instead of > > expect). > > > > Adding things to my environment, e.g. bashrc didn't seem to work for me, > but the following change fixed this particular error. Might be worth > including in the code to avoid others hitting an issue? I didn't really want to modify the code that's about to be replaced, but this is a small and bening change, so I don't mind. > > index d0863d8791..936d5f4642 100644 > --- a/dts/framework/remote_session/remote/ssh_session.py > +++ b/dts/framework/remote_session/remote/ssh_session.py > @@ -68,6 +68,7 @@ def _connect(self) -> None: > > self.send_expect("stty -echo", "#") > self.send_expect("stty columns 1000", "#") > + self.send_expect("bind 'set enable-bracketed-paste off'", "#= ") > except Exception as e: > self._logger.error(RED(str(e))) > if getattr(self, "port", None): > > Unfortunately, things still aren't running correctly for me. The code get= s > copied over and builds, and then the first hello-world test case runs ok. > However, things don't work after that - something seems wrong with the > lcore detection or filtering logic on my system. > > File "/home/bruce/dpdk.org/dts/framework/testbed_model/hw/cpu.py", line= 206, in _filter_cores > raise ValueError( > ValueError: The amount of logical cores per core to use (1) exceeds the a= ctual amount present. Is hyperthreading enabled? > > To the suggestion on hyperthreading, I then checked, and yes, I have HT > enabled on the system. Any suggestions what is wrong? Interesting. The first test case runs hello world on all cores specified in conf.yaml (or all system cores if lcores is empty). The second one tries to run it on just one core and, interestingly, that fails. It's definitely related to hyperthreading, which I've tested a bit (or I thought so), but apparently missed something. Looking at the code, there's something wrong when checking the number of lcores per core (with hyperthreading, more than 1 core per core could be present) requested by filter (in this case, the test case supplies the filter) and the lcores on the system. I'll try to fix it and send v5 right away. If the fix doesn't work, we could look at what "lscpu -p=3DCPU,CORE,SOCKET,NODE | grep -v #" returns on your system. It's also captured in dts/output/suite.log. The lcore config in conf.yaml could also be relevant, but I assume you didn't change that. We could also check the test case output. It's also in dts/output/suite.log > > BTW: suggest the following changes to the error message: > * s/amount/number/ - as cores are countable. Thanks. I've used it inappropriately in a number of places. > * "Is hyperthreading enabled?" -> "This test requires SMT/hyperthreading = be > enabled". By asking if it's enabled, you don't make it clear whether it > should be enabled or not. Since I had it enabled, the question implied to > me that it should be disabled. It's only on reading the code I see the co= mment > that it is meant to be enabled. I see where the confusion is. The question is just a mere suggestion as to where the problem could be, but the logic in code is faulty, leading to this unclear error message. I'll fix the logic and probably modify the message so it makes more sense. > > /Bruce