diff --git a/guest-test/guest.test_launcher.sh b/guest-test/guest.test_launcher.sh index 2c5a05a..ae091c5 100755 --- a/guest-test/guest.test_launcher.sh +++ b/guest-test/guest.test_launcher.sh @@ -63,6 +63,7 @@ NOTE!! args passed here will override params in qemu.confg.json -c guest kernel extra commandline -p guest pmu off/on -g [optional, default off] code coverage test mode off/on + -i [optional] path under guest-test to standalone common.json file -j [optional] path under guest-test to standalone qemu.config.json file -h HELP info EOF @@ -105,7 +106,7 @@ echo PORT="$PORT" > "$SCRIPT_DIR"/test_params.py # used across test_launcher.sh, qemu_runner.py, test_executor.sh # get args for QEMU boot configurable parameters -while getopts :v:s:m:d:t:x:c:p:g:j:h arg; do +while getopts :v:s:m:d:t:x:c:p:g:i:j:h arg; do case $arg in v) VCPU=$OPTARG @@ -143,9 +144,13 @@ while getopts :v:s:m:d:t:x:c:p:g:j:h arg; do GCOV=$OPTARG echo GCOV="\"$GCOV\"" >> "$SCRIPT_DIR"/test_params.py ;; + i) + JSON_C=$OPTARG + echo JSON_C="\"$JSON_C\"" >> "$SCRIPT_DIR"/test_params.py + ;; j) - JSON=$OPTARG - echo JSON="\"$JSON\"" >> "$SCRIPT_DIR"/test_params.py + JSON_Q=$OPTARG + echo JSON_Q="\"$JSON_Q\"" >> "$SCRIPT_DIR"/test_params.py ;; h) usage && exit 0 diff --git a/guest-test/osv_sanity/common.json b/guest-test/osv_sanity/common.json new file mode 100644 index 0000000..04d92b0 --- /dev/null +++ b/guest-test/osv_sanity/common.json @@ -0,0 +1,10 @@ +{ + "kernel_img": "/boot/vmlinuz-xxx-yyy", + "initrd_img": "/boot/initramfs-xxx-yyy", + "bios_img": "/path/to/EDKII/OVMF.fd or other virtual BIOS", + "qemu_img": "/path/to/qemu-kvm with proper capabilty of VM test", + "guest_img": "/path/to/prepared/guest_os_image, in qcow2 or raw image format", + "guest_img_format": "raw", + "boot_pattern": "*Kernel*on*an*x86_64*", + "guest_root_passwd": "123456" +} \ No newline at end of file diff --git a/guest-test/osv_sanity/qemu.config.default.json b/guest-test/osv_sanity/qemu.config.default.json index 786d085..5815926 100644 --- a/guest-test/osv_sanity/qemu.config.default.json +++ b/guest-test/osv_sanity/qemu.config.default.json @@ -1,13 +1,5 @@ { "common": { - "kernel_img": "/boot/vmlinuz-xxx-yyy", - "initrd_img": "/boot/initramfs-xxx-yyy", - "bios_img": "/path/to/EDKII/OVMF.fd or other virtual BIOS", - "qemu_img": "/path/to/qemu-kvm with proper capabilty of VM test", - "guest_img": "/path/to/prepared/guest_os_image, in qcow2 or raw image format", - "guest_img_format": "raw", - "boot_pattern": "*Kernel*on*an*x86_64*", - "guest_root_passwd": "123456", "vm_type": "tdx", "pmu": "off", "cpus": "4", diff --git a/guest-test/osv_sanity/test_2.1.1.4 b/guest-test/osv_sanity/test_2.1.1.4 index e839ae8..dc4337a 100755 --- a/guest-test/osv_sanity/test_2.1.1.4 +++ b/guest-test/osv_sanity/test_2.1.1.4 @@ -1,4 +1,4 @@ # Create TDX guest with default qemu config and check TSC value on guest -guest.test_launcher.sh -v 1 -s 1 -m 4 -d on -t tdx -x TD_TSC_DEFAULT -p off -j "osv_sanity/qemu.config.default.json" +guest.test_launcher.sh -v 1 -s 1 -m 4 -d on -t tdx -x TD_TSC_DEFAULT -p off -i "osv_sanity/common.json" -j "osv_sanity/qemu.config.default.json" # Create TDX guest with tsc-freq specified qemu config and check TSC value on guest -guest.test_launcher.sh -v 1 -s 1 -m 4 -d on -t tdx -x TD_TSC_CONFIG -p off -j "osv_sanity/qemu.config.tsc.json" \ No newline at end of file +guest.test_launcher.sh -v 1 -s 1 -m 4 -d on -t tdx -x TD_TSC_CONFIG -p off -i "osv_santiy/common.json" -j "osv_sanity/qemu.config.tsc.json" \ No newline at end of file