kumquat-buildroot/support/testing/tests
Romain Naour c0dcefa7ba support/testing: TestNoTimezone: fix the test case for Glibc
We have changed to a Glibc based toolchain recently [1] but the
behavior of TZ handling is not the same between libc implementation
when no Zone Database is installed.

musl and uClibc-ng return "UTC" when the data file of the requested
time zone is missing or when TZ is not set.

 # TZ=America/Los_Angeles date +%Z
 UTC

 # TZ= date +%Z
 UTC

Glibc return all or part of TZ content or "Universal" if TZ is empty.

 # TZ=America/Los_Angeles date +%Z
 America

 # TZ= date +%Z
 Universal

As demonstrated by TestAllTimezone, Glibc return "PDT" when the
America/Los_Angeles time zone data file is installed:

 # TZ=America/Los_Angeles date +%Z
 PDT

Since the Glibc behavior seems weird (not a bug [2]) when TZ is
set but the time zone data file is missing, update our test
to check against a string defined in the Glibc code [3].

[1] f89f52168f
[2] https://sourceware.org/bugzilla/show_bug.cgi?id=30710
[3] https://sourceware.org/git/?p=glibc.git;a=blob;f=time/tzset.c;h=78c18f8147415c92dc6eb735be672fa7e0b8f76e;hb=47b76f6d1d3a5ad13e585dbcc616aaea62b8bb20#l380

Ref:
https://www.gnu.org/software/libc/manual/html_node/TZ-Variable.html

Fixe:
https://gitlab.com/buildroot.org/buildroot/-/jobs/4768561117

Signed-off-by: Romain Naour <romain.naour@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2023-08-01 23:15:18 +02:00
..
boot support/testing: override the EDK2 CPU hotplug bug check 2023-07-29 11:00:56 +02:00
core support/testing: TestNoTimezone: fix the test case for Glibc 2023-08-01 23:15:18 +02:00
download boot, package, support, toolchain: switch to 2 spaces for the hash file 2022-07-28 23:05:23 +02:00
fs support/testing: override the EDK2 CPU hotplug bug check 2023-07-29 11:00:56 +02:00
init support/testing: TestSELinuxSystemd{Ext4, Squashfs} add midding libelf kernel dependency 2023-07-30 12:10:32 +02:00
package support/testing/tests/package/test_fluidsynth.py: new runtime test 2023-07-30 12:59:01 +02:00
toolchain toolchain/toolchain-external/toolchain-external-bootlin: update to 2022.08 2023-02-06 22:26:24 +01:00
utils support/testing: complete the grammar fix 2023-04-23 21:53:02 +02:00
__init__.py