Ignore missing CPU frequency on more architectures
authorBenjamin Barenblat <bbaren@google.com>
Tue, 9 Feb 2021 19:41:06 +0000 (19:41 +0000)
committerBenjamin Barenblat <bbaren@debian.org>
Tue, 9 Feb 2021 19:41:06 +0000 (19:41 +0000)
commit89ceb09b3a7752e906d3edbec448439c975d87f6
tree4579b20077388348a2bb5309e81d9d99bd46475a
parentf5a08880d80d31a9c93c990206602b05b797e500
Ignore missing CPU frequency on more architectures

Forwarded: yes
Applied-Upstream: https://github.com/abseil/abseil-cpp/commit/1918ad2ae38aa32c74b558b322479a8efdd76363

Linux on MIPS, PA-RISC, RISC-V, and SystemZ doesn’t expose the nominal CPU
frequency via /sys, so don’t worry if `NominalCPUFrequency` returns 1.0 on those
platforms.

Some POWER machines expose the CPU frequency; others do not. Since we can’t
predict which type of machine the tests will run on, simply disable testing for
`NominalCPUFrequency` on POWER.

The author works at Google. Upstream applied this patch as Piper revision
347079873 and exported it to GitHub; the Applied-Upstream URL above points to
the exported commit.

Gbp-Pq: Name cpu-frequency.diff
absl/base/internal/sysinfo_test.cc