Skip to content
Commit 35b7fa4e authored by Breno Leitao's avatar Breno Leitao Committed by Tejun Heo
Browse files

kselftest/cgroup: Fix gathering number of CPUs



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: default avatarBreno Leitao <leitao@debian.org>
Reviewed-by: default avatarKamalesh Babulal <kamalesh.babulal@oracle.com>
Signed-off-by: default avatarTejun Heo <tj@kernel.org>
parent 79a7f41f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment