[master] 7d97972 Qualify the -C test-vcl name with the PID of the process, so two concurrent -C tests don't collided.
Poul-Henning Kamp
phk at FreeBSD.org
Mon Jan 18 15:38:05 CET 2016
commit 7d979720f14d7c22a5a3b3498fa4dd173af94958
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date: Mon Jan 18 14:37:24 2016 +0000
Qualify the -C test-vcl name with the PID of the process, so two
concurrent -C tests don't collided.
Problem spotted by: fgs
diff --git a/bin/varnishd/mgt/mgt_vcl.c b/bin/varnishd/mgt/mgt_vcl.c
index 46359df..b651f83 100644
--- a/bin/varnishd/mgt/mgt_vcl.c
+++ b/bin/varnishd/mgt/mgt_vcl.c
@@ -170,11 +170,14 @@ mgt_new_vcl(struct cli *cli, const char *vclname, const char *vclsrc,
unsigned status;
char *lib, *p;
struct vclprog *vp;
+ char buf[32];
AN(cli);
- if (C_flag)
- vclname = ".Cflagtest";
+ if (C_flag) {
+ bprintf(buf, ".CflagTest.%d", (int)getpid());
+ vclname = buf;
+ }
if (state == NULL)
state = "auto";
@@ -190,6 +193,7 @@ mgt_new_vcl(struct cli *cli, const char *vclname, const char *vclsrc,
if (lib == NULL)
return;
+ AZ(C_flag);
vp = mgt_vcl_add(vclname, lib, state);
free(lib);
More information about the varnish-commit
mailing list