Skip to content

Commit

Permalink
Merge pull request #172 from hamistao/test_handling_vms_with_long_names
Browse files Browse the repository at this point in the history
Add tests for handling disk devices with long names
  • Loading branch information
tomponline authored Jun 10, 2024
2 parents da77e27 + 351b7f3 commit 7667abf
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/storage-disks-vm
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,19 @@ waitInstanceReady v1
lxc exec v1 -- ls -l /mnt/foo1
lxc stop -f v1

# Check adding a disk to a vm with a long name to test possible problems with long socket paths or long qemu device tags
LONG_DEVICE_NAME="device-with-very-long-name-for-long-qemu-property-handling-test"

lxc init "${IMAGE}" v2 --vm
lxc config device add v2 "${LONG_DEVICE_NAME}" disk source="${testRoot}/allowed1" path="/mnt/bar1"
lxc start v2
waitInstanceReady v2
lxc exec v2 -- mountpoint /mnt/bar
lxc config device remove v2 "${LONG_DEVICE_NAME}"
lxc config device add v2 "${LONG_DEVICE_NAME}" disk source="${testRoot}/allowed1" path="/mnt/bar2" # Test hotplugging as well
lxc exec v2 -- mountpoint /mnt/bar
lxc delete -f v2

# Check adding a disk with a source path that is allowed that symlinks to another allowed source path isn't
# allowed at start time.
lxc config device set v1 d1 source="${testRoot}/allowed1/not-allowed2"
Expand Down

0 comments on commit 7667abf

Please sign in to comment.