gnunet-svn
[Top][All Lists]
Advanced

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

[taler-exchange] 01/02: have benchmark driver also launch auditor


From: gnunet
Subject: [taler-exchange] 01/02: have benchmark driver also launch auditor
Date: Thu, 19 Mar 2020 16:59:55 +0100

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

grothoff pushed a commit to branch master
in repository exchange.

commit 85f603090be497aba01dd74cef844b65cc60372d
Author: Christian Grothoff <address@hidden>
AuthorDate: Thu Mar 19 16:14:01 2020 +0100

    have benchmark driver also launch auditor
---
 doc/prebuilt                             |  2 +-
 src/benchmark/taler-exchange-benchmark.c | 42 ++++++++++++++++++++++++++++++++
 src/lib/auditor_api_handle.c             |  1 +
 3 files changed, 44 insertions(+), 1 deletion(-)

diff --git a/doc/prebuilt b/doc/prebuilt
index ca53235c..934a6a18 160000
--- a/doc/prebuilt
+++ b/doc/prebuilt
@@ -1 +1 @@
-Subproject commit ca53235ccfa0458ebf11c204888ca370e20ec3f5
+Subproject commit 934a6a18301e81c4fd1b3a8cda2dc13dca4741cc
diff --git a/src/benchmark/taler-exchange-benchmark.c 
b/src/benchmark/taler-exchange-benchmark.c
index fa2e34ff..5deb5f58 100644
--- a/src/benchmark/taler-exchange-benchmark.c
+++ b/src/benchmark/taler-exchange-benchmark.c
@@ -475,6 +475,7 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
   pid_t cpids[howmany_clients];
   pid_t fakebank = -1;
   int wstatus;
+  struct GNUNET_OS_Process *auditord = NULL;
   struct GNUNET_OS_Process *exchanged = NULL;
   struct GNUNET_OS_Process *wirewatch = NULL;
   struct GNUNET_OS_Process *exchange_slave = NULL;
@@ -522,6 +523,30 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
                0);
       return 77;
     }
+    /* start auditor */
+    auditord = GNUNET_OS_start_process (GNUNET_NO,
+                                        GNUNET_OS_INHERIT_STD_ALL,
+                                        NULL, NULL, NULL,
+                                        "taler-auditor-httpd",
+                                        "taler-auditor-httpd",
+                                        "-c", config_file,
+                                        NULL);
+    if (NULL == auditord)
+    {
+      GNUNET_OS_process_kill (exchanged,
+                              SIGTERM);
+      if (MODE_BOTH == mode)
+      {
+        GNUNET_assert (-1 != fakebank);
+        kill (fakebank,
+              SIGTERM);
+        waitpid (fakebank,
+                 &wstatus,
+                 0);
+      }
+      GNUNET_OS_process_destroy (exchanged);
+      return 77;
+    }
     /* start exchange wirewatch */
     wirewatch = GNUNET_OS_start_process (GNUNET_NO,
                                          GNUNET_OS_INHERIT_STD_ALL,
@@ -532,6 +557,8 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
                                          NULL);
     if (NULL == wirewatch)
     {
+      GNUNET_OS_process_kill (auditord,
+                              SIGTERM);
       GNUNET_OS_process_kill (exchanged,
                               SIGTERM);
       if (MODE_BOTH == mode)
@@ -607,6 +634,13 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
       GNUNET_OS_process_wait (wirewatch);
       GNUNET_OS_process_destroy (wirewatch);
     }
+    if (NULL != auditord)
+    {
+      GNUNET_OS_process_kill (auditord,
+                              SIGTERM);
+      GNUNET_OS_process_wait (auditord);
+      GNUNET_OS_process_destroy (auditord);
+    }
     return 77;
   }
   if ( (MODE_CLIENT == mode) || (MODE_BOTH == mode) )
@@ -696,6 +730,7 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
   {
     GNUNET_assert (NULL != wirewatch);
     GNUNET_assert (NULL != exchanged);
+    GNUNET_assert (NULL != auditord);
     /* stop wirewatch */
     GNUNET_break (0 ==
                   GNUNET_OS_process_kill (wirewatch,
@@ -703,6 +738,13 @@ parallel_benchmark (TALER_TESTING_Main main_cb,
     GNUNET_break (GNUNET_OK ==
                   GNUNET_OS_process_wait (wirewatch));
     GNUNET_OS_process_destroy (wirewatch);
+    /* stop auditor */
+    GNUNET_break (0 ==
+                  GNUNET_OS_process_kill (auditord,
+                                          SIGTERM));
+    GNUNET_break (GNUNET_OK ==
+                  GNUNET_OS_process_wait (auditord));
+    GNUNET_OS_process_destroy (auditord);
     /* stop exchange */
     GNUNET_break (0 ==
                   GNUNET_OS_process_kill (exchanged,
diff --git a/src/lib/auditor_api_handle.c b/src/lib/auditor_api_handle.c
index 85f42c3f..bc36fc91 100644
--- a/src/lib/auditor_api_handle.c
+++ b/src/lib/auditor_api_handle.c
@@ -470,6 +470,7 @@ request_version (void *cls)
   struct VersionRequest *vr;
   CURL *eh;
 
+  abort ();
   auditor->retry_task = NULL;
   GNUNET_assert (NULL == auditor->vr);
   vr = GNUNET_new (struct VersionRequest);

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



reply via email to

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