]> git.ipfire.org Git - thirdparty/squid.git/blob - test-suite/squidconf/time_units
Source Format Enforcement (#763)
[thirdparty/squid.git] / test-suite / squidconf / time_units
1 ## Copyright (C) 1996-2021 The Squid Software Foundation and contributors
2 ##
3 ## Squid software is distributed under GPLv2+ license and includes
4 ## contributions from numerous individuals and organizations.
5 ## Please see the COPYING and CONTRIBUTORS files for details.
6
7 #
8 # Tests for directives with time units
9 #
10
11 # a millisecond-precision parameter (time-units)
12
13 # minimum checks
14 dns_timeout 1 millisecond
15 dns_timeout 0.001 second
16
17 # check support for the maximum value (expressed in each supported time unit)
18 dns_timeout 9223372036854 milliseconds
19 dns_timeout 9223372036 seconds
20 dns_timeout 153722867 minutes
21 dns_timeout 2562047 hours
22 dns_timeout 106751 days
23 dns_timeout 15250 weeks
24 dns_timeout 7625 fortnights
25 dns_timeout 3558 months
26 dns_timeout 292.27 years
27 dns_timeout 29.227 decades
28
29
30 # a second-precision parameter (time-units)
31
32 # minimum checks
33 max_stale 1 second
34 max_stale 0.0167 minute
35
36 # check support for the maximum value (expressed in each supported time unit)
37 # XXX: Use a 32-bit maximum to avoid breaking tests on 32-bit platforms.
38 # TODO: Generate these test lines based on the target build platform.
39 max_stale 2147483647 seconds # 2^31-1
40 max_stale 35791394 minutes # floor(max_stale seconds/60)
41 max_stale 596523 hours # floor(max_stale minutes/60)
42 max_stale 24855 days # floor(max_stale hours/24)
43 max_stale 3550 weeks # floor(max_stale days/7)
44 max_stale 1775 fortnights # floor(max_stale weeks/2)
45 max_stale 828.5 months # max_stale days/30
46 max_stale 68.04 years # approx(max_stale days/365.2522)
47 max_stale 6.804 decades # max_stale years/10
48
49 # a multiple-options parameter
50
51 url_rewrite_timeout 1 second on_timeout=bypass
52 url_rewrite_timeout 0.001 year on_timeout=bypass
53 url_rewrite_timeout 292 year on_timeout=bypass
54
55 # should be a WARNING (-k parse)
56 url_rewrite_timeout 1 on_timeout=bypass
57
58 # TODO: a nanosecond-precison parameter (time-units-small)
59