qemu.tests: Add a subtest tsc_drift

Use taskset to set the CPU affinity of tsc read program in both guest and host.
Make the code easy to read and drop the tsc list for both guest and host.
Signed-off-by: Amos Kong <akong@redhat.com>

Use more reasonable varialbe name and optimize the code path.
Signed-off-by: Jason Wang <jasowang@redhat.com>

Convert tsc_drift ratio to absolute value
If tsc_drift ratio is a large negative, case could not raise exception.

Signed-off-by: Amos Kong <akong@redhat.com>

Filter integer from the return value of get_tsc

If the return value of get_tsc() contains other string, it will fail to convert
the return value to float. Use re.findall('(\d+)',o)[0] to filter tsc value.

Signed-off-by: Amos Kong <akong@redhat.com>

tsc_drift: Fix a bug of set CPU affinity

We need set process running on a single processor. There is a misunderstand of
mask and cpulist.
 "taskset 1 command": command will execute on CPU0 or CPU1, not only CPU1
 "taskset -c 1 command": command will only execute on CPU1

Signed-off-by: Amos Kong <akong@redhat.com>
Reported-by: Shuxi Shang <sshang@redhat.com>

Update interface to fit the new framework

Signed-off-by: Feng Yang <fyang@redhat.com>
Signed-off-by: Yiqiao Pu <ypu@redhat.com>