[master] b7fe401 Try to get at least a little coverage on varnishtop

Poul-Henning Kamp phk at FreeBSD.org
Thu Jan 5 16:11:05 CET 2017


commit b7fe4019f19c6a30db74a6b43c51b09f06d74361
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Thu Jan 5 15:10:02 2017 +0000

    Try to get at least a little coverage on varnishtop

diff --git a/bin/varnishtest/programs.h b/bin/varnishtest/programs.h
index f7ffbf9..1bc85c8 100644
--- a/bin/varnishtest/programs.h
+++ b/bin/varnishtest/programs.h
@@ -27,9 +27,11 @@
  *
  */
 
-VTC_PROG(varnishd)
 VTC_PROG(varnishadm)
-VTC_PROG(varnishstat)
+VTC_PROG(varnishd)
 VTC_PROG(varnishhist)
 VTC_PROG(varnishlog)
 VTC_PROG(varnishncsa)
+VTC_PROG(varnishstat)
+VTC_PROG(varnishtop)
+#undef VTC_PROG
diff --git a/bin/varnishtest/tests/u00004.vtc b/bin/varnishtest/tests/u00004.vtc
new file mode 100644
index 0000000..561672f
--- /dev/null
+++ b/bin/varnishtest/tests/u00004.vtc
@@ -0,0 +1,19 @@
+varnishtest "varnishtop coverage"
+
+server s1 {
+	rxreq
+	txresp
+} -start
+
+varnish v1 -vcl+backend "" -start
+
+process p1 {varnishtop -1 -n ${v1_name} > /dev/null} -start
+
+client c1 {
+	txreq
+	rxresp
+} -run
+
+process p1 -wait
+
+process p2 {varnishtop -1 -n ${v1_name} > /dev/null} -start -wait
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index 2f44f4a..8f9284a 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -384,7 +384,7 @@ i_mode(void)
 		sep = ":";						\
 	} while (0);
 #include "programs.h"
-#undef VTC_PROG
+
 	VSB_printf(vsb, ":%s", getenv("PATH"));
 	AZ(VSB_finish(vsb));
 



More information about the varnish-commit mailing list