Commit 2af753e
committed
test: skip lj-1470 test for unconfigured timezones
`os.time()` uses `mktime()` to specify time by the given table.
`mktime()` produces the call to `tzset()` to determine the system's
timezone. If the TZ variable does not appear in the environment, the
system timezone is used. The system timezone is configured by copying,
or linking, a file in the tzfile(5) format to /etc/localtime. So, if
this file is omitted (like in RED OS), the errno is set to a non-zero
value. This leads to the nil returned by the `os.time()` for -1 time
value.
This patch skips the test if this file is missed to be sure that we
don't obtain any false positive failures due to system
misconfigurations.1 parent ec9d188 commit 2af753e
1 file changed
Lines changed: 19 additions & 1 deletion
Lines changed: 19 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
3 | 19 | | |
4 | 20 | | |
5 | 21 | | |
6 | | - | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
7 | 25 | | |
8 | 26 | | |
9 | 27 | | |
| |||
0 commit comments