gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [gnunet] branch master updated: fix test issues


From: gnunet
Subject: [GNUnet-SVN] [gnunet] branch master updated: fix test issues
Date: Mon, 25 Jun 2018 16:22:55 +0200

This is an automated email from the git hooks/post-receive script.

martin-schanzenbach pushed a commit to branch master
in repository gnunet.

The following commit(s) were added to refs/heads/master by this push:
     new 2218ab50b fix test issues
     new 948a9d911 Merge branch 'master' of git+ssh://gnunet.org/gnunet
2218ab50b is described below

commit 2218ab50b4052d057d5ec6239123c824f3ffe90b
Author: Schanzenbach, Martin <address@hidden>
AuthorDate: Mon Jun 25 16:22:44 2018 +0200

    fix test issues
---
 src/gnsrecord/gnsrecord_serialization.c                 | 6 ++++++
 src/namestore/test_namestore_api_lookup_shadow.c        | 2 +-
 src/namestore/test_namestore_api_lookup_shadow_filter.c | 2 +-
 src/namestore/test_namestore_api_sqlite.conf            | 1 +
 4 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/gnsrecord/gnsrecord_serialization.c 
b/src/gnsrecord/gnsrecord_serialization.c
index a1cfbe984..934d36102 100644
--- a/src/gnsrecord/gnsrecord_serialization.c
+++ b/src/gnsrecord/gnsrecord_serialization.c
@@ -90,6 +90,9 @@ GNUNET_GNSRECORD_records_get_size (unsigned int rd_count,
 {
   size_t ret;
 
+  if (0 == rd_count)
+    return 0;
+  
   ret = sizeof (struct NetworkRecord) * rd_count;
   for (unsigned int i=0;i<rd_count;i++)
   {
@@ -205,6 +208,9 @@ GNUNET_GNSRECORD_records_serialize (unsigned int rd_count,
     }
 #endif
   }
+  memset (&dest[off],
+          0,
+          dest_size-off);
   return dest_size;
 }
 
diff --git a/src/namestore/test_namestore_api_lookup_shadow.c 
b/src/namestore/test_namestore_api_lookup_shadow.c
index ecfd03735..08977712b 100644
--- a/src/namestore/test_namestore_api_lookup_shadow.c
+++ b/src/namestore/test_namestore_api_lookup_shadow.c
@@ -277,9 +277,9 @@ main (int argc, char *argv[])
   {
     res = 1;
   }
-  GNUNET_free (cfg_name);
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (cfg_name);
   return res;
 }
 
diff --git a/src/namestore/test_namestore_api_lookup_shadow_filter.c 
b/src/namestore/test_namestore_api_lookup_shadow_filter.c
index b751ff703..7555f51e7 100644
--- a/src/namestore/test_namestore_api_lookup_shadow_filter.c
+++ b/src/namestore/test_namestore_api_lookup_shadow_filter.c
@@ -352,9 +352,9 @@ main (int argc, char *argv[])
   {
     res = 1;
   }
-  GNUNET_free (cfg_name);
   GNUNET_DISK_purge_cfg_dir (cfg_name,
                              "GNUNET_TEST_HOME");
+  GNUNET_free (cfg_name);
   return res;
 }
 
diff --git a/src/namestore/test_namestore_api_sqlite.conf 
b/src/namestore/test_namestore_api_sqlite.conf
index 82663400a..8c0e557e7 100644
--- a/src/namestore/test_namestore_api_sqlite.conf
+++ b/src/namestore/test_namestore_api_sqlite.conf
@@ -2,6 +2,7 @@
 
 [namestore]
 DATABASE = sqlite
+PREFIX = valgrind --leak-check=full --track-origins=yes --log-file=/tmp/v_log 
 
 [namestore-sqlite]
 FILENAME = $GNUNET_TEST_HOME/namestore/sqlite_test.db

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]