[CDRIVER-4151] Incorrect Test Registration with Static TestFnCtx Created: 08/Sep/21  Updated: 28/Oct/23  Resolved: 09/Sep/21

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.20.0

Type: Bug Priority: Major - P3
Reporter: Ezra Chung Assignee: Ezra Chung
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Problem/Incident
is caused by CDRIVER-3632 Fix unresolved pedantic warnings Closed

 Description   

TestSuite_Add() and TestSuite_AddLive() are expected to be called with several TestFunc objects to register a test function with the provided test suite. However, the static TestFnCtx ctx; generated by TestSuite_AddFullWithTestFn() is modified on each call, affecting the shared state of the ctx registered in each Test object set in _V_TestSuite_AddFull().



 Comments   
Comment by Githook User [ 09/Sep/21 ]

Author:

{'name': 'Ezra Chung', 'email': '88335979+eramongodb@users.noreply.github.com', 'username': 'eramongodb'}

Message: CDRIVER-4151 Replace static TestFnCtx with allocated object (#865)
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/8fcceb5c1245ad37d20a46391051ccce5a461384

Generated at Wed Feb 07 21:20:05 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.