aboutsummaryrefslogtreecommitdiff
path: root/src/testing/testing_api_loop.c
diff options
context:
space:
mode:
authorChristian Grothoff <grothoff@gnunet.org>2023-08-15 20:27:00 +0200
committerChristian Grothoff <grothoff@gnunet.org>2023-08-15 20:27:00 +0200
commitc132968605dd3e824765e4c1154840f9659a3e70 (patch)
tree506466ebd07ca40ed933077d77ceedf6a147362e /src/testing/testing_api_loop.c
parent18d7c03a819667823e7022e3260078ca7ace4df1 (diff)
downloadgnunet-c132968605dd3e824765e4c1154840f9659a3e70.tar.gz
gnunet-c132968605dd3e824765e4c1154840f9659a3e70.zip
assert run is non-null for most cmds, except end
Diffstat (limited to 'src/testing/testing_api_loop.c')
-rw-r--r--src/testing/testing_api_loop.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/src/testing/testing_api_loop.c b/src/testing/testing_api_loop.c
index f53e1ecdb..0110f2cc9 100644
--- a/src/testing/testing_api_loop.c
+++ b/src/testing/testing_api_loop.c
@@ -611,12 +611,24 @@ GNUNET_TESTING_command_new (void *cls,
611 .cleanup = cleanup, 611 .cleanup = cleanup,
612 .traits = traits 612 .traits = traits
613 }; 613 };
614 memset (&cmd.label, 0, sizeof (cmd.label));
615 if (NULL != label)
616 strncpy (cmd.label, label, GNUNET_TESTING_CMD_MAX_LABEL_LENGTH);
617 614
615 GNUNET_assert (NULL != run);
616 if (NULL != label)
617 strncpy (cmd.label,
618 label,
619 GNUNET_TESTING_CMD_MAX_LABEL_LENGTH);
618 return cmd; 620 return cmd;
621}
622
623
624struct GNUNET_TESTING_Command
625GNUNET_TESTING_cmd_end (void)
626{
627 struct GNUNET_TESTING_Command cmd = {
628 .run = NULL
629 };
619 630
631 return cmd;
620} 632}
621 633
622 634