lkml.org 
[lkml]   [2022]   [Nov]   [14]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] kselftest/cgroup: Fix gathering number of CPUs
On Sun, Nov 13, 2022 at 11:44:49AM +0000, Breno Leitao wrote:
> test_cpuset_prs.sh is failing with the following error:
>
> test_cpuset_prs.sh: line 29: [[: 8
> 57%: syntax error in expression (error token is "57%")
>
> This is happening because `lscpu | grep "^CPU(s)"` returns two lines in
> some systems (such as Debian unstable):
>
> # lscpu | grep "^CPU(s)"
> CPU(s): 8
> CPU(s) scaling MHz: 55%
>
> This is a simple fix that discard the second line.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>

Applied to cgroup/for-6.1-fixes.

Thanks.

--
tejun

\
 
 \ /
  Last update: 2022-11-14 22:40    [W:0.096 / U:0.052 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site