[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnunet] branch master updated: transport: remove waitpid again to make
From: |
gnunet |
Subject: |
[gnunet] branch master updated: transport: remove waitpid again to make test run (for now). This is also an attempt to fix the rekey and rekey test. |
Date: |
Sat, 09 Mar 2024 17:41:41 +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 6d3268625 transport: remove waitpid again to make test run (for now).
This is also an attempt to fix the rekey and rekey test.
6d3268625 is described below
commit 6d3268625275afd3b5796bcbf938f38d4f480ae1
Author: Martin Schanzenbach <schanzen@gnunet.org>
AuthorDate: Sat Mar 9 17:40:58 2024 +0100
transport: remove waitpid again to make test run (for now). This is also an
attempt to fix the rekey and rekey test.
---
src/service/transport/gnunet-communicator-udp.c | 16 ++++++++++-----
src/service/transport/test_communicator_basic.c | 23 ++++++++++++++--------
.../test_communicator_udp_rekey_peer1.conf | 2 +-
.../test_communicator_udp_rekey_peer2.conf | 2 +-
.../transport/transport-testing-communicator.c | 2 +-
5 files changed, 29 insertions(+), 16 deletions(-)
diff --git a/src/service/transport/gnunet-communicator-udp.c
b/src/service/transport/gnunet-communicator-udp.c
index 9c24ea2a3..842c42107 100644
--- a/src/service/transport/gnunet-communicator-udp.c
+++ b/src/service/transport/gnunet-communicator-udp.c
@@ -1260,7 +1260,8 @@ setup_cipher (const struct GNUNET_HashCode *msec,
GNUNET_assert (0 ==
gcry_cipher_open (cipher,
- GCRY_CIPHER_AES256 /* low level: go for
speed */,
+ GCRY_CIPHER_AES256 /* low level: go for
speed */
+ ,
GCRY_CIPHER_MODE_GCM,
0 /* flags */));
get_iv_key (msec, serial, key, iv);
@@ -1677,7 +1678,7 @@ try_handle_plaintext (struct SenderAddress *sender,
ss_rekey->sender = sender;
GNUNET_CONTAINER_DLL_insert (sender->ss_head, sender->ss_tail, ss_rekey);
sender->num_secrets++;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Received rekey secret with cmac %s\n",
GNUNET_h2s (&(ss_rekey->cmac)));
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -1692,13 +1693,18 @@ try_handle_plaintext (struct SenderAddress *sender,
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"We have %u acks available.\n",
ss_rekey->sender->acks_available);
+ GNUNET_STATISTICS_update (stats,
+ "# rekeying successful",
+ 1,
+ GNUNET_NO);
ss_rekey->sender->kce_send_ack_on_finish = GNUNET_YES;
ss_rekey->override_available_acks = GNUNET_YES;
// FIXME
- ss_rekey->sender->kce_task = GNUNET_SCHEDULER_add_delayed (
+ kce_generate_cb (ss_rekey);
+ /*ss_rekey->sender->kce_task = GNUNET_SCHEDULER_add_delayed (
WORKING_QUEUE_INTERVALL,
kce_generate_cb,
- ss_rekey);
+ ss_rekey);*/
// FIXME: Theoretically, this could be an Ack
buf_pos += ntohs (hdr->size);
bytes_remaining -= ntohs (hdr->size);
@@ -2568,7 +2574,7 @@ mq_send_d (struct GNUNET_MQ_Handle *mq,
{
if (ss->rekey_initiated == GNUNET_NO)
{
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Injecting rekey for ss with byte sent %lu\n",
(unsigned long) ss->bytes_sent);
create_rekey (receiver, ss, &rekey);
diff --git a/src/service/transport/test_communicator_basic.c
b/src/service/transport/test_communicator_basic.c
index aa11ca5e0..4c08439a8 100644
--- a/src/service/transport/test_communicator_basic.c
+++ b/src/service/transport/test_communicator_basic.c
@@ -183,7 +183,8 @@ open_queue (void *cls)
{
queue_est = GNUNET_YES;
GNUNET_TRANSPORT_TESTING_transport_communicator_open_queue (tc_hs[PEER_A],
-
&peer_id[PEER_B],
+
&peer_id[PEER_B]
+ ,
address);
}
else
@@ -372,18 +373,24 @@ process_statistics (void *cls,
uint64_t value,
int is_persistent)
{
- GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
"Statistic: Name %s and value %" PRIu64 "\n",
name,
value);
if ((0 == strcmp ("rekey", test_name)) && (0 == strcmp (
"# rekeying successful",
- name)) && (0 == value))
+ name)))
{
- ret = 2;
- GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
- "No successful rekeying!\n");
- GNUNET_SCHEDULER_shutdown ();
+ if (0 == value)
+ {
+ ret = 2;
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "No successful rekeying!\n");
+ GNUNET_SCHEDULER_shutdown ();
+ }
+ LOG (GNUNET_ERROR_TYPE_MESSAGE,
+ "Successful rekeys: %llu\n",
+ (unsigned long long) value);
}
if ((0 == strcmp ("backchannel", test_name)) &&
(0 == strcmp (
@@ -594,7 +601,7 @@ choose_phase (struct
GNUNET_TRANSPORT_TESTING_TransportCommunicatorHandle *tc_h)
tc_h);
if (NULL != rekey_stats[peer_nr])
GNUNET_STATISTICS_get_cancel (rekey_stats[peer_nr]);
- rekey_stats[peer_nr] = GNUNET_STATISTICS_get (stats[0],
+ rekey_stats[peer_nr] = GNUNET_STATISTICS_get (stats[1],
"C-UDP",
"# rekeying successful",
process_statistics_rekey_done,
diff --git a/src/service/transport/test_communicator_udp_rekey_peer1.conf
b/src/service/transport/test_communicator_udp_rekey_peer1.conf
index 9b0fa7497..dd19fbe94 100644
--- a/src/service/transport/test_communicator_udp_rekey_peer1.conf
+++ b/src/service/transport/test_communicator_udp_rekey_peer1.conf
@@ -46,7 +46,7 @@ BINDTO = 60002
DISABLE_V6 = YES
MAX_QUEUE_LENGTH=5000
REKEY_INTERVAL = 100ms
-REKEY_MAX_BYTES=9KiB
+REKEY_MAX_BYTES=5KiB
[communicator-test]
BACKCHANNEL_ENABLED = YES
diff --git a/src/service/transport/test_communicator_udp_rekey_peer2.conf
b/src/service/transport/test_communicator_udp_rekey_peer2.conf
index 383ab19d2..c21d0adaa 100644
--- a/src/service/transport/test_communicator_udp_rekey_peer2.conf
+++ b/src/service/transport/test_communicator_udp_rekey_peer2.conf
@@ -46,7 +46,7 @@ BINDTO = 60003
DISABLE_V6 = YES
MAX_QUEUE_LENGTH=5000
REKEY_INTERVAL = 100ms
-REKEY_MAX_BYTES=9KiB
+REKEY_MAX_BYTES=5KiB
[communicator-test]
BACKCHANNEL_ENABLED = YES
diff --git a/src/service/transport/transport-testing-communicator.c
b/src/service/transport/transport-testing-communicator.c
index 7d8abbe1e..c4bb75083 100644
--- a/src/service/transport/transport-testing-communicator.c
+++ b/src/service/transport/transport-testing-communicator.c
@@ -773,7 +773,7 @@ shutdown_process (struct GNUNET_OS_Process *proc)
"Error shutting down process with SIGERM and SIGKILL\n");
}
}
- GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (proc));
+ //GNUNET_break (GNUNET_OK == GNUNET_OS_process_wait (proc));
GNUNET_OS_process_destroy (proc);
}
--
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: transport: remove waitpid again to make test run (for now). This is also an attempt to fix the rekey and rekey test.,
gnunet <=