diff --git a/support/testing/tests/core/test_timezone.py b/support/testing/tests/core/test_timezone.py index bf4a47fcde..bfb9604f66 100644 --- a/support/testing/tests/core/test_timezone.py +++ b/support/testing/tests/core/test_timezone.py @@ -9,6 +9,24 @@ def boot_armv5_cpio(emulator, builddir): options=["-initrd", img]) emulator.login() + # emulator.login() sets the emulated system date to the host + # date. In general, this is desirable (for correct SSL certificate + # behaviors, for example). + # + # This timezone runtime test checks that a Buildroot configuration + # is reflected in the generated system at runtime, using the + # standard "date" command. To make sure this test is stable in + # time (i.e. output is independent to the date/time the test is + # executed due to daylight saving time changes), we reset the + # system date to a constant value. + # + # We cannot set the system date to a value less than the system + # uptime. So we cannot set the time back to Unix Epoch with the + # command "date -s @0" (this would result to a EINVAL Invalid + # argument). Instead, we set the time at 1 hour after Epoch. This + # is sufficient as the emulated system takes few seconds to start. + emulator.run("date -s @3600") + class TestNoTimezone(infra.basetest.BRTest): config = infra.basetest.BASIC_TOOLCHAIN_CONFIG + \