Bugzilla – Bug 1212757
python-M2Crypto MiscSSLClientTestCase.test_server_simple_timeouts test fails with HZ=300
Last modified: 2024-07-12 16:31:25 UTC
Since: commit 9b7c6456219c3c1d32b6dc5fb9f0f7a8a60d8a35 Author: Dirk Müller <dmueller@suse.com> Date: Fri May 12 09:49:25 2023 +0200 config: align all architectures on CONFIG_HZ=300 (bsc#1196438) we set HZ to 300. That (apparently) breaks the MiscSSLClientTestCase.test_server_simple_timeouts test of python-M2Crypto: > self = <tests.test_ssl.MiscSSLClientTestCase testMethod=test_server_simple_timeouts> > > def test_server_simple_timeouts(self): > pid = self.start_server(self.args) > # Arbitrary value: > test_timeout_sec = 909 > # Linux rounds microseconds in the timeouts up to the HZ kernel parameter. > # Windows rounds down to milliseconds. > # To avoid checking for rounded values, pick interval long enough > # so that it is a whole number of ms and HZ for any reasonable HZ value. > test_timeout_microsec = 500000 > > try: > with self.assertRaises(ValueError): > SSL.Context('tlsv5') > ctx = SSL.Context() > s = SSL.Connection(ctx) > > r = s.get_socket_read_timeout() > w = s.get_socket_write_timeout() > self.assertEqual(r.sec, 0, r.sec) > self.assertEqual(r.microsec, 0, r.microsec) > self.assertEqual(w.sec, 0, w.sec) > self.assertEqual(w.microsec, 0, w.microsec) > > s.set_socket_read_timeout(SSL.timeout()) > s.set_socket_write_timeout(SSL.timeout(test_timeout_sec, test_timeout_microsec)) > r = s.get_socket_read_timeout() > w = s.get_socket_write_timeout() > self.assertEqual(r.sec, DEFAULT_TIMEOUT, r.sec) > self.assertEqual(r.microsec, 0, r.microsec) > self.assertEqual(w.sec, test_timeout_sec, w.sec) > -> self.assertEqual(w.microsec, test_timeout_microsec, w.microsec) > E AssertionError: 503333 != 500000 : 503333 In the above, it says: > # To avoid checking for rounded values, pick interval long enough > # so that it is a whole number of ms and HZ for any reasonable HZ value. but with HZ=300, it does not hold. The value rounded up to the next tick is really 0.503333 s. The test should be fixed.
Reported upstream as: https://gitlab.com/m2crypto/m2crypto/-/issues/336
FWIW, it's in: https://build.opensuse.org/request/show/1095360 currently staged at: https://build.opensuse.org/project/show/openSUSE:Factory:Staging:M
This is an autogenerated message for OBS integration: This bug (1212757) was mentioned in https://build.opensuse.org/request/show/1095581 Factory / python-M2Crypto
This is an autogenerated message for OBS integration: This bug (1212757) was mentioned in https://build.opensuse.org/request/show/1096850 Factory / python-M2Crypto
New release created, submitted to Factory.
SUSE-RU-2024:0424-1: An update that has three fixes can now be installed. Category: recommended (moderate) Bug References: 1205042, 1212757, 1217782 Sources used: openSUSE Leap 15.4 (src): python3-M2Crypto-0.38.0-150400.10.1 openSUSE Leap Micro 5.3 (src): python3-M2Crypto-0.38.0-150400.10.1 openSUSE Leap Micro 5.4 (src): python3-M2Crypto-0.38.0-150400.10.1 openSUSE Leap 15.5 (src): python3-M2Crypto-0.38.0-150400.10.1 SUSE Linux Enterprise Micro for Rancher 5.3 (src): python3-M2Crypto-0.38.0-150400.10.1 SUSE Linux Enterprise Micro 5.3 (src): python3-M2Crypto-0.38.0-150400.10.1 SUSE Linux Enterprise Micro for Rancher 5.4 (src): python3-M2Crypto-0.38.0-150400.10.1 SUSE Linux Enterprise Micro 5.4 (src): python3-M2Crypto-0.38.0-150400.10.1 SUSE Linux Enterprise Micro 5.5 (src): python3-M2Crypto-0.38.0-150400.10.1 Basesystem Module 15-SP5 (src): python3-M2Crypto-0.38.0-150400.10.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-FU-2024:1448-1: An update that solves one vulnerability, contains one feature and has two fixes can now be installed. Category: feature (low) Bug References: 1205042, 1212757, 1217782 CVE References: CVE-2020-25657 Jira References: PED-68 Maintenance Incident: [SUSE:Maintenance:33320](https://smelt.suse.de/incident/33320/) Sources used: openSUSE Leap 15.4 (src): python-M2Crypto-0.40.0-150400.3.9.1 openSUSE Leap 15.5 (src): python-M2Crypto-0.40.0-150400.3.9.1 Python 3 Module 15-SP5 (src): python-M2Crypto-0.40.0-150400.3.9.1 SUSE Linux Enterprise High Performance Computing ESPOS 15 SP4 (src): python-M2Crypto-0.40.0-150400.3.9.1 SUSE Linux Enterprise High Performance Computing LTSS 15 SP4 (src): python-M2Crypto-0.40.0-150400.3.9.1 SUSE Linux Enterprise Desktop 15 SP4 LTSS 15-SP4 (src): python-M2Crypto-0.40.0-150400.3.9.1 SUSE Linux Enterprise Server 15 SP4 LTSS 15-SP4 (src): python-M2Crypto-0.40.0-150400.3.9.1 SUSE Linux Enterprise Server for SAP Applications 15 SP4 (src): python-M2Crypto-0.40.0-150400.3.9.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.
SUSE-RU-2024:0424-2: An update that has three fixes can now be installed. Category: recommended (moderate) Bug References: 1205042, 1212757, 1217782 Maintenance Incident: [SUSE:Maintenance:32248](https://smelt.suse.de/incident/32248/) Sources used: SUSE Linux Enterprise Micro 5.5 (src): python3-M2Crypto-0.38.0-150400.10.1 NOTE: This line indicates an update has been released for the listed product(s). At times this might be only a partial fix. If you have questions please reach out to maintenance coordination.