From 1f20ef7e0736f8a01937481d61023a068358048e Mon Sep 17 00:00:00 2001 From: Cole Robinson Date: Sun, 27 Feb 2022 13:30:46 -0500 Subject: [PATCH] tests: testdriver: Have all pools use pool- prefix Signed-off-by: Cole Robinson --- ...ml => virt-clone-pool-test-cross-pool.xml} | 0 .../cli/compare/virt-install-many-devices.xml | 4 +- .../data/cli/compare/virt-install-xen-hvm.xml | 2 +- tests/data/testdriver/testdriver.xml | 40 +++++++++---------- tests/test_cli.py | 18 ++++----- tests/test_storage.py | 6 +-- tests/uitests/test_addhardware.py | 2 +- tests/uitests/test_createpool.py | 4 +- tests/uitests/test_createvm.py | 1 + tests/uitests/test_host.py | 2 +- 10 files changed, 40 insertions(+), 39 deletions(-) rename tests/data/cli/compare/{virt-clone-cross-pool.xml => virt-clone-pool-test-cross-pool.xml} (100%) diff --git a/tests/data/cli/compare/virt-clone-cross-pool.xml b/tests/data/cli/compare/virt-clone-pool-test-cross-pool.xml similarity index 100% rename from tests/data/cli/compare/virt-clone-cross-pool.xml rename to tests/data/cli/compare/virt-clone-pool-test-cross-pool.xml diff --git a/tests/data/cli/compare/virt-install-many-devices.xml b/tests/data/cli/compare/virt-install-many-devices.xml index 292750db..088d739c 100644 --- a/tests/data/cli/compare/virt-install-many-devices.xml +++ b/tests/data/cli/compare/virt-install-many-devices.xml @@ -251,7 +251,7 @@ - + 10 @@ -285,7 +285,7 @@ - + diff --git a/tests/data/cli/compare/virt-install-xen-hvm.xml b/tests/data/cli/compare/virt-install-xen-hvm.xml index c30e1141..fadd971a 100644 --- a/tests/data/cli/compare/virt-install-xen-hvm.xml +++ b/tests/data/cli/compare/virt-install-xen-hvm.xml @@ -20,7 +20,7 @@ /usr/lib64/xen/bin/qemu-dm - + diff --git a/tests/data/testdriver/testdriver.xml b/tests/data/testdriver/testdriver.xml index 1fb4b6e9..082ac095 100644 --- a/tests/data/testdriver/testdriver.xml +++ b/tests/data/testdriver/testdriver.xml @@ -261,7 +261,7 @@ Foo bar baz & yeah boii < > yeahfoo - + @@ -903,7 +903,7 @@ test-many-devices, like an alternate RNG, EOL OS ID, title field /usr/lib/xen/bin/qemu-dm - + @@ -1824,7 +1824,7 @@ ba - spurious-slash-pool + pool-test-spurious-slash 35bb2ad9-1122-cdfe-461a-b8907f6e53fe 107374182400 0 @@ -1832,7 +1832,7 @@ ba - /spurious-slash-pool// + /pool-test-spurious-splash// 0700 10736 @@ -1868,7 +1868,7 @@ ba - inactive-pool + pool-test-inactive 35bb2aaa-388a-cdfe-461a-b8907f6e53fe 107374182400 0 @@ -1876,7 +1876,7 @@ ba - /inactive-pool + /pool-test-inactive 0700 10736 @@ -1901,7 +1901,7 @@ ba - cross-pool + pool-test-cross-pool 35bb2ad9-388a-cdfe-461a-b8907f6e5abc 107374182400 0 @@ -1909,7 +1909,7 @@ ba - /dev/cross-pool + /dev/pool-test-cross-pool 0700 10736 @@ -1946,7 +1946,7 @@ ba - full-pool + pool-test-full-pool 35bb2ad9-388a-cdfe-461a-b8907f6e5555 1 1 @@ -1954,7 +1954,7 @@ ba - /full-pool + /pool-test-full-pool 0700 10736 @@ -2062,7 +2062,7 @@ ba - iscsi-pool + pool-iscsi abcdead9-388a-cdfe-461a-b8907f6e5aaa 107374182400 0 @@ -2072,7 +2072,7 @@ ba - /iscsi-pool + /pool-iscsi 0700 10736 @@ -2097,7 +2097,7 @@ ba - iscsi-direct + pool-iscsi-direct 0799697a-94dd-4115-9601-8714b1931248 524287488 524287488 @@ -2125,7 +2125,7 @@ ba - rbd-ceph + pool-rbd-ceph 4bcd023e-990e-fcf6-d95c-52dd0cd938c8 47256127143936 5537792235090 @@ -2165,7 +2165,7 @@ ba - myshpool + pool-sheepdog 581381f8-a13f-4f7c-89b5-9c9b71c64834 107374182400 53687091200 @@ -2194,7 +2194,7 @@ ba - gluster-pool + pool-gluster 7b83ef6d-28da-44f1-841f-2011320f13b0 492258959360 16975638528 @@ -2256,7 +2256,7 @@ ba - zfs + pool-zfs testzfspool @@ -2264,7 +2264,7 @@ ba - nvram + pool-test-nvram @@ -2304,7 +2304,7 @@ ba - mpath + pool-mpath /dev/mapper @@ -2312,7 +2312,7 @@ ba - scsi + pool-scsi diff --git a/tests/test_cli.py b/tests/test_cli.py index 4fe80b85..9f579e8c 100644 --- a/tests/test_cli.py +++ b/tests/test_cli.py @@ -573,11 +573,11 @@ memorytune0.vcpus=0-3,memorytune0.node0.id=0,memorytune0.node0.bandwidth=60 --disk source.file=%(NEWIMG1)s,sparse=false,size=.001,perms=ro,error_policy=enospace,detect_zeroes=unmap,address.type=drive,address.controller=0,address.target=2,address.unit=0 --disk device=cdrom,bus=sata,read_bytes_sec=1,read_iops_sec=2,write_bytes_sec=5,write_iops_sec=6,driver.copy_on_read=on,geometry.cyls=16383,geometry.heads=16,geometry.secs=63,geometry.trans=lba,discard=ignore --disk size=1 ---disk /iscsi-pool/diskvol1,total_bytes_sec=10,total_iops_sec=20,bus=scsi,device=lun,sgio=unfiltered,rawio=yes +--disk /pool-iscsi/diskvol1,total_bytes_sec=10,total_iops_sec=20,bus=scsi,device=lun,sgio=unfiltered,rawio=yes --disk /pool-dir/iso-vol,seclabel.model=dac,seclabel1.model=selinux,seclabel1.relabel=no,seclabel0.label=foo,bar,baz,iotune.read_bytes_sec=1,iotune.read_iops_sec=2,iotune.write_bytes_sec=5,iotune.write_iops_sec=6 --disk /pool-dir/iso-vol,format=qcow2,startup_policy=optional,iotune.total_bytes_sec=10,iotune.total_iops_sec=20, ---disk source_pool=rbd-ceph,source_volume=some-rbd-vol,size=.1,driver_type=raw,driver_name=qemu ---disk pool=rbd-ceph,size=.1,driver.name=qemu,driver.type=raw,driver.discard=unmap,driver.detect_zeroes=unmap,driver.io=native,driver.error_policy=stop +--disk source_pool=pool-rbd-ceph,source_volume=some-rbd-vol,size=.1,driver_type=raw,driver_name=qemu +--disk pool=pool-rbd-ceph,size=.1,driver.name=qemu,driver.type=raw,driver.discard=unmap,driver.detect_zeroes=unmap,driver.io=native,driver.error_policy=stop --disk source_protocol=http,source_host_name=example.com,source_host_port=8000,source_name=/path/to/my/file --disk source.protocol=http,source.host0.name=exampl2.com,source.host.port=8000,source.name=/path/to/my/file --disk source.protocol=nbd,source.host.transport=unix,source.host.socket=/tmp/socket,snapshot_policy=no @@ -585,13 +585,13 @@ memorytune0.vcpus=0-3,memorytune0.node0.id=0,memorytune0.node0.bandwidth=60 --disk gluster://192.168.1.100/test-volume/some/dir/test-gluster.qcow2 --disk nbd+unix:///var/foo/bar/socket,bus=usb,removable=on,address.type=usb,address.bus=0,address.port=2 --disk path=http://[1:2:3:4:1:2:3:4]:5522/my/path?query=foo ---disk vol=gluster-pool/test-gluster.raw +--disk vol=pool-gluster/test-gluster.raw --disk /var,device=floppy,snapshot=no,perms=rw --disk %(NEWIMG2)s,size=1,backing_store=/tmp/foo.img,backing_format=vmdk,bus=usb,target.removable=yes --disk /tmp/brand-new.img,size=1,backing_store=/pool-dir/iso-vol,boot.order=10,boot.loadparm=5 --disk path=/dev/pool-logical/diskvol7,device=lun,bus=scsi,reservations.managed=no,reservations.source.type=unix,reservations.source.path=/var/run/test/pr-helper0.sock,reservations.source.mode=client,\ source.reservations.managed=no,source.reservations.source.type=unix,source.reservations.source.path=/var/run/test/pr-helper0.sock,source.reservations.source.mode=client,target.rotation_rate=6000 ---disk vol=iscsi-direct/unit:0:0:1 +--disk vol=pool-iscsi-direct/unit:0:0:1 --disk size=.0001,format=raw,transient=on,transient.shareBacking=yes --disk size=.0001,pool=pool-logical --disk path=%(EXISTIMG1)s,type=dir @@ -913,7 +913,7 @@ c.add_invalid("--disk %(NEWIMG1)s", grep="Size must be specified") # Not specif c.add_invalid("--disk %(NEWIMG1)s,sparse=true,size=100000000000", grep="The requested volume capacity will exceed") # Fail if fully allocated file would exceed disk space c.add_invalid("--connect %(URI-TEST-FULL)s --disk %(COLLIDE)s --prompt", grep="already in use by other guests") # Colliding storage with --prompt should still fail c.add_invalid("--connect %(URI-TEST-FULL)s --disk /pool-dir/backingl3.img", grep="already in use by other guests") # Colliding storage via backing store -c.add_invalid("--connect %(URI-TEST-FULL)s --disk source_pool=rbd-ceph,source_volume=vol1", grep="already in use by other guests") # Collision with existing VM, via source pool/volume +c.add_invalid("--connect %(URI-TEST-FULL)s --disk source_pool=pool-rbd-ceph,source_volume=vol1", grep="already in use by other guests") # Collision with existing VM, via source pool/volume c.add_invalid("--disk source.pool=pool-dir,source.volume=idontexist", grep="no storage vol with matching name 'idontexist'") # trying to lookup non-existent volume, hit specific error code c.add_invalid("--disk size=1 --seclabel model=foo,type=bar", grep="not appear to have been successful") # Libvirt will error on the invalid security params, which should trigger the code path to clean up the disk images we created. c.add_invalid("--disk size=1 --file foobar", grep="Cannot mix --file") # --disk and --file collision @@ -1198,8 +1198,8 @@ c = vinst.add_category("xen", "--noautoconsole --connect " + utils.URIs.xen) c.add_valid("--disk %(EXISTIMG1)s --location %(TREEDIR)s --paravirt --graphics none") # Xen PV install headless c.add_compare("--disk %(EXISTIMG1)s --import", "xen-default") # Xen default c.add_compare("--disk %(EXISTIMG1)s --location %(TREEDIR)s --paravirt --controller xenbus,maxGrantFrames=64 --input default", "xen-pv", precompare_check="5.3.0") # Xen PV -c.add_compare("--osinfo generic --disk /iscsi-pool/diskvol1 --cdrom %(EXISTIMG1)s --livecd --hvm", "xen-hvm") # Xen HVM -c.add_compare("--osinfo generic --disk /iscsi-pool/diskvol1 --cdrom %(EXISTIMG1)s --install no_install=yes --hvm", "xen-hvm") # Ensure --livecd and --install no_install are essentially identical +c.add_compare("--osinfo generic --disk /pool-iscsi/diskvol1 --cdrom %(EXISTIMG1)s --livecd --hvm", "xen-hvm") # Xen HVM +c.add_compare("--osinfo generic --disk /pool-iscsi/diskvol1 --cdrom %(EXISTIMG1)s --install no_install=yes --hvm", "xen-hvm") # Ensure --livecd and --install no_install are essentially identical @@ -1486,7 +1486,7 @@ c.add_compare("--connect %(URI-KVM-X86)s " + _CLONE_NVRAM_MISSING + " --auto-clo c.add_compare("--connect %(URI-KVM-X86)s -o test-clone -n test-newclone --mac 12:34:56:1A:B2:C3 --mac 12:34:56:1A:B7:C3 --uuid 12345678-12F4-1234-1234-123456789AFA --file /dev/pool-logical/newclone1.img --file /pool-dir/newclone2.img --skip-copy=hdb --force-copy=sdb --file /pool-dir/newclone3.img", "clone-manual") c.add_compare("--connect %(URI-KVM-X86)s -o test-clone -n test-newclone --mac 12:34:56:1A:B2:C3 --mac 12:34:56:1A:B7:C3 --uuid 12345678-12F4-1234-1234-123456789AFA --file /dev/pool-logical/newclone1.img --file /pool-dir/newclone2.img --skip-copy=hdb --force-copy=sdb --file /pool-dir/newclone3.img", "clone-manual") c.add_compare(_CLONE_EMPTY + " --auto-clone --print-xml", "empty") # Auto flag, no storage -c.add_compare("--connect %(URI-KVM-X86)s -o test-clone-simple --auto -f /foo.img --print-xml", "cross-pool") # cross pool cloning which fails with test driver but let's confirm the XML +c.add_compare("--connect %(URI-KVM-X86)s -o test-clone-simple --auto -f /foo.img --print-xml", "pool-test-cross-pool") # cross pool cloning which fails with test driver but let's confirm the XML c.add_compare(_CLONE_MANAGED + " --auto-clone", "auto-managed") # Auto flag w/ managed storage c.add_compare(_CLONE_UNMANAGED + " --auto-clone", "auto-unmanaged") # Auto flag w/ local storage c.add_valid("--connect %(URI-TEST-FULL)s -o test-clone --auto-clone --nonsparse") # Auto flag, actual VM, skip state check diff --git a/tests/test_storage.py b/tests/test_storage.py index 9c9aafbd..4d57079d 100644 --- a/tests/test_storage.py +++ b/tests/test_storage.py @@ -217,7 +217,7 @@ def testMisc(): assert vol.is_size_conflict()[0] is False fullconn = utils.URIs.open_testdriver_cached() - glusterpool = fullconn.storagePoolLookupByName("gluster-pool") + glusterpool = fullconn.storagePoolLookupByName("pool-gluster") diskpool = fullconn.storagePoolLookupByName("pool-logical") glustervol = StorageVolume(fullconn) @@ -232,8 +232,8 @@ def testMisc(): StoragePool.ensure_pool_is_running(glusterpool) # Check pool collision detection - name = StoragePool.find_free_name(fullconn, "gluster-pool") - assert name == "gluster-pool-1" + name = StoragePool.find_free_name(fullconn, "pool-gluster") + assert name == "pool-gluster-1" def testEnumerateLogical(): diff --git a/tests/uitests/test_addhardware.py b/tests/uitests/test_addhardware.py index e2f25741..9af0dc11 100644 --- a/tests/uitests/test_addhardware.py +++ b/tests/uitests/test_addhardware.py @@ -120,7 +120,7 @@ def testAddCephDisk(app): tab.find_fuzzy("Select or create", "radio").click() tab.find("storage-browse", "push button").click() browse = app.root.find("vmm-storage-browser") - browse.find_fuzzy("rbd-ceph", "table cell").bring_on_screen().click() + browse.find_fuzzy("pool-rbd-ceph", "table cell").bring_on_screen().click() browse.find_fuzzy("some-rbd-vol", "table cell").click() browse.find("Choose Volume", "push button").click() _finish(addhw, check=details) diff --git a/tests/uitests/test_createpool.py b/tests/uitests/test_createpool.py index cb7b79e9..e1477c8c 100644 --- a/tests/uitests/test_createpool.py +++ b/tests/uitests/test_createpool.py @@ -75,8 +75,8 @@ def testCreatePools(app): # Test a iscsi pool win = _open_createpool(app, hostwin) win.combo_select("Type:", "iscsi:") - newname = "a-iscsi-pool" - name.set_text("a-iscsi-pool") + newname = "a-pool-iscsi" + name.set_text("a-pool-iscsi") win.find("target-browse").click() _browse_local_path("Choose target directory", "by-path") finish.click() diff --git a/tests/uitests/test_createvm.py b/tests/uitests/test_createvm.py index 048c37d6..8df7e457 100644 --- a/tests/uitests/test_createvm.py +++ b/tests/uitests/test_createvm.py @@ -118,6 +118,7 @@ def testNewVMMultiConnection(app): _forward(newvm) cdrom.click_combo_entry() lib.utils.check(lambda: "/dev/sr1" not in cdrom.fmt_nodes()) + app.rawinput.pressKey("Escape") newvm.find_fuzzy("install-iso-browse", "button").click() browsewin = app.root.find("vmm-storage-browser") lib.utils.check(lambda: "pool-logical" not in browsewin.fmt_nodes()) diff --git a/tests/uitests/test_host.py b/tests/uitests/test_host.py index 57d8307b..4f3aca9e 100644 --- a/tests/uitests/test_host.py +++ b/tests/uitests/test_host.py @@ -101,7 +101,7 @@ def testHostStorageEdit(app): lib.utils.check(lambda: poolloc.text == newpath) # Rename it - win.find("default", "table cell").click() + win.find("pool-dir", "table cell").click() win.find("pool-name").set_text("newsort-default") finish.click()