aboutsummaryrefslogtreecommitdiffstats
path: root/src/tests/test_os_utils.cpp
diff options
context:
space:
mode:
authorJack Lloyd <[email protected]>2018-03-28 15:58:09 -0400
committerJack Lloyd <[email protected]>2018-03-28 15:59:10 -0400
commit632392451b2965764fd094cb5195cabc98f2a4b5 (patch)
tree8c039278e6f35a906178fd9bdf6347ff75a58265 /src/tests/test_os_utils.cpp
parenta0833f827f96a82db6be1466b3fd382fda615dbc (diff)
Prevent test loop from being potentially unbounded [ci skip]
Shouldn't happen but conceivably might on broken hardware or emulator.
Diffstat (limited to 'src/tests/test_os_utils.cpp')
-rw-r--r--src/tests/test_os_utils.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tests/test_os_utils.cpp b/src/tests/test_os_utils.cpp
index 83f3fda00..f198f8837 100644
--- a/src/tests/test_os_utils.cpp
+++ b/src/tests/test_os_utils.cpp
@@ -78,7 +78,7 @@ class OS_Utils_Tests final : public Test
}
size_t counts = 0;
- while(Botan::OS::get_processor_timestamp() == proc_ts1)
+ while(counts < 100 && (Botan::OS::get_processor_timestamp() == proc_ts1))
++counts;
result.test_lt("CPU cycle counter eventually changes value", counts, 10);