Bug 1212757 - python-M2Crypto MiscSSLClientTestCase.test_server_simple_timeouts test fails with HZ=300
Summary: python-M2Crypto MiscSSLClientTestCase.test_server_simple_timeouts test fails ...
Status: RESOLVED FIXED
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Python (show other bugs)
Version: Current
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Matej Cepl
QA Contact: E-mail List
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-06-27 06:57 UTC by Jiri Slaby
Modified: 2024-07-12 16:31 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jiri Slaby 2023-06-27 06:57:42 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.
Comment 1 Jiri Slaby 2023-06-27 07:47:01 UTC
Reported upstream as:
https://gitlab.com/m2crypto/m2crypto/-/issues/336
Comment 3 OBSbugzilla Bot 2023-06-27 11:35:04 UTC
This is an autogenerated message for OBS integration:
This bug (1212757) was mentioned in
https://build.opensuse.org/request/show/1095581 Factory / python-M2Crypto
Comment 4 OBSbugzilla Bot 2023-07-04 20:15:03 UTC
This is an autogenerated message for OBS integration:
This bug (1212757) was mentioned in
https://build.opensuse.org/request/show/1096850 Factory / python-M2Crypto
Comment 5 Matej Cepl 2023-07-05 08:34:57 UTC
New release created, submitted to Factory.
Comment 9 Maintenance Automation 2024-02-08 12:30:15 UTC
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.
Comment 11 Maintenance Automation 2024-04-26 12:30:05 UTC
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.
Comment 12 Maintenance Automation 2024-07-12 16:31:25 UTC
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.