[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: -fix namestore tests
From: |
gnunet |
Subject: |
[gnunet] branch master updated: -fix namestore tests |
Date: |
Fri, 25 Feb 2022 09:22:24 +0100 |
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 03e45f67c -fix namestore tests
03e45f67c is described below
commit 03e45f67ce326c004008516e35fd5b9e8c17cd08
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Fri Feb 25 09:22:17 2022 +0100
-fix namestore tests
---
contrib/gana | 2 +-
po/POTFILES.in | 3 +++
src/namestore/gnunet-service-namestore.c | 1 +
src/namestore/plugin_namestore_sqlite.c | 10 ++++++++++
src/namestore/test_namestore_api_lookup_nick.c | 4 ++--
src/namestore/test_namestore_api_zone_to_name.c | 4 ++--
src/namestore/test_plugin_rest_namestore.sh | 2 +-
7 files changed, 20 insertions(+), 6 deletions(-)
diff --git a/contrib/gana b/contrib/gana
index 24eb905ba..ca97ba9b2 160000
--- a/contrib/gana
+++ b/contrib/gana
@@ -1 +1 @@
-Subproject commit 24eb905bac48869b4184801571c0728c772b299c
+Subproject commit ca97ba9b2ba3d47197456dec2ec4a4c9358329f3
diff --git a/po/POTFILES.in b/po/POTFILES.in
index 5c1152e7c..d2e44dec1 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -175,6 +175,7 @@ src/gns/nss/nss_gns_query.c
src/gns/plugin_block_gns.c
src/gns/plugin_gnsrecord_gns.c
src/gns/plugin_rest_gns.c
+src/gns/test.c
src/gnsrecord/gnsrecord.c
src/gnsrecord/gnsrecord_crypto.c
src/gnsrecord/gnsrecord_misc.c
@@ -182,6 +183,7 @@ src/gnsrecord/gnsrecord_serialization.c
src/gnsrecord/gnunet-gnsrecord-tvg.c
src/gnsrecord/json_gnsrecord.c
src/gnsrecord/plugin_gnsrecord_dns.c
+src/gnsrecord/test.c
src/hello/address.c
src/hello/gnunet-hello.c
src/hello/hello-ng.c
@@ -314,6 +316,7 @@ src/reclaim/plugin_rest_reclaim.c
src/reclaim/reclaim_api.c
src/reclaim/reclaim_attribute.c
src/reclaim/reclaim_credential.c
+src/reclaim/test.c
src/regex/gnunet-daemon-regexprofiler.c
src/regex/gnunet-regex-profiler.c
src/regex/gnunet-regex-simulation-profiler.c
diff --git a/src/namestore/gnunet-service-namestore.c
b/src/namestore/gnunet-service-namestore.c
index 57147879f..ab8771e3f 100644
--- a/src/namestore/gnunet-service-namestore.c
+++ b/src/namestore/gnunet-service-namestore.c
@@ -1668,6 +1668,7 @@ handle_record_store (void *cls, const struct
RecordStoreMessage *rp_msg)
send_store_response (nc, res, _("Store failed"), rid);
GNUNET_SERVICE_client_continue (nc->client);
GNUNET_free (conv_name);
+ return;
}
sa = GNUNET_malloc (sizeof(struct StoreActivity)
diff --git a/src/namestore/plugin_namestore_sqlite.c
b/src/namestore/plugin_namestore_sqlite.c
index 7cb9b7ed0..0b3aac84f 100644
--- a/src/namestore/plugin_namestore_sqlite.c
+++ b/src/namestore/plugin_namestore_sqlite.c
@@ -329,6 +329,11 @@ namestore_sqlite_store_records (void *cls,
0,
sizeof(pkey));
for (unsigned int i = 0; i < rd_count; i++)
+ {
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Checking if `%d' is zonekey type\n",
+ rd[i].record_type);
+
if (GNUNET_YES == GNUNET_GNSRECORD_is_zonekey_type (rd[i].record_type))
{
GNUNET_break (GNUNET_YES ==
@@ -336,8 +341,13 @@ namestore_sqlite_store_records (void *cls,
rd[i].data_size,
rd[i].record_type,
&pkey));
+ LOG (GNUNET_ERROR_TYPE_DEBUG,
+ "Storing delegation zone record value `%s'\n",
+ GNUNET_GNSRECORD_z2s (&pkey));
+
break;
}
+ }
rvalue = GNUNET_CRYPTO_random_u64 (GNUNET_CRYPTO_QUALITY_WEAK,
UINT64_MAX);
data_size = GNUNET_GNSRECORD_records_get_size (rd_count,
diff --git a/src/namestore/test_namestore_api_lookup_nick.c
b/src/namestore/test_namestore_api_lookup_nick.c
index 6ce969c9b..7decf39f8 100644
--- a/src/namestore/test_namestore_api_lookup_nick.c
+++ b/src/namestore/test_namestore_api_lookup_nick.c
@@ -262,12 +262,12 @@ nick_cont (void *cls, int32_t success, const char *emsg)
"Nick added : %s\n",
(success == GNUNET_OK) ? "SUCCESS" : "FAIL");
- rd_orig.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us;
+ rd_orig.expiration_time = GNUNET_TIME_UNIT_HOURS.rel_value_us;
rd_orig.record_type = TEST_RECORD_TYPE;
rd_orig.data_size = TEST_RECORD_DATALEN;
record_data = GNUNET_malloc (TEST_RECORD_DATALEN);
rd_orig.data = record_data;
- rd_orig.flags = 0;
+ rd_orig.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
memset ((char *) rd_orig.data, 'a', TEST_RECORD_DATALEN);
nsqe = GNUNET_NAMESTORE_records_store (nsh, &privkey,
diff --git a/src/namestore/test_namestore_api_zone_to_name.c
b/src/namestore/test_namestore_api_zone_to_name.c
index 8efdba453..1e2f8248b 100644
--- a/src/namestore/test_namestore_api_zone_to_name.c
+++ b/src/namestore/test_namestore_api_zone_to_name.c
@@ -216,11 +216,11 @@ run (void *cls,
{
struct GNUNET_GNSRECORD_Data rd;
- rd.expiration_time = GNUNET_TIME_absolute_get ().abs_value_us;
+ rd.expiration_time = GNUNET_TIME_UNIT_HOURS.rel_value_us;
rd.record_type = GNUNET_GNSRECORD_TYPE_PKEY;
rd.data_size = sizeof (s_zone_value.ecdsa_key);
rd.data = &s_zone_value.ecdsa_key;
- rd.flags = 0;
+ rd.flags = GNUNET_GNSRECORD_RF_RELATIVE_EXPIRATION;
nsh = GNUNET_NAMESTORE_connect (cfg);
GNUNET_break (NULL != nsh);
diff --git a/src/namestore/test_plugin_rest_namestore.sh
b/src/namestore/test_plugin_rest_namestore.sh
index 8a45cebf5..3c559a0b3 100755
--- a/src/namestore/test_plugin_rest_namestore.sh
+++ b/src/namestore/test_plugin_rest_namestore.sh
@@ -85,7 +85,7 @@ test="$(gnunet-namestore -D -z $TEST_ID -c
test_namestore_api.conf)"
name=$TEST_ID
public="$(gnunet-identity -d -c test_namestore_api.conf | grep $TEST_ID | awk
'NR==1{print $3}')"
echo "$name $public"
-valgrind gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V
"000G006WVZ8HQ5YTVFNX09HK0VJVVQ9ZCBYDSCH3ERT04N5ZRBKEB82EP8" -t "PKEY" -c
test_namestore_api.conf
+gnunet-namestore -z $name -p -a -n "test_entry" -e "1d" -V
"000G006WVZ8HQ5YTVFNX09HK0VJVVQ9ZCBYDSCH3ERT04N5ZRBKEB82EP8" -t "PKEY" -c
test_namestore_api.conf
#curl_get "${namestore_link}" "HTTP/1.1 200 OK"
curl_get "${namestore_link}/$name" "HTTP/1.1 200 OK"
curl_get "${namestore_link}/$public" "error"
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gnunet] branch master updated: -fix namestore tests,
gnunet <=