Fix test failures and avoid overlong paths
Fix test failure for WINAPI_FAMILY