Signed-off-by: Roman Bogorodskiy <bogorodskiy@gmail.com> --- .../bhyvexml2argv-2-nvme-2-controllers.args | 10 ++++++ .../bhyvexml2argv-2-nvme-2-controllers.ldargs | 4 +++ .../bhyvexml2argv-2-nvme-2-controllers.xml | 21 +++++++++++ tests/bhyvexml2argvtest.c | 1 + .../bhyvexml2xmlout-2-nvme-2-controllers.xml | 36 +++++++++++++++++++ tests/bhyvexml2xmltest.c | 1 + 6 files changed, 73 insertions(+) create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.args create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.ldargs create mode 100644 tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.xml create mode 100644 tests/bhyvexml2xmloutdata/bhyvexml2xmlout-2-nvme-2-controllers.xml diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.args b/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.args new file mode 100644 index 0000000000..664eec99bc --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.args @@ -0,0 +1,10 @@ +bhyve \ +-c 1 \ +-m 214 \ +-u \ +-H \ +-P \ +-s 0:0,hostbridge \ +-s 2:0,nvme,/tmp/freebsd.img \ +-s 3:0,nvme,/tmp/data.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.ldargs b/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.ldargs new file mode 100644 index 0000000000..5905f4b3e6 --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.ldargs @@ -0,0 +1,4 @@ +bhyveload \ +-m 214 \ +-d /tmp/freebsd.img \ +bhyve diff --git a/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.xml b/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.xml new file mode 100644 index 0000000000..30f337197e --- /dev/null +++ b/tests/bhyvexml2argvdata/bhyvexml2argv-2-nvme-2-controllers.xml @@ -0,0 +1,21 @@ +<domain type='bhyve'> + <name>bhyve</name> + <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid> + <memory>219136</memory> + <vcpu>1</vcpu> + <os> + <type>hvm</type> + </os> + <devices> + <disk type='file'> + <driver name='file' type='raw'/> + <source file='/tmp/freebsd.img'/> + <target dev='nvme0n1' bus='nvme'/> + </disk> + <disk type='file'> + <driver name='file' type='raw'/> + <source file='/tmp/data.img'/> + <target dev='nvme1n1' bus='nvme'/> + </disk> + </devices> +</domain> diff --git a/tests/bhyvexml2argvtest.c b/tests/bhyvexml2argvtest.c index 0a5202e425..9d20e5669e 100644 --- a/tests/bhyvexml2argvtest.c +++ b/tests/bhyvexml2argvtest.c @@ -261,6 +261,7 @@ mymain(void) DO_TEST("4-consoles"); DO_TEST_FAILURE("serial-invalid-port"); DO_TEST("nvme"); + DO_TEST("2-nvme-2-controllers"); /* Address allocation tests */ DO_TEST("addr-single-sata-disk"); diff --git a/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-2-nvme-2-controllers.xml b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-2-nvme-2-controllers.xml new file mode 100644 index 0000000000..d0eb9c7fc8 --- /dev/null +++ b/tests/bhyvexml2xmloutdata/bhyvexml2xmlout-2-nvme-2-controllers.xml @@ -0,0 +1,36 @@ +<domain type='bhyve'> + <name>bhyve</name> + <uuid>df3be7e7-a104-11e3-aeb0-50e5492bd3dc</uuid> + <memory unit='KiB'>219136</memory> + <currentMemory unit='KiB'>219136</currentMemory> + <vcpu placement='static'>1</vcpu> + <os> + <type arch='x86_64'>hvm</type> + <boot dev='hd'/> + </os> + <clock offset='utc'/> + <on_poweroff>destroy</on_poweroff> + <on_reboot>restart</on_reboot> + <on_crash>destroy</on_crash> + <devices> + <disk type='file' device='disk'> + <driver name='file' type='raw'/> + <source file='/tmp/freebsd.img'/> + <target dev='nvme0n1' bus='nvme'/> + <address type='drive' controller='0' bus='0' target='0' unit='0'/> + </disk> + <disk type='file' device='disk'> + <driver name='file' type='raw'/> + <source file='/tmp/data.img'/> + <target dev='nvme1n1' bus='nvme'/> + <address type='drive' controller='1' bus='0' target='0' unit='0'/> + </disk> + <controller type='pci' index='0' model='pci-root'/> + <controller type='nvme' index='0'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> + </controller> + <controller type='nvme' index='1'> + <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> + </controller> + </devices> +</domain> diff --git a/tests/bhyvexml2xmltest.c b/tests/bhyvexml2xmltest.c index be69e21484..226eaccc6a 100644 --- a/tests/bhyvexml2xmltest.c +++ b/tests/bhyvexml2xmltest.c @@ -118,6 +118,7 @@ mymain(void) DO_TEST_DIFFERENT("serial-tcp"); DO_TEST_DIFFERENT("4-consoles"); DO_TEST_DIFFERENT("nvme"); + DO_TEST_DIFFERENT("2-nvme-2-controllers"); /* Address allocation tests */ DO_TEST_DIFFERENT("addr-single-sata-disk"); -- 2.51.0