Hi, Looking at how to fix a test failure on an ARMv7 box [1] I looked at the log rotation code in varnishncsa and noticed it didn't flush before closing the file.
Comments ? Regarding the failing test, I think it's a simpler matter of time-sensitive testing on a slow box. I will increase the delays and see whether it still fails. Best Regards, Dridi [1] http://jenkins.varnish-cache.org/view/varnish-master/job/varnish-master-gitbuild-armv7l/202/console
From 2bf5d515d188e1cde72633cc939c45ab003a08de Mon Sep 17 00:00:00 2001 From: Dridi Boukelmoune <[email protected]> Date: Wed, 17 Jun 2015 15:10:31 +0200 Subject: [PATCH] Flush varnishncsa output during rotations --- bin/varnishncsa/varnishncsa.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/bin/varnishncsa/varnishncsa.c b/bin/varnishncsa/varnishncsa.c index 257a39d..3b65ae2 100644 --- a/bin/varnishncsa/varnishncsa.c +++ b/bin/varnishncsa/varnishncsa.c @@ -162,24 +162,26 @@ openout(int append) } static int __match_proto__(VUT_cb_f) -rotateout(void) +flushout(void) { - AN(CTX.w_arg); - AN(CTX.fo); - fclose(CTX.fo); - openout(1); AN(CTX.fo); + if (fflush(CTX.fo)) + return (-5); return (0); } static int __match_proto__(VUT_cb_f) -flushout(void) +rotateout(void) { + AN(CTX.w_arg); + AN(CTX.fo); + if (flushout()) + VUT_Error(0, "Log overrun"); + fclose(CTX.fo); + openout(1); AN(CTX.fo); - if (fflush(CTX.fo)) - return (-5); return (0); } -- 2.1.0
_______________________________________________ varnish-dev mailing list [email protected] https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev
