[LTP] [PATCH] pm_include.sh: Fix no_of_sockets calculation error of is_multi_socket() function.
huangjuniter@foxmail.com
huangjuniter@foxmail.com
Sat Aug 27 03:55:26 CEST 2022
From: Jun Huang <huangjuniter@foxmail.com>
---
testcases/kernel/power_management/pm_include.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/testcases/kernel/power_management/pm_include.sh b/testcases/kernel/power_management/pm_include.sh
index 35ff0f1e6..f3e160445 100755
--- a/testcases/kernel/power_management/pm_include.sh
+++ b/testcases/kernel/power_management/pm_include.sh
@@ -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 $?
}
--
2.37.2.windows.2
More information about the ltp
mailing list