aboutsummaryrefslogtreecommitdiff
path: root/src/util/test_common_logging_dummy.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2012-02-06 09:17:11 +0000
committerChristian Grothoff <christian@grothoff.org>2012-02-06 09:17:11 +0000
commitc7862e3f63acaa648653a30e567a875d42d6b4c2 (patch)
tree20666f467fdd9a83846e01ce37e1a6ee0923bd05 /src/util/test_common_logging_dummy.c
parent0b7df31372e4eb63732f03f8754607a4dee2b80d (diff)
downloadgnunet-c7862e3f63acaa648653a30e567a875d42d6b4c2.tar.gz
gnunet-c7862e3f63acaa648653a30e567a875d42d6b4c2.zip
-speed up logging test, fix logging testcase to always log at DEBUG level
Diffstat (limited to 'src/util/test_common_logging_dummy.c')
-rw-r--r--src/util/test_common_logging_dummy.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/util/test_common_logging_dummy.c b/src/util/test_common_logging_dummy.c
index 9f6756ff4..a1f479976 100644
--- a/src/util/test_common_logging_dummy.c
+++ b/src/util/test_common_logging_dummy.c
@@ -25,11 +25,17 @@
25 * @author LRN 25 * @author LRN
26 */ 26 */
27#include "platform.h" 27#include "platform.h"
28#undef GNUNET_EXTRA_LOGGING
29#define GNUNET_EXTRA_LOGGING GNUNET_YES
30
28#include "gnunet_common.h" 31#include "gnunet_common.h"
29#include "gnunet_time_lib.h" 32#include "gnunet_time_lib.h"
30#include "gnunet_network_lib.h" 33#include "gnunet_network_lib.h"
31 34
32#define MS200 GNUNET_TIME_relative_multiply(GNUNET_TIME_UNIT_MILLISECONDS, 200) 35/**
36 * Delay introduced between operations, useful for debugging.
37 */
38#define OUTPUT_DELAY GNUNET_TIME_relative_multiply (GNUNET_TIME_UNIT_MILLISECONDS, 0)
33 39
34static void 40static void
35my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component, 41my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component,
@@ -44,7 +50,7 @@ my_log (void *ctx, enum GNUNET_ErrorType kind, const char *component,
44static int 50static int
45expensive_func () 51expensive_func ()
46{ 52{
47 return GNUNET_NETWORK_socket_select (NULL, NULL, NULL, MS200); 53 return GNUNET_NETWORK_socket_select (NULL, NULL, NULL, OUTPUT_DELAY);
48} 54}
49 55
50#define pr(kind,lvl) {\ 56#define pr(kind,lvl) {\