#405 add TEST_SKIP_MISSING_DEVICE
Merged by astepano. Opened by rmeggins.
rmeggins/standard-test-roles nvme-check  into  master

Download 405.patch

If you are using the same provision.fmf on multiple systems, the qemu on some
systems may not support all of the specified devices. For example, qemu on many
platforms does not support NVMe. By default, the script will issue an error if
you attempt to use an unsupported device. Use this flag to skip missing devices,
with a warning.

@nhosoi @spetros ptal

Is this boolean, which takes yes|no?

Is this boolean, which takes yes|no?

yes, it is a boolean
It takes "True" or "False" - whatever is processed by the argument to distutils.util.strtobool

All right. Thanks!
lgtm

This PR is ready to be merged

I wonder, if it would be easier to read if include directly -device nvme
This command is used only once: to check if nvme is available.
Double template is a bit confusing.

Is there way how to improve this function call?
Point is: nvme_support is very specific.
skip_missing_device is more common.
Imagine you add another arg: 'XXX_is_supported'... then it will become 3rd argument:
def generate(cls, nvme_support, skip_missing_device, xxx_is_supported)
Please rename nvme_support to nvme_is_supported
Or maybe pass dictionary: supported_dev[] = ['nvme' : True/False]

1 new commit added

  • use supported_devices instead of nvme_support

Is there way how to improve this function call?
Point is: nvme_support is very specific.
skip_missing_device is more common.
Imagine you add another arg: 'XXX_is_supported'... then it will become 3rd argument:
def generate(cls, nvme_support, skip_missing_device, xxx_is_supported)
Please rename nvme_support to nvme_is_supported
Or maybe pass dictionary: supported_dev[] = ['nvme' : True/False]

I used the dictionary approach

This PR is ready to be merged.

@rmeggins thank you for contribution.

Commit 3ff84660 fixes this pull-request

Pull-Request has been merged by astepano

Pull-Request has been merged by astepano

Metadata