summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/hs_apps/vcl/vcl_test.h3
-rw-r--r--src/plugins/hs_apps/vcl/vcl_test_client.c11
2 files changed, 12 insertions, 2 deletions
diff --git a/src/plugins/hs_apps/vcl/vcl_test.h b/src/plugins/hs_apps/vcl/vcl_test.h
index 4f67e03f72b..d51e204140f 100644
--- a/src/plugins/hs_apps/vcl/vcl_test.h
+++ b/src/plugins/hs_apps/vcl/vcl_test.h
@@ -80,6 +80,7 @@ typedef enum
VCL_TEST_TYPE_UNI,
VCL_TEST_TYPE_BI,
VCL_TEST_TYPE_EXIT,
+ VCL_TEST_TYPE_EXIT_CLIENT,
} vcl_test_t;
typedef enum
@@ -201,7 +202,7 @@ static inline void
vcl_test_cfg_init (vcl_test_cfg_t * cfg)
{
cfg->magic = VCL_TEST_CFG_CTRL_MAGIC;
- cfg->test = VCL_TEST_TYPE_NONE;
+ cfg->test = VCL_TEST_TYPE_UNI;
cfg->ctrl_handle = ~0;
cfg->num_test_sessions = 1;
cfg->num_test_sessions_perq = 1;
diff --git a/src/plugins/hs_apps/vcl/vcl_test_client.c b/src/plugins/hs_apps/vcl/vcl_test_client.c
index 182de8f9015..730df55b016 100644
--- a/src/plugins/hs_apps/vcl/vcl_test_client.c
+++ b/src/plugins/hs_apps/vcl/vcl_test_client.c
@@ -701,7 +701,7 @@ vtc_process_opts (vcl_test_client_main_t * vcm, int argc, char **argv)
int c, v;
opterr = 0;
- while ((c = getopt (argc, argv, "chnp:w:XE:I:N:R:T:UBV6DLs:q:S")) != -1)
+ while ((c = getopt (argc, argv, "chnp:w:xXE:I:N:R:T:UBV6DLs:q:S")) != -1)
switch (c)
{
case 'c':
@@ -759,6 +759,9 @@ vtc_process_opts (vcl_test_client_main_t * vcm, int argc, char **argv)
vcm->post_test = VCL_TEST_TYPE_EXIT;
break;
+ case 'x':
+ vcm->post_test = VCL_TEST_TYPE_NONE;
+
case 'E':
if (strlen (optarg) > ctrl->txbuf_size)
{
@@ -947,6 +950,10 @@ vtc_ctrl_session_exit (void)
vcl_test_session_t *ctrl = &vcm->ctrl_session;
int verbose = ctrl->cfg.verbose;
+ /* Only clients exits, server can accept new connections */
+ if (vcm->post_test == VCL_TEST_TYPE_EXIT_CLIENT)
+ return;
+
ctrl->cfg.test = VCL_TEST_TYPE_EXIT;
vtinf ("(fd %d): Sending exit cfg to server...", ctrl->fd);
if (verbose)
@@ -1027,6 +1034,7 @@ main (int argc, char **argv)
int rv;
vcm->n_workers = 1;
+ vcm->post_test = VCL_TEST_TYPE_EXIT_CLIENT;
vcl_test_cfg_init (&ctrl->cfg);
vcl_test_session_buf_alloc (ctrl);
vtc_process_opts (vcm, argc, argv);
@@ -1082,6 +1090,7 @@ main (int argc, char **argv)
switch (vcm->post_test)
{
case VCL_TEST_TYPE_EXIT:
+ case VCL_TEST_TYPE_EXIT_CLIENT:
switch (ctrl->cfg.test)
{
case VCL_TEST_TYPE_EXIT: