vmm, tests: Make specifying a size optional for virtio-pmem

If a size is specified use it (in particular this is required if the
destination is a directory) otherwise seek in the file to get the size
of the file.

Add a new check that the size is a multiple of 2MiB otherwise the kernel
will reject it.

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford
2020-04-24 16:58:03 +01:00
parent 7481e4d959
commit 1df38daf74
4 changed files with 55 additions and 39 deletions

View File

@@ -514,7 +514,6 @@ components:
PmemConfig:
required:
- file
- size
type: object
properties:
file: