[master] 06047a0 Delay must be followed by a number
Federico G. Schwindt
fgsch at lodoss.net
Sun Apr 30 01:24:06 CEST 2017
commit 06047a0a84a63a40ba330883247fa87b69fe2cde
Author: Federico G. Schwindt <fgsch at lodoss.net>
Date: Sun Apr 30 00:21:47 2017 +0100
Delay must be followed by a number
diff --git a/bin/varnishtest/tests/b00026.vtc b/bin/varnishtest/tests/b00026.vtc
index 2f5915f..48fce00 100644
--- a/bin/varnishtest/tests/b00026.vtc
+++ b/bin/varnishtest/tests/b00026.vtc
@@ -5,13 +5,13 @@ feature SO_RCVTIMEO_WORKS
server s1 {
rxreq
expect req.url == "from_backend"
- delay 1;
+ delay 1
txresp
} -start
server s2 {
rxreq
expect req.url == "from_vcl"
- delay 1.5;
+ delay 1.5
txresp
} -start
diff --git a/bin/varnishtest/vtc.c b/bin/varnishtest/vtc.c
index 76f5706..0934661 100644
--- a/bin/varnishtest/vtc.c
+++ b/bin/varnishtest/vtc.c
@@ -33,6 +33,9 @@
#include <ctype.h>
#include <errno.h>
+#include <grp.h>
+#include <math.h>
+#include <pwd.h>
#include <signal.h>
#include <stdarg.h>
#include <stdint.h>
@@ -40,8 +43,6 @@
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
-#include <pwd.h>
-#include <grp.h>
#include "vtc.h"
@@ -656,6 +657,8 @@ cmd_delay(CMD_ARGS)
AN(av[1]);
AZ(av[2]);
f = VNUM(av[1]);
+ if (isnan(f))
+ vtc_fatal(vl, "Syntax error in number (%s)", av[1]);
vtc_log(vl, 3, "delaying %g second(s)", f);
VTIM_sleep(f);
}
More information about the varnish-commit
mailing list