The kernel accepts a maxcpus=? parameter to restrict how many "cores" it uses - whether hiperthread or "real" core, you have no control over.
Personally when testing like this I prefer to turn hiperthreading off in the BIOS (if you can), and then change the number of "cores" on eacch reboot. Then turn it on and try again. If you have cgroups active, you can better control which "core" you allow for testing based on the specific test process(es).