See https://github.com/dotnet/runtime/pull/90935#issuecomment-1690112995 for context. The test should be added to dotnet/sdk repo. dotnet/runtime infrastructure is not setup for tests like that.