diff options
author | Matthew Jordan <mjordan@digium.com> | 2013-08-10 19:45:31 +0000 |
---|---|---|
committer | Matthew Jordan <mjordan@digium.com> | 2013-08-10 19:45:31 +0000 |
commit | d759158f229b8c28382e80cd505b0a24c3ba4651 (patch) | |
tree | c62dc2809867ea95f819f097c7876fee6272a60e /tests | |
parent | fba429409ee60fdbb73dfe6968d08fd78fcd6b89 (diff) |
Add some debugging when test_hashtab_thrash fails
Disabling DEBUG_THREADS caused this test to fail on the 32-bit build agent.
Adding some debugging to see why it thinks the test is timing out.
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@396528 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_hashtab_thrash.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/test_hashtab_thrash.c b/tests/test_hashtab_thrash.c index 373922bf8..3c5d0613f 100644 --- a/tests/test_hashtab_thrash.c +++ b/tests/test_hashtab_thrash.c @@ -61,7 +61,14 @@ struct hash_test { }; static int is_timed_out(struct hash_test const *data) { - return ast_tvdiff_us(data->deadline, ast_tvnow()) < 0; + struct timeval now = ast_tvnow(); + int val = ast_tvdiff_us(data->deadline, now) < 0; + if (val) { + printf("Now: %ld.%06ld Deadline: %ld.%06ld\n", + now.tv_sec, now.tv_usec, + data->deadline.tv_sec, data->deadline.tv_usec); + } + return val; } /*! /brief Create test element */ |