[6.0] b875f4d68 Document -need-bytes and implement an optional '+' prefix to require new bytes to be received.

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Wed Oct 31 13:08:12 UTC 2018


commit b875f4d68e52e372eb7689d1d3134573a7db5437
Author: Poul-Henning Kamp <phk at FreeBSD.org>
Date:   Tue Sep 4 08:01:59 2018 +0000

    Document -need-bytes and implement an optional '+' prefix to
    require new bytes to be received.

diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c
index 95f6c0517..5f5cd2a86 100644
--- a/bin/varnishtest/vtc_process.c
+++ b/bin/varnishtest/vtc_process.c
@@ -894,6 +894,10 @@ process_close(struct process *p)
  * \-writehex HEXSTRING
  *	Same as -write but interpreted as hexadecimal bytes.
  *
+ * \-need-bytes [+]NUMBER
+ *	Wait until at least NUMBER bytes have been received in total.
+ *	If '+' is prefixed, NUMBER new bytes must be received.
+ *
  * \-expect-text LIN COL PAT
  *	Wait for PAT to appear at LIN,COL on the virtual screen.
  *	Lines and columns are numbered 1...N
@@ -998,6 +1002,8 @@ cmd_process(CMD_ARGS)
 		}
 		if (!strcmp(*av, "-need-bytes")) {
 			u = strtoumax(av[1], NULL, 0);
+			if (av[1][0] == '+')
+				u += p->stdout_bytes;
 			av++;
 			do {
 				AZ(pthread_mutex_lock(&p->mtx));


More information about the varnish-commit mailing list