[SERVER-54187] Tests should not create invalid binary data Created: 01/Feb/21  Updated: 29/Oct/23  Resolved: 23/Aug/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Matthew Russotto Assignee: Adi Zaimi
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Repl 2021-08-23, Repl 2021-09-06
Participants:
Linked BF Score: 17

 Description   

Certain tests create BinData fields of subtype 2,3, or 4 without meeting the requirements of those fields. Bindata types 3 and 4 are UUID and must be 16 bytes long. BinData type 2 is a deprecated type which must start with a 4-byte length equal to the length of the rest of the field. The server and the shell do not check this, but the Python driver does; the C driver at least checks type 2. If invalid entries are in the database, our python test fixtures will fail if they ever see them, so these must be removed.

These invalid entries exist at least in

jstests/core/bindata_eq.js
jstests/core/in_with_mixed_values.js
jstests/core/bittest.js

The UUIDs BinData(3, "OEJTfmD8twzaj/LPKLIVkA==") in jstests/core/binData.js and BinData(4, "QlLfPHTySm6tqfuV+EOsVA==") in http://morningstar/mongodb/source/jstests/auth/kill_cursors.js are valid.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 23/Aug/21 ]

Author:

{'name': 'Adi Zaimi', 'email': 'adizaimi@yahoo.com', 'username': 'adizaimi'}

Message: SERVER-54187 Have valid BinData in tests

Some tests had invalid type 2, 3, and 4 BinData which was causing
some python scripts to fail during testing. This checkin replaces
the invalid data with valid ones so there should be no more of
such failures.
Branch: master
https://github.com/mongodb/mongo/commit/9c650b1b90d19b2122b856b3fbcb3976f2a03c07

Generated at Thu Feb 08 05:32:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.