diff options
-rw-r--r-- | Dockerfile.i386 | 9 | ||||
-rw-r--r-- | sites/www/changelog.rst | 2 | ||||
-rw-r--r-- | tests/test_transport.py | 9 |
3 files changed, 12 insertions, 8 deletions
diff --git a/Dockerfile.i386 b/Dockerfile.i386 index 76418ced..645ddf64 100644 --- a/Dockerfile.i386 +++ b/Dockerfile.i386 @@ -1,10 +1,9 @@ -# Convenience tool for testing a 32-bit related security flaw. May be -# generalized in future to be more useful; until then, it is NOT -# officially supported but purely a maintainer-facing artifact. +# Convenience tool for testing 32-bit issues. This is NOT officially supported; +# it is purely a maintainer-facing artifact. -FROM --platform=i386 i386/alpine:3.15 +FROM --platform=i386 i386/alpine:3.17 -RUN apk add openssl-dev python3-dev libffi-dev make cargo +RUN apk add openssl-dev python3-dev libffi-dev make cargo bash RUN python3 -m venv env RUN env/bin/pip install -U pip diff --git a/sites/www/changelog.rst b/sites/www/changelog.rst index 00f42a70..3f886fc8 100644 --- a/sites/www/changelog.rst +++ b/sites/www/changelog.rst @@ -2,6 +2,8 @@ Changelog ========= +- :bug:`2353` Fix a 64-bit-ism in the test suite so the tests don't encounter a + false negative on 32-bit systems. Reported by Stanislav Levin. - :release:`3.4.0 <2023-12-18>` - :feature:`-` `Transport` grew a new ``packetizer_class`` kwarg for overriding the packet-handler class used internally. Mostly for testing, but advanced diff --git a/tests/test_transport.py b/tests/test_transport.py index 67e2eb45..59f871b8 100644 --- a/tests/test_transport.py +++ b/tests/test_transport.py @@ -1419,16 +1419,19 @@ class TestStrictKex: def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) # Induce an about-to-rollover seqno, such that it rolls over - # during initial kex. + # during initial kex. (Sequence numbers are uint32, so we need + # the largest possible 32bit integer such that incrementing it + # will roll over to 0.) + last_seq = 2**32 - 1 setattr( self.packetizer, "_Packetizer__sequence_number_in", - sys.maxsize, + last_seq, ) setattr( self.packetizer, "_Packetizer__sequence_number_out", - sys.maxsize, + last_seq, ) with raises( |