kumquat-buildroot/support/testing/tests/core
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
..
br2-external/detect-bad-arch support/testing/tests: add test for check_bin_arch 2021-08-29 11:37:32 +02:00
cpeid-br2-external package: drop _CPE_ID_VALID, use _CPE_ID_VENDOR 2021-03-06 17:18:07 +01:00
rootfs-overlay1
rootfs-overlay2/etc
test_selinux support/testing/tests/core/test_selinux: new tests for the packages SELinux functionalities 2020-10-06 15:30:12 +02:00
__init__.py
device_table2.txt support/testing: add test for file capabilities 2018-08-10 08:25:51 +02:00
post-build.sh tests: add test for post-fakeroot script 2018-01-15 21:37:45 +01:00
post-fakeroot.sh tests: add test for post-fakeroot script 2018-01-15 21:37:45 +01:00
post-image.sh tests: add test for post-fakeroot script 2018-01-15 21:37:45 +01:00
squashfs-xattr-kernel.config support/testing: add test for file capabilities 2018-08-10 08:25:51 +02:00
test_bad_arch.py support: fix flake8 error E741 ambiguous variable name 2021-10-18 22:31:11 +02:00
test_cpeid.py package: drop _CPE_ID_VALID, use _CPE_ID_VENDOR 2021-03-06 17:18:07 +01:00
test_file_capabilities.py support/testing: test_file_capabilities: bump to kernel 4.19.204 2021-09-21 22:19:04 +02:00
test_hardening.py support/testing: test_hardening disable PIC/PIE 2021-05-18 22:15:36 +02:00
test_post_scripts.py support/testing: switch to Python 3 only 2019-10-28 22:14:07 +01:00
test_root_password.py support/testing: new test for root password 2019-08-13 22:30:41 +02:00
test_rootfs_overlay.py support/testing: fix code style 2017-10-06 18:56:49 +02:00
test_selinux.py support/testing/tests: fix flake8 warnings 2020-11-06 08:11:25 +01:00
test_timezone.py support/testing: TestNoTimezone: fix the test case for Glibc 2023-08-01 23:15:18 +02:00