qemu/tests
Fabiano Rosas 55fc0c2f68 tests/qtest/migration: Fix file migration offset check
When doing file migration, QEMU accepts an offset that should be
skipped when writing the migration stream to the file. The purpose of
the offset is to allow the management layer to put its own metadata at
the start of the file.

We have tests for this in migration-test, but only testing that the
migration stream starts at the correct offset and not that it actually
leaves the data intact. Unsurprisingly, there's been a bug in that
area that the tests didn't catch.

Fix the tests to write some data to the offset region and check that
it's actually there after the migration.

While here, switch to using g_get_file_contents() which is more
portable than mmap().

Reviewed-by: Peter Xu <peterx@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-06-20 10:42:24 -03:00
..
avocado hw/i386/pc: Remove PCMachineClass::enforce_aligned_dimm 2024-06-19 12:40:49 +02:00
bench tests/bench: Add bufferiszero-bench 2024-05-03 08:03:35 -07:00
data tests: acpi: update expected SSDT.dimmpxm blob 2024-03-18 08:42:46 -04:00
decode tests/: spelling fixes 2023-09-08 13:08:52 +03:00
docker test: Remove libibumad dependence 2024-06-12 10:21:49 +02:00
fp tests/fp: Bump fp-test-mulAdd test timeout to 3 minutes 2024-01-12 13:23:48 +00:00
guest-debug tests: Gently exit from GDB when tests complete 2024-05-17 16:49:04 +02:00
image-fuzzer
include
keys
lcitool test: Remove libibumad dependence 2024-06-12 10:21:49 +02:00
migration tests/qtest/migration-test: Use custom asm bios for ppc64 2024-06-14 14:01:23 -03:00
multiboot
perf/block/qcow2
plugin tests/plugin/inline: add test for conditional callback 2024-05-16 08:55:23 +01:00
qapi-schema qapi: Rename visitor parameter @variants to @alternatives 2024-05-06 12:38:27 +02:00
qemu-iotests iotests: test NBD+TLS+iothread 2024-06-03 09:17:11 -05:00
qtest tests/qtest/migration: Fix file migration offset check 2024-06-20 10:42:24 -03:00
rocker
tcg tests/tcg/s390x: Allow specifying extra QEMU options on the command line 2024-06-12 12:12:28 +02:00
tsan block: remove AioContext locking 2023-12-21 22:49:27 +01:00
uefi-test-tools tests/: spelling fixes 2023-09-08 13:08:52 +03:00
unit * Fix loongarch64 avocado test 2024-06-13 07:51:58 -07:00
vm tests/vm: remove plain centos image 2024-06-06 10:25:51 +01:00
vmstate-static-checker-data
dbus-vmstate-daemon.sh
Makefile.include tests: respect --enable/--disable-download for Avocado 2023-11-24 12:07:47 +01:00
meson.build tests: only build plugins if TCG is enabled 2024-04-18 11:17:27 +02:00
test-qht-par.c
vhost-user-bridge.c