Move patching testsuite to core
Get rid of compile warnings