[PATCH v2 7/8] Add unit test for network backed NVRAM
Peter Krempa
pkrempa at redhat.com
Thu Apr 21 15:09:22 UTC 2022
On Fri, Apr 08, 2022 at 10:48:50 -0700, Rohit Kumar wrote:
> This patch adds unit test for network backed NVRAM
>
> Example:
> <nvram type='network'>
> <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool/0'>
> <host name='example.com' port='6000'/>
> </source>
> </nvram>
>
> Signed-off-by: Prerna Saxena <prerna.saxena at nutanix.com>
> Signed-off-by: Florian Schmidt <flosch at nutanix.com>
> Signed-off-by: Rohit Kumar <rohit.kumar3 at nutanix.com>
> ---
> .../bios-nvram-network.x86_64-latest.args | 37 +++++++++++++++++++
> tests/qemuxml2argvdata/bios-nvram-network.xml | 25 +++++++++++++
> tests/qemuxml2argvtest.c | 1 +
> 3 files changed, 63 insertions(+)
> create mode 100644 tests/qemuxml2argvdata/bios-nvram-network.x86_64-latest.args
> create mode 100644 tests/qemuxml2argvdata/bios-nvram-network.xml
>
> diff --git a/tests/qemuxml2argvdata/bios-nvram-network.xml b/tests/qemuxml2argvdata/bios-nvram-network.xml
> new file mode 100644
> index 0000000000..ffc590ddfa
> --- /dev/null
> +++ b/tests/qemuxml2argvdata/bios-nvram-network.xml
> @@ -0,0 +1,25 @@
> +<domain type='qemu'>
> + <name>test-bios</name>
> + <uuid>362d1fc1-df7d-193e-5c18-49a71bd1da66</uuid>
> + <memory unit='KiB'>1048576</memory>
> + <currentMemory unit='KiB'>1048576</currentMemory>
> + <vcpu placement='static'>1</vcpu>
> + <os>
> + <type arch='x86_64' machine='pc'>hvm</type>
> + <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
> + <nvram type='network'>
> + <source protocol='iscsi' name='iqn.2013-07.com.example:iscsi-nopool'>
> + <host name='example.com' port='6000'/>
> + </source>
> + </nvram>
> + <boot dev='hd'/>
> + <bootmenu enable='yes'/>
> + </os>
> + <features>
> + <acpi/>
> + </features>
> + <clock offset='utc'/>
> + <devices>
> + <emulator>/usr/bin/qemu-system-x86_64</emulator>
> + </devices>
> +</domain>
> diff --git a/tests/qemuxml2argvtest.c b/tests/qemuxml2argvtest.c
> index ed41b7a7a2..7700ed6cb1 100644
> --- a/tests/qemuxml2argvtest.c
> +++ b/tests/qemuxml2argvtest.c
> @@ -1198,6 +1198,7 @@ mymain(void)
> QEMU_CAPS_ICH9_AHCI,
> QEMU_CAPS_VIRTIO_SCSI);
> DO_TEST_CAPS_LATEST("bios-nvram-template");
> + DO_TEST_CAPS_LATEST("bios-nvram-network");
>
> /* Make sure all combinations of ACPI and UEFI behave as expected */
> DO_TEST_NOCAPS("q35-acpi-uefi");
You'll also need to add qemuxml2xmltest variants of this test and also
for the one in 8/8.
Do you want to use this with iSCSI or did you pick this just as an
example?
More information about the libvir-list
mailing list