x64-upstream: Add unit tests related code