Spdk/test/vhost/readonly/test_plan.md
Pawel Niedzwiecki 30dbca865b test/vhost: test for the vhost-blk readonly feature.
Change-Id: I5dde0555bd7d0e03dea3779dfd59c13ece92696a
Signed-off-by: Pawel Niedzwiecki <pawelx.niedzwiecki@intel.com>
Reviewed-on: https://review.gerrithub.io/382835
Tested-by: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Reviewed-by: Daniel Verkamp <daniel.verkamp@intel.com>
2017-12-08 14:08:58 -05:00

1.2 KiB

vhost-block readonly feature test plan

Objective

Vhost block controllers can be created with readonly feature which prevents any write operations on this device. The purpose of this test is to verify proper operation of this feature.

Test cases description

To test readonly feature, this test will create normal vhost-blk controller with NVMe device and on a VM it will create and mount a partition to which it will copy a file. Next it will poweroff a VM, remove vhost controller and create new readonly vhost-blk controller with the same device.

Test cases

blk_ro_tc1

  1. Start vhost
  2. Create vhost-blk controller with NVMe device and readonly feature disabled using RPC
  3. Run VM with attached vhost-blk controller
  4. Check visibility of readonly flag using lsblk, fdisk
  5. Create new partition
  6. Create new file on new partition
  7. Shutdown VM, remove vhost controller
  8. Create vhost-blk with previously used NVMe device and readonly feature now enabled using RPC
  9. Run VM with attached vhost-blk controller
  10. Check visibility of readonly flag using lsblk, fdisk
  11. Try to delete previous file
  12. Try to create new file
  13. Try to remove partition
  14. Repeat steps 2 to 4
  15. Remove file from disk, delete partition
  16. Shutdown VM, exit vhost