Issue #25622: Merge ctypes test from 3.4 into 3.5