Commit Graph

2 Commits

Author SHA1 Message Date
Peter Krempa
3e8d38237d qemuBuildUSBControllerDevStr: Split out validation of USB controller
Move the validation code into a separate function. For now the
validation is still kept in the commandline format step as simply just
moving it to the validator causes failures in the test suite, which will
need to be investigated deeper.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-10-12 10:26:05 +02:00
Sebastian Mitterle
9ec77eef2d qemuxml2argvtest: Test expected error messages
When an error is expected, the error message will be checked.
This is expressed by creating an additional ".err" file containing
the expected error message.

It is added in order to make sure the expected errors
are not masked by other errors during test execution while
leveraging the existing framework.

In order to keep it simple, an input file cannot be reused
anymore to cover several expected error cases configured
in the test code. An input file can still be reused by creating
a test case specific symlink.

For consistency, the mock needs to report an error now, too,
as every failure must have an error; otherwise a test case will
fail.

Require LC_ALL=C explicitly to make sure error messages are not
localized for testing.

Signed-off-by: Sebastian Mitterle <smitterl@redhat.com>
Suggested-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-09-23 22:47:59 +02:00