-LRN: fix socket_close logging
[oweals/gnunet.git] / src / util / test_configuration.c
index 2737cb4f7eda1d5f0ed9040b6f7b1a60333a5d05..3780b36490dee6282f264272814bb734736d3275 100644 (file)
@@ -28,7 +28,7 @@
 #include "gnunet_configuration_lib.h"
 #include "gnunet_disk_lib.h"
 
-#define DEBUG GNUNET_NO
+#define DEBUG GNUNET_EXTRA_LOGGING
 
 /* Test Configuration Diffs Options */
 enum
@@ -133,7 +133,7 @@ diffsCallBack (void *cls, const char *section, const char *option,
     GNUNET_free_non_null (diffValue);
     break;
   }
-#if DEBUG
+#if 0
   case PRINT:
     if (NULL == cbData->section)
     {
@@ -251,7 +251,7 @@ checkDiffs (struct GNUNET_CONFIGURATION_Handle *cfgDefault, int option)
              "Incorrect Configuration Diffs: Data may be missing in diffs\n");
 
 housekeeping:
-#if DEBUG
+#if 0
   cbData.section = NULL;
   cbData.callBackOption = PRINT;
   printf ("\nExpected Diffs:\n");
@@ -333,6 +333,17 @@ testConfig ()
   }
   GNUNET_free (c);
 
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_size (cfg, "last", "size", &l))
+  {
+    GNUNET_break (0);
+    return 10;
+  }
+  if (l != 512 * 1024)
+  {
+    GNUNET_break (0);
+    return 11;
+  }
   return 0;
 }