Skip to content
Permalink
Browse files

Also reset global cmds like barrier

  • Loading branch information...
bsdphk committed Mar 15, 2019
1 parent de3e581 commit 861606d3f3f7fb0ada893eac9392073d367f9acc
Showing with 15 additions and 14 deletions.
  1. +15 −14 bin/varnishtest/vtc.c
@@ -65,6 +65,8 @@ vtc_vrnd_unlock(void)
AZ(pthread_mutex_unlock(&vtc_vrnd_mtx));
}

static const char *tfn;

/**********************************************************************
* Macro facility
*/
@@ -79,6 +81,18 @@ struct macro {

static VTAILQ_HEAD(,macro) macro_list = VTAILQ_HEAD_INITIALIZER(macro_list);

static const struct cmds global_cmds[] = {
#define CMD_GLOBAL(n) { #n, cmd_##n },
#include "cmds.h"
{ NULL, NULL }
};

static const struct cmds cmds[] = {
#define CMD_TOP(n) { #n, cmd_##n },
#include "cmds.h"
{ NULL, NULL }
};

/**********************************************************************/

static struct macro *
@@ -290,12 +304,6 @@ macro_expand(struct vtclog *vl, const char *text)
* Static checkers like Coverity may bitch about this, but we don't care.
*/

static const struct cmds global_cmds[] = {
#define CMD_GLOBAL(n) { #n, cmd_##n },
#include "cmds.h"
{ NULL, NULL }
};


void
parse_string(const char *spec, const struct cmds *cmd, void *priv,
@@ -448,14 +456,6 @@ reset_cmds(const struct cmds *cmd)
* Execute a file
*/

static const struct cmds cmds[] = {
#define CMD_TOP(n) { #n, cmd_##n },
#include "cmds.h"
{ NULL, NULL }
};

static const char *tfn;

int
fail_out(void)
{
@@ -470,6 +470,7 @@ fail_out(void)
if (!vtc_stop)
vtc_stop = 1;
vtc_log(vltop, 1, "RESETTING after %s", tfn);
reset_cmds(global_cmds);
reset_cmds(cmds);
vtc_error |= old_err;

0 comments on commit 861606d

Please sign in to comment.
You can’t perform that action at this time.