nitpicks
authorChristian Grothoff <christian@grothoff.org>
Wed, 1 Sep 2010 12:23:18 +0000 (12:23 +0000)
committerChristian Grothoff <christian@grothoff.org>
Wed, 1 Sep 2010 12:23:18 +0000 (12:23 +0000)
src/dht/Makefile.am
src/include/gnunet_common.h
src/util/test_container_multihashmap.c
src/util/test_strings.c

index 86583ef22a0b3feaaeb103cd32959dc344c70612..7f75eea7fc5f9f395138c0c92c3b0f5509f47a11 100644 (file)
@@ -44,7 +44,7 @@ libgnunet_plugin_dhtlog_dummy_la_LIBADD = \
   $(XLIB)
 libgnunet_plugin_dhtlog_dummy_la_LDFLAGS = \
  $(GN_PLUGIN_LDFLAGS)
+
 libgnunet_plugin_dhtlog_mysql_dump_la_SOURCES = \
   plugin_dhtlog_mysql_dump.c
 libgnunet_plugin_dhtlog_mysql_dump_la_LIBADD = \
@@ -83,6 +83,7 @@ STUD_PROGS =  gnunet-service-dht-can \
  gnunet-service-dht-freenet \
  gnunet-service-dht-kademlia \
  gnunet-service-dht-koorde 
+STUD_TESTS = test_kademlia_end2end
 endif
 
 bin_PROGRAMS = $(STUD_PROGS) \
@@ -189,7 +190,7 @@ gnunet_dht_driver_LDADD = \
   $(top_builddir)/src/util/libgnunetutil.la \
   $(top_builddir)/src/dht/libgnunetdhtlog.la
 
-check_PROGRAMS = \
+check_PROGRAMS = $(STUD_TESTS) \
  test_dht_api \
  test_dht_twopeer \
  test_dht_twopeer_put_get \
@@ -238,6 +239,14 @@ test_dhtlog_LDADD = \
  $(top_builddir)/src/dht/libgnunetdht.la \
  $(top_builddir)/src/dht/libgnunetdhtlog.la
 
+test_kademlia_end2end_SOURCES = \
+ test_kademlia_end2end.c
+test_kademlia_end2end_LDADD = \
+ $(top_builddir)/src/util/libgnunetutil.la \
+ $(top_builddir)/src/testing/libgnunettesting.la \
+ $(top_builddir)/src/dht/libgnunetdht.la \
+ $(top_builddir)/src/dht/libgnunetdhtlog.la
+
 EXTRA_DIST = \
   $(check_SCRIPTS) \
   test_dht_api_data.conf \
index 8703dc3b7870b4b690df43644d76ab07ccc99b0c..550b44c4416c7fd88e92a460828002fcd2769371 100644 (file)
@@ -491,7 +491,7 @@ void *GNUNET_xmalloc_unchecked_ (size_t size,
  * memory is available.
  */
 void *GNUNET_xrealloc_ (void *ptr,
-                        const size_t n, const char *filename, int linenumber);
+                        size_t n, const char *filename, int linenumber);
 
 /**
  * Free memory. Merely a wrapper for the case that we
index 0c79d76bcd3ba24af87c86092c74d0e1f896a7fe..931a52fece0de51fdd4b55e8de99dfd12376e500 100644 (file)
@@ -37,6 +37,7 @@ testMap (int i)
   struct GNUNET_CONTAINER_MultiHashMap *m;
   GNUNET_HashCode k1;
   GNUNET_HashCode k2;
+  const char *ret;
   int j;
 
   CHECK (NULL != (m = GNUNET_CONTAINER_multihashmap_create (i)));
@@ -59,7 +60,9 @@ testMap (int i)
                                                          "v1",
                                                          GNUNET_CONTAINER_MULTIHASHMAPOPTION_REPLACE));
   CHECK (1 == GNUNET_CONTAINER_multihashmap_size (m));
-  CHECK (0 == strcmp ("v1", GNUNET_CONTAINER_multihashmap_get (m, &k1)));
+  ret = GNUNET_CONTAINER_multihashmap_get (m, &k1);
+  GNUNET_assert (ret != NULL);
+  CHECK (0 == strcmp ("v1", ret));
   CHECK (GNUNET_NO == GNUNET_CONTAINER_multihashmap_put (m,
                                                          &k1,
                                                          "v1",
index abd147300eaf05cd3861baec04ff30fd6c458e85..c34c180fabeefb9f2bfe132e70add6f1a8a4ec9c 100644 (file)
@@ -77,6 +77,7 @@ check ()
                   hdir,
                   DIR_SEPARATOR_STR);
   b = GNUNET_STRINGS_filename_expand ("~");
+  GNUNET_assert (b != NULL);
   WANT (buf, b);
   GNUNET_STRINGS_buffer_fill (buf, sizeof (buf), 3, "a", "btx", "c");
   WANTB ("a\0btx\0c", buf, 8);