What CPU do you want to test?
There is no way to test CPU other than inserting it in its socket and testing the whole system for its proper functionlity.
So you want to check internal blocks of CPU for proper functionality? I think that is difficult. If your ALU is faulty, most of the things you process will give you errorneous results. May be this a check for fualty ALU. But to check each and every section will be difficult.
I would get some benchmarking utility, or a piece of burn-in software. The benchmark should give some error or crash if there is a problem, and burn in software, which is designed to push a processor to the max for an extended period of time to ensure it works all right should also fail with a fault software.
Search for prime95 and sisoft sandra to name a few.