General Motors has received a permit from local authorities to test its Level 4 autonomous vehicles in Shanghai.