[libvirt] the test-file

hello,everyone: If I want to add a new CPU model ,the test-file x86_64-cpuid-*-host.xml , x86_64-cpuid-*-guest.xml ,x86_64-cpuid-*-json.xml and x86_64-cpuid-*.sig how to generate in the /tests/cputestdata/ ? ________________________________ Leo-Hou@hotmail.com

Hi.
hello,everyone: If I want to add a new CPU model ,the test-file x86_64-cpuid-*-host.xml , x86_64-cpuid-*-guest.xml ,x86_64-cpuid-*-json.xml and x86_64-cpuid-*.sig how to generate in the /tests/cputestdata/ ?
The steps to add a new CPU data test case is to run the cpu-gather.sh script in tests/cputestdata directory on the host with the CPU you want to add to the test suite (remember to have recent QEMU and cpuid tool installed). The you can run (the host doesn't matter in this step) the cpu-parse.sh script in the same directory and pass it the data from the cpu-gather.sh script (if you do both on the same host, you can run ./cpu-gather.sh | ./cpu-parse.sh). This will create the input data files. In the next step, you add a corresponding test case to cputest.c and run "VIR_TEST_REGENERATE_OUTPUT=1 tests/cputest" command which will generate the output data files (that is the ones you're asking about). As the final step you should check the generated files make sense and send a patch with all changes and the generated files. Jirka

Hi.
hello,everyone: > If I want to add a new CPU model ,the test-file x86_64-cpuid-*-host.xml , x86_64-cpuid-*-guest.xml ,x86_64-cpuid-*-json.xml and x86_64-cpuid->> *.sig how to generate in the /tests/cputestdata/ ? The steps to add a new CPU data test case is to run the cpu-gather.sh script in tests/cputestdata directory on the host with the CPU you want to add to the test suite (remember to have recent QEMU and cpuid tool installed). The you can run (the host doesn't matter in this step) the cpu-parse.sh script in the same directory and pass it the data from the cpu-gather.sh script (if you do both on the same host, you can run ./cpu-gather.sh | ./cpu-parse.sh). This will create the input data files. In the next step, you add a corresponding test case to cputest.c and run "VIR_TEST_REGENERATE_OUTPUT=1 tests/cputest" command which will generate the output data files (that is the ones you're asking about). As the final step you should check the generated files make sense and send a patch with all changes and the generated files. Jirka
Hi Mr Jiri Denemark . Thank you very much for answering my question.With these steps I generated a series of files. Thanks! leo
participants (2)
-
Jiri Denemark
-
Leo Hou