[master] ae34324de Document -need-bytes and implement an optional '+' prefix to require new bytes to be received.
Poul-Henning Kamp
phk at FreeBSD.org
Tue Sep 4 08:06:10 UTC 2018
commit ae34324de1f739b303ac5be0c18a0c36d6bc9574
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