libvirt/tests/nodedevmdevctldata
Andrea Bolognani 8a743a598b tests: Ensure test files are newline-terminated
Currently we only append a newline to 'actual' if 'expected'
(as loaded from file) already ends in a newline, but that
results in inconsistent behavior.

For example, some of the test files used by virhostcputest are
newline-terminated and some aren't. If we were to remove
existing newlines from those files or add them where they
aren't present, the test would still pass, and even using
VIR_TEST_REGENERATE_OUTPUT=1 wouldn't change them back.

Make things consistent by ensuring that 'actual' is always
newline-terminated. The only exception is when 'actual' is
completely empty: in that case, we want the file to be actually
empty, not contain a single empty line. query-jobs-empty.result
in qemumonitorjsondata/ is an example of this being used.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2024-01-05 14:38:49 +01:00
..
mdev_cc000052_9b13_9b13_9b13_cc23009b1326-create.argv tests: adding vfio-ccw to nodedev tests 2022-02-04 17:50:53 +01:00
mdev_cc000052_9b13_9b13_9b13_cc23009b1326-create.json tests: adding vfio-ccw to nodedev tests 2022-02-04 17:50:53 +01:00
mdev_cc000052_9b13_9b13_9b13_cc23009b1326-define.argv tests: adding vfio-ccw to nodedev tests 2022-02-04 17:50:53 +01:00
mdev_cc000052_9b13_9b13_9b13_cc23009b1326-define.json tests: adding vfio-ccw to nodedev tests 2022-02-04 17:50:53 +01:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-create.json tests: Ensure test files are newline-terminated 2024-01-05 14:38:49 +01:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-define.json tests: Ensure test files are newline-terminated 2024-01-05 14:38:49 +01:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-start.argv tests: nodedev: Make the mdevctl test function and helper generic 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-stop.argv tests: nodedev: Make the mdevctl test function and helper generic 2021-04-19 10:24:13 -05:00
mdev_d069d019_36ea_4111_8f0a_8c9a70e21366-undefine.argv tests: nodedev: Make the mdevctl test function and helper generic 2021-04-19 10:24:13 -05:00
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-create.json tests: Ensure test files are newline-terminated 2024-01-05 14:38:49 +01:00
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_d2441d39_495e_4243_ad9f_beb3f14c23d9-define.json tests: Ensure test files are newline-terminated 2024-01-05 14:38:49 +01:00
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-create.json tests: Ensure test files are newline-terminated 2024-01-05 14:38:49 +01:00
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.argv nodedev: Switch to using long options for mdevctl 2021-04-19 10:24:13 -05:00
mdev_fedc4916_1ca8_49ac_b176_871d16c13076-define.json tests: Ensure test files are newline-terminated 2024-01-05 14:38:49 +01:00
mdevctl-autostart.argv nodedev: Add tests for mdevctl autostart command 2021-09-14 14:24:07 -05:00
mdevctl-list-defined.argv nodedevmdevctltest: Use internal linewrapping and variable command path stripping 2021-04-12 15:55:10 +02:00
mdevctl-list-empty-array.json nodedevmdevctltest: Rename mdevctl-list-empty test case 2023-08-24 13:45:06 +02:00
mdevctl-list-empty-array.out.xml nodedevmdevctltest: Rename mdevctl-list-empty test case 2023-08-24 13:45:06 +02:00
mdevctl-list-empty.json nodedevmdevctltest: Introduce a test case for empty mdevctl output 2023-08-24 13:46:22 +02:00
mdevctl-list-empty.out.xml nodedevmdevctltest: Introduce a test case for empty mdevctl output 2023-08-24 13:46:22 +02:00
mdevctl-list-multiple.json tests: adding vfio-ccw to nodedev tests 2022-02-04 17:50:53 +01:00
mdevctl-list-multiple.out.xml nodedev: add parent_addr to mdev nodedev dumpxml 2022-02-04 17:50:57 +01:00