diff mbox series

[07/11] time64.inc: add a comment about how to simulate Y2038

Message ID 20230426095036.2632847-7-alex@linutronix.de
State New
Headers show
Series [01/11] binutils: backport a patch to address failures when time64.inc is in use | expand

Commit Message

Alexander Kanavin April 26, 2023, 9:50 a.m. UTC
Setting clock to 2040 causes the following ptest failures on qemux86:

{'perl': ['t/op/magic', 'lib/File/stat', 'ext/POSIX/t/time']}
{'python3': ['test_create_server_ssl_verified',
             'test_create_unix_server_ssl_verified',
             'test_local_good_hostname']}
{'dbus': ['dbus/test-relay_with_config.test',
          'dbus/test-misc-internals.test',
          'dbus/test-corrupt.test',
          'dbus/test-loopback_with_config.test',
          'dbus/test-relay.test',
          'dbus/test-misc-internals_with_config.test',
          'dbus/test-loopback.test',
          'dbus/test-fdpass_with_config.test',
          'dbus/test-corrupt_with_config.test',
          'dbus/test-fdpass.test']}
{'openssl': ['Dubious,_test_returned_5', 'Dubious,_test_returned_1']}
{'glibc-tests': ['/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-utimes',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-utimensat',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-utime',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-timespec_get',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-timer4',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-stat',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-sigtimedwait',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-settimeofday',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-sem5',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-select',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-scm_rights',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-rwlock14',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-ppoll',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-ntp_gettimex',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-ntp_gettime',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-ntp_adjtime',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-mtx-timedlock',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-mqueue8',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-mqueue2',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-mqueue10',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-mqueue1',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-lutimes',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-lchmod',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-futimesat',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-futimes',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-futimens',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-fts',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-fcntl',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-cond11',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-cnd-timedwait',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-clock_settime',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-clock_adjtime',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-clock',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-aio6',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-adjtimex',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/ftwtest',
                 '/usr/lib/glibc-tests/ptest/tests/glibc-ptest/tst-lchmod-time64']}
{'openssh': ['key_options']}
{'curl': ['test_0031',
          'test_0046',
          'test_0053',
          'test_0061',
          'test_0062',
          'test_0172',
          'test_0179',
          'test_0327',
          'test_0329',
          'test_0420',
          'test_1104',
          'test_1216',
          'test_1415']}
{'glib-2.0': ['glib/asyncqueue.test',
              'glib/module-test-plugin.test',
              'glib/file.test',
              'glib/fileutils.test',
              'glib/module-test-library.test']}
{'gstreamer1.0': ['gstreamer/elements_multiqueue.test']} (may be flaky)
{'tcl': ['cmdAH.test', 'interp.test']}
{'libmodule-build-perl': ['t/compat']}

Some ptests fail on qemux86-64 as well:
{'curl': ['test_0031',
          'test_0046',
          'test_0053',
          'test_0061',
          'test_0062',
          'test_0172',
          'test_0179',
          'test_0327',
          'test_0329',
          'test_0420',
          'test_1104',
          'test_1216',
          'test_1415']}
{'python3': ['test_create_server_ssl_verified',
             'test_create_unix_server_ssl_verified',
             'test_local_good_hostname']}
{'openssh': ['key_options']}
{'openssl': ['Dubious,_test_returned_5', 'Dubious,_test_returned_1']}
{'tcl': ['interp.test']}
{'python3-cryptography': ['tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_smime_sign_detached',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_pem',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_alternate_digests_der[hash_alg0-\\x06\\t`\\x86H\\x01e\\x03\\x04\\x02\\x01]',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_alternate_digests_der[hash_alg1-\\x06\\t`\\x86H\\x01e\\x03\\x04\\x02\\x02]',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_alternate_digests_der[hash_alg2-\\x06\\t`\\x86H\\x01e\\x03\\x04\\x02\\x03]',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_attached',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_binary',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_smime_canonicalization',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_text',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_no_capabilities',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_sign_no_attributes',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_multiple_signers',
                          'tests/hazmat/primitives/test_pkcs7.py:TestPKCS7Builder.test_multiple_signers_different_hash_algs']}

Note that setting the year to 2035 resolves almost all of the above,
as onl the following then fail:

qemux86:
{'python3': ['test_local_good_hostname']}
{'curl': ['test_0420']}

qemux86-64:
{'python3': ['test_local_good_hostname']}
{'curl': ['test_0420']}

Signed-off-by: Alexander Kanavin <alex@linutronix.de>
---
 meta/conf/distro/include/time64.inc | 10 ++++++++++
 1 file changed, 10 insertions(+)
diff mbox series

Patch

diff --git a/meta/conf/distro/include/time64.inc b/meta/conf/distro/include/time64.inc
index 73adebd39db..f3bdfba4acf 100644
--- a/meta/conf/distro/include/time64.inc
+++ b/meta/conf/distro/include/time64.inc
@@ -1,3 +1,13 @@ 
+# To simulate Y2038 occurring, add to your build configuration:
+# QB_OPT_APPEND:append = " -rtc base=2040-02-02"
+#
+# Note that this does result in ptest failures on qemux86:
+# perl python3 dbus openssl glibc-tests openssh curl glib-2.0 tcl libmodule-build-perl
+# and a subset of those occurs in qemux86-64 as well:
+# curl python3 openssl openssl tcl python3-cryptography
+#
+# Working to address those (before Y2038 rolls in) will be appreciated.
+
 GLIBC_64BIT_TIME_FLAGS = " -D_TIME_BITS=64 -D_FILE_OFFSET_BITS=64"
 
 # Only needed for some 32-bit architectures, some relatively newer