[asterisk-commits] mjordan: trunk r396528 - /trunk/tests/test_hashtab_thrash.c

SVN commits to the Asterisk project asterisk-commits at lists.digium.com
Sat Aug 10 14:45:33 CDT 2013


Author: mjordan
Date: Sat Aug 10 14:45:31 2013
New Revision: 396528

URL: http://svnview.digium.com/svn/asterisk?view=rev&rev=396528
Log:
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.

Modified:
    trunk/tests/test_hashtab_thrash.c

Modified: trunk/tests/test_hashtab_thrash.c
URL: http://svnview.digium.com/svn/asterisk/trunk/tests/test_hashtab_thrash.c?view=diff&rev=396528&r1=396527&r2=396528
==============================================================================
--- trunk/tests/test_hashtab_thrash.c (original)
+++ trunk/tests/test_hashtab_thrash.c Sat Aug 10 14:45:31 2013
@@ -61,7 +61,14 @@
 };
 
 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 */




More information about the asterisk-commits mailing list