-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bthrottler test fails #12
Comments
What's the elapsed value? |
102 — 106 |
reporting same =====================================
dsock 2b42d7b: ./test-suite.log
=====================================
# TOTAL: 17
# PASS: 15
# SKIP: 0
# XFAIL: 0
# FAIL: 2
# XPASS: 0
# ERROR: 0
.. contents:: :depth: 2
FAIL: tests/bthrottler
======================
Assertion failed: (elapsed > 130 && elapsed < 150), function main, file tests/bthrottler.c, line 62.
printf elapsed: 168 on line: `assert(elapsed > 130 && elapsed < 150);`
FAIL tests/bthrottler (exit status: 134)
FAIL: tests/mthrottler
======================
Assertion failed: (elapsed > 80 && elapsed < 100), function main, file tests/mthrottler.c, line 49.
printf elapsed: 107 on line: `assert(elapsed > 80 && elapsed < 100);`
FAIL tests/mthrottler (exit status: 134) Note: after several runs |
Similar issue happens on Travis btw and, IIRC, it happens only with OSX builds. One possibility is that OSX it just imprecise with timeouts and we should make the intervals larger. Another possibility is that there's a problem with using mach_absolute_time(). @reqshark: I have no OSX box. Can you edit libdill.c, now() function. So that gettimeofday() version is used instaead of mach_absolute_time()? Does it make the tests succeed? |
switching to
seems more like it's the first possibility. Also Happy New Year! |
Happy New Year to you too! To double check that it's really OSX at fault here, I've created 'timeouts' branch of libdill which prints out expected timeouts and actually observed ones. Can you run it with one of the failing tests and paste the output? |
Here are some results from libdill tests on Travis. Doesn't look that bad: timeout: 50 elapsed: 50 |
|
sorry ignore first observation (about mthrottler), i printed wrong assert range in test output |
here's another observation, when
|
• use `pwd`/opt for building libs • make sure compiler toolchains know these whereabouts • fixes sustrik#23 • addresses sustrik#12 Signed-off-by: Bent Cardan <[email protected]>
• use `pwd`/opt for building libs • make sure compiler toolchains know these whereabouts • fixes sustrik#23 • addresses sustrik#12 Signed-off-by: Bent Cardan <[email protected]>
I see. The error adds up. I've written the throttling algorithm in haste, so it should be reviewed. It's also possible that it's the test that's wrong, not the throttler. |
ok I got it to pass on osx, see here #25 |
macOS Sierra, Apple LLVM version 7.3.0 (clang-703.0.31).
The text was updated successfully, but these errors were encountered: