test_sqlite3.test_dbapi: test_deserialize_too_much_data_64bit uses undefined size (and requires 24 Exabytes of RAM) #93117
Copy link
Copy link
Closed
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Description
Bug report
In a755124 (GH-26728, v3.11.0a7), @erlend-aasland added a test_deserialize_too_much_data_64bit, which would instantly raise a NameError for size if run:
cpython/Lib/test/test_sqlite3/test_dbapi.py
Lines 629 to 634 in b2694ab
| @unittest.skipUnless(sys.maxsize > 2**32, 'requires 64bit platform') | |
| @bigmemtest(size=2**63, memuse=3, dry_run=False) | |
| def test_deserialize_too_much_data_64bit(self): | |
| with memory_database() as cx: | |
| with self.assertRaisesRegex(OverflowError, "'data' is too large"): | |
| cx.deserialize(b"b" * size) |
...however, it's never actually run, because it's skipped on machines with less than 24 Exabytes (!) of RAM:
test_deserialize_too_much_data_64bit (test.test_sqlite3.test_dbapi.SerializeTests.test_deserialize_too_much_data_64bit) ... skipped 'not enough memory: 25769803776.0G minimum needed'
(Found by running flake8 over Lib/ out of curiosity, see #93010 (comment))
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
testsTests in the Lib/test dirTests in the Lib/test dirtopic-sqlite3type-bugAn unexpected behavior, bug, or errorAn unexpected behavior, bug, or error
Projects
- StatusShow more project fieldsDone
Activity
erlend-aasland commentedon May 23, 2022
Thanks for the report! Do you want to propose a PR, @The-Compiler?
The-Compiler commentedon May 23, 2022
I'm afraid I have no idea how a proper fix would look like. Is the test really supposed to need exabytes of RAM? If so, it should probably just be removed altogether?
pythongh-93117: Use correct size for sqlite3 deserialize bigmem test
erlend-aasland commentedon May 25, 2022
The test is not needed; see Serhiy's comment: #93154 (comment)
gh-93117: Remove too large sqlite3 bigmemtest (#93154)