autotest/virt-test — pull request #436 by ypu (2013-05-20 08:38:33+00:00)
Title: 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

Use more reasonable varialbe name and optimize the code path.
Signed-off-by: Jason Wang

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

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

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
Reported-by: Shuxi Shang

Update interface to fit the new framework

Signed-off-by: Feng Yang
Signed-off-by: Yiqiao Pu