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 76F21459C3; Wed, 18 Sep 2024 09:01:48 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F77A4069F; Wed, 18 Sep 2024 09:01:48 +0200 (CEST) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 5A23E4029B for ; Wed, 18 Sep 2024 09:01:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1726642905; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4vhcUgiA8uxeS+n4/1qu3Ijol14qNC6+aAU1uN9Uqp0=; b=Gc4N/tO8WMSgYtJYGoa7fq4TWA5jehFNF65iAYKp996BltKbJF2KkJ9gfZ//l1rnMdZVh3 9O4ovCFTE0VICNGuRorNAPTzk7sOOPq51fzAClFeWfTCG+81wFEL4XJqmLxT5nHln2h6ZH RM/YrkLAto23SHAlhnDXMWrvGiy7O4Y= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-283-vmob-4RiP1yR938jux31kg-1; Wed, 18 Sep 2024 03:01:43 -0400 X-MC-Unique: vmob-4RiP1yR938jux31kg-1 Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-2f75ec1ddb3so40847971fa.3 for ; Wed, 18 Sep 2024 00:01:43 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1726642902; x=1727247702; 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=4vhcUgiA8uxeS+n4/1qu3Ijol14qNC6+aAU1uN9Uqp0=; b=b40KdhhcR5X+xeaMsHbNhy8X5oVfSQEo84wcokmTX9cfvtXwT3cwZZnW8l5i2K70YL 4dua+tIYF5ggFwCXAV65kBA6Zu9FwypY8tD/aoqvQamjTUiYrNRGHtpqDbcnKx+xST+V Xqr763irCe4RH5YWsePgHjHdwDuCynvWqqbrmUjZy/tEQA7r/UQBE7UN8cipM1Df1+0t QNWP6iZi5QyC4Z6hAnIjX9hx4XnCsvWJp6oBhLLF1Ur6xSE+WRJyTN6OWI0tJwZBFmeZ scHND1F/R9+RnQ/57KluArX+UR095MzdVEizjnu/4bXSYB0ywJ61ICBkdGTnhfHpAbJ7 0jww== X-Gm-Message-State: AOJu0YxVE9zb3e6BWX2Gd+fXQNPLPVFf6w6ukS1xQr+IsVq1l/wrWerh qScBKWg7eUpD9eyTGZSjZW+ACvNjU5tVsRpwWMOWnzrUBBmFPvV4nunJThOIUSQHNYNa1bVw5Eq MQbTCCqCIO3a15E8SPJxxSTVYKJt4vBcSVq9Y/bqczpqQWo0C19SSzuVO2qF5iyVBw0LwUmotux 9LJfTKYaiDdJpyPZ0= X-Received: by 2002:a2e:bc06:0:b0:2f7:7be8:fd89 with SMTP id 38308e7fff4ca-2f7918e52damr128511161fa.6.1726642902154; Wed, 18 Sep 2024 00:01:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFXsJnP/PRWt6fv8vyCESyi0EOL/VGhoy8J0eQaoXFDFPMnlXqKBe9EnpE8fboqOkDo8kaXCK2buQ42kwFJaKI= X-Received: by 2002:a2e:bc06:0:b0:2f7:7be8:fd89 with SMTP id 38308e7fff4ca-2f7918e52damr128510581fa.6.1726642901396; Wed, 18 Sep 2024 00:01:41 -0700 (PDT) MIME-Version: 1.0 References: <20240916042631.186816-1-probb@iol.unh.edu> In-Reply-To: From: David Marchand Date: Wed, 18 Sep 2024 09:01:29 +0200 Message-ID: Subject: Re: [PATCH] tests/TestSuite_crypto_perf_cryptodev_perf.py Improving lscpu parsing To: Patrick Robb Cc: dts@dpdk.org, Thomas Monjalon , Aaron Conole X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org On Tue, Sep 17, 2024 at 5:37=E2=80=AFAM Patrick Robb wr= ote: > > On Mon, Sep 16, 2024 at 3:17=E2=80=AFAM David Marchand > wrote: > > > > On Mon, Sep 16, 2024 at 6:27=E2=80=AFAM Patrick Robb wrote: > > > > > > This testsuite fails to parse lscpu output on some systems because > > > it expects that there be no leading whitespace, which is not > > > true on all systems. > > > > The leading whitespace is a generic issue, not really related to "some"= systems. > > The issue is that keys of interest for the rest of the code ('Core(s) > > per socket', 'Socket(s)', 'CPU(s)') may have leading whitespace on > > some systems. > > ^The above is what I had in mind when writing my commit - your wording > gets to the point better, thanks. > > I had observed this issue in trying to run the testsuite on an ARM > Neoverse N-1 Ampere server at UNH, and noted that the leading > whitespace on it's lscpu output was preventing the 'Core(s) per > socket' key from appearing in the output dict (at least without the > trimming which this commit provides). Thank you for confirming, I'll update the commitlog accordingly before appl= ying. > > > > > Could you detail which systems have such issue? > > > > From a quick look through of our systems I think that there appears to > be a mixture of systems with lscpu output with no leading whitespace > before any of the keys, and others (like the Ampere server I > mentioned) which do have that leading whitespace/indentation. I'm not > sure what the pattern is (I guess it probably depends on the OS on the > system), and a google search didn't seem to reveal much about this > question. However, from looking at the lscpu man page, I do see that Ok, there is no point in investigating more from my pov. I'll just mention that some ARM env were affected. > there is a --json flag which you can include. > > So, in my opinion the ideal way to deal with these situation where you > must read some information from the system, is to use the options > available (like lscpu --json) which are guaranteed to return a machine > readable output. Getting into the business of reading text output like > this is not ideal, given that it is subject to change in the future. This would be a more robust solution, but I guess this is beyond the simple fixing that we want to do on this "legacy" repository. Hopefully, the new DTS code in the DPDK repo won't be subject to such issue= . > But, I have the same view as you that this commit is not likely to > break this testsuite for any systems which are running the suite > currently, it will only help for systems with the indented lscpu > output. +1 --=20 David Marchand