The platform layer currently contains:
- basic, essential helpers like
CxPlatAlloc
- higher level abstraction like datapaths, storage
This is problematic when writing unit tests for the core layer since higher level abstraction (especially I/O related one) should be mocked for a unit test, but basic helpers are still needed.
By splitting essential helpers in a different lib from more specific ones, unit tests will be able to link only what they need.
The issue described below was found when trying to write unit tests for QuicLibraryLookupBinding, where calls to QuicBindingGetLocalAddress -> CxPlatSocketGetLocalAddress call in the datapath layer and need to be mocked.