Skip to content

Use "BSP" lock to protect UtAssert globals #1061

@jphickey

Description

@jphickey

Is your feature request related to a problem? Please describe.
As originally noted in #955, the UtAssert global data structures are not protected against concurrent modification by multiple test threads.

UtAssert* functions should not be invoked from child threads, but many tests do this anyway. Although no observed failures can be traced directly to this, it is not correct.

Describe the solution you'd like
The BSP lock that was originally implemented to clean up console output can also serve to protect these data structures. This lock can make it so UtAssert calls can be safely done from any test thread.

Describe alternatives you've considered
The tests which use child tasks could be redesigned to only assert from the main thread, but this can be difficult to do in some cases.

Additional context
This is the second half of the request in #955, split into a separate work item. Adding a mutex around the modifications is lower risk than changing the internal data structure initialization, and they can be implemented separately.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions