One function
_get_cpu_info_from_cpufreq_info in workhorsy/py-cpuinfo
The author described this change as “Fixed Bug #41: Broken on Odroid XU3 armhf ARM 32bit”. It counts as a record because the check below fails on the code as it stood at 36e639555 and passes on a925e8567, with nothing else changed between the two runs.
Projectworkhorsy/py-cpuinfo
Fix saved2017-04-10
Sharing licenceMIT · LICENSE
Change size+4 −1
What the code was meant to do, written into the code itself as a docstring
Returns the CPU info gathered from cpufreq-info. Returns {} if cpufreq-info is not found.
The change
| 13 | 13 | if returncode != 0: | |
| 14 | 14 | return {} | |
| 15 | 15 | ||
| 16 | - | hz_brand = output.split('current CPU frequency is')[1].split('\n')[0].rsplit('.', 1)[0].lower().strip() | |
| 16 | + | hz_brand = output.split('current CPU frequency is')[1].split('\n')[0] | |
| 17 | + | i = hz_brand.find('Hz') | |
| 18 | + | assert(i != -1) | |
| 19 | + | hz_brand = hz_brand[0 : i+2].strip().lower() | |
| 17 | 20 | ||
| 18 | 21 | if hz_brand.endswith('mhz'): | |
| 19 | 22 | scale = 6 |
The check that tells the two apart
fail→pass·tests/test_linux_odroid_xu3_arm_32.py::TestLinux_Odroid_XU3_arm_32::test_get_cpu_info_from_cpufreq_info
Check file tests/test_linux_odroid_xu3_arm_32.py, taken without changes from the fix and copied onto the older code, so the exact same check runs against both versions.
Origin and history
The code before it36e639555721c823e903356180fbab893775c770
Broken version dated2017-04-10
Modulecpuinfo.cpuinfo
Units changed_get_cpu_info_from_cpufreq_info
Fingerprintc7558e58543cf754
Checked2026-08-18 by goldset/0.1
Every field above is generated by our program. None of it is written by hand.
Other bugs found in workhorsy/py-cpuinfo
- 2019-05-09Fixed issue with CPUID tests having wrong mock Hz.
- 2017-04-19_get_cpu_info_from_ibm_pa_features
- 2017-04-07Fixed Bug #63: Include py-cpuinfo version in output
- 2017-04-05_get_cpu_info_from_sysctl