pm_include.sh: Fix calculation error of no_of_sockets
PATCH 1/1 pm_include.sh: Fix calculation error of no_of_sockets
From: Jun Huang <[email protected]>
An error will occur when there are multiple sockets and each socket has more than 10 cores, resulting in the value of no_of_sockets being 1.
Signed-off-by Jun Huang <[email protected]>
--- testcases/kernel/power_management/pm_include.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
testcases/kernel/power_management/pm_include.sh +2 -2
@@ -124,8 +124,8 @@ check_input() { is_multi_socket() { no_of_sockets=`cat \ - /sys/devices/system/cpu/cpu?/topology/physical_package_id \ - | uniq | wc -l` + /sys/devices/system/cpu/cpu*/topology/physical_package_id \ + | sort -u | wc -l` [ $no_of_sockets -gt 1 ] ; echo $? }
Signature · 5 lines
2.37.2.windows.2 -- Mailing list info: https://lists.linux.it/listinfo/ltp
Hi Jun,
thanks for git commit description.
Merged!
Kind regards,
Petr
Signature · 1 line
Mailing list info: https://lists.linux.it/listinfo/ltp