diff options
author | Sven Gothel <[email protected]> | 2022-07-24 03:36:48 +0200 |
---|---|---|
committer | Sven Gothel <[email protected]> | 2022-07-24 03:36:48 +0200 |
commit | 1e2807584f97473f427640d9c6a8fb948ba20824 (patch) | |
tree | 810c722f4ddbb94a7da8bd8c91b0a93951336c15 | |
parent | 393c45f75af39f4cdc3a4b715e0c52f28274bde6 (diff) |
FreeBSD Support: test_fractions_01: Increase required test accuracy from 1/2 ms to 60_ms for virtual machine testing (7/n)
-rw-r--r-- | test/test_fractions_01.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/test/test_fractions_01.cpp b/test/test_fractions_01.cpp index 6f65855..fe10612 100644 --- a/test/test_fractions_01.cpp +++ b/test/test_fractions_01.cpp @@ -872,9 +872,14 @@ TEST_CASE( "Fraction Time Arithmetic Sub Test 03.2", "[fraction][fraction_timesp } TEST_CASE( "Fraction Time Measurement Test 04.01", "[fraction][fraction_timespec][time]" ) { - // We assume accuracy of at least 1/2 millisecond, hence the difference shall not be greater - const fraction_i64 accuracy = fractions_i64::milli*2_i64/3_i64; const int64_t sleep_ms = 50; + // + // Ideally we assume accuracy of at least 1/2 millisecond, hence the difference shall not be greater + // const fraction_i64 accuracy = fractions_i64::milli*2_i64/3_i64; + // However, running within virtual machines etc, we have to be more generous here: 60_ms + // Detected using KVM on GNU/Linux host for FreeBSD 13.1 target + const fraction_i64 accuracy = fractions_i64::milli*60_i64; + // { const fraction_timespec t0 = getMonotonicTime(); sleep_for( sleep_ms * 1_ms ); |