Commit 1bd2d1f
CKI KWF Bot
Merge: tools/power turbostat: Fix incorrect sorting of PMT telemetry
MR: https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-9/-/merge_requests/7605
JIRA: https://issues.redhat.com/browse/RHEL-127415
commit cafb47b
Author: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Date: Sat Aug 9 10:35:15 2025 +0530
tools/power turbostat: Fix incorrect sorting of PMT telemetry
The pmt_telemdir_sort() comparison function was returning a boolean
value (0 or 1) instead of the required negative, zero, or positive
value for proper sorting. This caused unpredictable and incorrect
ordering of telemetry directories named telem0, telem1, ..., telemN.
Update the comparison logic to return -1, 0, or 1 based on the
numerical value extracted from the directory name, ensuring correct
numerical ordering when using scandir.
This change improves stability and correctness when iterating PMT
telemetry directories.
Signed-off-by: Kaushlendra Kumar <kaushlendra.kumar@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
(cherry picked from commit cafb47b)
Assisted-by: Patchpal
Signed-off-by: David Arcari <darcari@redhat.com>
Approved-by: Tony Camuso <tcamuso@redhat.com>
Approved-by: Steve Best <sbest@redhat.com>
Approved-by: CKI KWF Bot <cki-ci-bot+kwf-gitlab-com@redhat.com>
Merged-by: CKI GitLab Kmaint Pipeline Bot <26919896-cki-kmaint-pipeline-bot@users.noreply.gitlab.com>1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1890 | 1890 | | |
1891 | 1891 | | |
1892 | 1892 | | |
1893 | | - | |
| 1893 | + | |
1894 | 1894 | | |
1895 | 1895 | | |
1896 | 1896 | | |
| |||
0 commit comments