[master] 6f7af3a5a varnishtest: make process -expect-text on the same scale as vX

Nils Goroll nils.goroll at uplex.de
Tue Apr 14 22:28:07 UTC 2020


commit 6f7af3a5a6c99a943c7f016a18a7b7d6c9693d22
Author: Marco Benatto <mbenatto at redhat.com>
Date:   Tue Apr 14 14:06:20 2020 -0300

    varnishtest: make process -expect-text on the same scale as vX
    
    Currently on process pX -expect-text varnishtest uses at most
    300000 us pauses. This make it offscale when compared on what
    varnish vX -expect does by trying 50 times with 100us pause
    in a total of 5s.
    
    Chaning term_expect_text() wait 3s before failing avoid tests
    to cause false positive under stress (i.e.: r02990) but putting
    process pX -expect-text and varnish vX -expect at the same time
    scale.
    
    Signed-off-by: Marco Benatto <mbenatto at redhat.com>

diff --git a/bin/varnishtest/vtc_process.c b/bin/varnishtest/vtc_process.c
index 24f7bab0b..f8ad2baa8 100644
--- a/bin/varnishtest/vtc_process.c
+++ b/bin/varnishtest/vtc_process.c
@@ -313,7 +313,7 @@ term_expect_text(struct process *pp,
 		AZ(pthread_mutex_unlock(&pp->mtx));
 		usleep(d);
 		AZ(pthread_mutex_lock(&pp->mtx));
-		if (d < 300000)
+		if (d < 3000000)
 			d += d;
 	}
 	AZ(pthread_mutex_unlock(&pp->mtx));


More information about the varnish-commit mailing list