[master] db49f013b varnishtest: Turn vtc_maxdur into a vtim_dur

Dridi Boukelmoune dridi.boukelmoune at gmail.com
Mon Jan 30 16:55:06 UTC 2023


commit db49f013b8f9eedd336e29c29a3166189a400869
Author: Dridi Boukelmoune <dridi.boukelmoune at gmail.com>
Date:   Fri Jul 29 17:58:24 2022 +0200

    varnishtest: Turn vtc_maxdur into a vtim_dur
    
    We already pass it to VEV and VCLI subsystems in places where a
    double is expected.
    
    Trivia: we currently parse it in two distinct ways. So for now I'm
    not eager to support duration units.

diff --git a/bin/varnishtest/vtc.h b/bin/varnishtest/vtc.h
index 55d28b351..0c33f1adf 100644
--- a/bin/varnishtest/vtc.h
+++ b/bin/varnishtest/vtc.h
@@ -76,7 +76,7 @@ extern volatile sig_atomic_t vtc_error; /* Error, bail out */
 extern int vtc_stop;		/* Abandon current test, no error */
 extern pthread_t	vtc_thread;
 extern int iflg;
-extern unsigned vtc_maxdur;
+extern vtim_dur vtc_maxdur;
 extern char *vmod_path;
 extern struct vsb *params_vsb;
 extern int leave_temp;
diff --git a/bin/varnishtest/vtc_main.c b/bin/varnishtest/vtc_main.c
index c61fecc8d..92f0add1c 100644
--- a/bin/varnishtest/vtc_main.c
+++ b/bin/varnishtest/vtc_main.c
@@ -94,7 +94,7 @@ struct vtc_job {
 
 
 int iflg = 0;
-unsigned vtc_maxdur = 60;
+vtim_dur vtc_maxdur = 60;
 static unsigned vtc_bufsiz = 1024 * 1024;
 
 static VTAILQ_HEAD(, vtc_tst) tst_head = VTAILQ_HEAD_INITIALIZER(tst_head);


More information about the varnish-commit mailing list