From: Francesco Chemolli Date: Mon, 2 Mar 2020 16:00:49 +0000 (+0000) Subject: Change time_units test to also work on 32bit systems (#563) X-Git-Tag: 4.15-20210522-snapshot~160 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=aa4214e50d5a2025082761bee1420c94b536cadb;p=thirdparty%2Fsquid.git Change time_units test to also work on 32bit systems (#563) With a 64-bit maximum value, "make check" failed on 32-bit platforms (e.g., arm7l) with: configuration error: directive supports time values up to 2147483647 but is given 9223372036 seconds --- diff --git a/test-suite/squidconf/time_units b/test-suite/squidconf/time_units index 34f3a48da0..71f224b478 100644 --- a/test-suite/squidconf/time_units +++ b/test-suite/squidconf/time_units @@ -14,7 +14,7 @@ dns_timeout 1 millisecond dns_timeout 0.001 second -# maximum checks +# check support for the maximum value (expressed in each supported time unit) dns_timeout 9223372036854 milliseconds dns_timeout 9223372036 seconds dns_timeout 153722867 minutes @@ -33,16 +33,18 @@ dns_timeout 29.227 decades max_stale 1 second max_stale 0.0167 minute -# maximum checks -max_stale 9223372036 seconds -max_stale 153722867 minutes -max_stale 2562047 hours -max_stale 106751 days -max_stale 15250 weeks -max_stale 7625 fortnights -max_stale 3558 months -max_stale 292.27 years -max_stale 29.227 decades +# check support for the maximum value (expressed in each supported time unit) +# XXX: Use a 32-bit maximum to avoid breaking tests on 32-bit platforms. +# TODO: Generate these test lines based on the target build platform. +max_stale 2147483647 seconds # 2^31-1 +max_stale 35791394 minutes # floor(max_stale seconds/60) +max_stale 596523 hours # floor(max_stale minutes/60) +max_stale 24855 days # floor(max_stale hours/24) +max_stale 3550 weeks # floor(max_stale days/7) +max_stale 1775 fortnights # floor(max_stale weeks/2) +max_stale 828.5 months # max_stale days/30 +max_stale 68.04 years # approx(max_stale days/365.2522) +max_stale 6.804 decades # max_stale years/10 # a multiple-options parameter