aboutsummaryrefslogtreecommitdiff
path: root/tests/migration/i386/a-b-bootblock.S
AgeCommit message (Collapse)AuthorFilesLines
2023-10-04i386/a-b-bootblock: zero the first byte of each page on startDaniil Tatianin1-0/+9
The migration qtest all the way up to this point used to work by sheer luck relying on the contents of all pages from 1MiB to 100MiB to contain the same one value in the first byte initially. This easily breaks if we reduce the amount of RAM for the test instances from 150MiB to e.g 110MiB since that makes SeaBIOS dirty some of the pages starting at about 0x5dd2000 (~93 MiB) as it reuses those for the HighMemory allocator since commit dc88f9b72df ("malloc: use large ZoneHigh when there is enough memory"). This would result in the following errors: 12/60 qemu:qtest+qtest-x86_64 / qtest-x86_64/migration-test ERROR 2.74s killed by signal 6 SIGABRT stderr: Memory content inconsistency at 5dd2000 first_byte = cc last_byte = cb current = 9e hit_edge = 1 Memory content inconsistency at 5dd3000 first_byte = cc last_byte = cb current = 89 hit_edge = 1 Memory content inconsistency at 5dd4000 first_byte = cc last_byte = cb current = 23 hit_edge = 1 Memory content inconsistency at 5dd5000 first_byte = cc last_byte = cb current = 31 hit_edge = 1 Memory content inconsistency at 5dd6000 first_byte = cc last_byte = cb current = 70 hit_edge = 1 Memory content inconsistency at 5dd7000 first_byte = cc last_byte = cb current = ff hit_edge = 1 Memory content inconsistency at 5dd8000 first_byte = cc last_byte = cb current = 54 hit_edge = 1 Memory content inconsistency at 5dd9000 first_byte = cc last_byte = cb current = 64 hit_edge = 1 Memory content inconsistency at 5dda000 first_byte = cc last_byte = cb current = 1d hit_edge = 1 Memory content inconsistency at 5ddb000 first_byte = cc last_byte = cb current = 1a hit_edge = 1 and in another 26 pages** ERROR:../tests/qtest/migration-test.c:300:check_guests_ram: assertion failed: (bad == 0) Fix this by always zeroing the first byte of each page in the range so that we get consistent results no matter the initial contents. Fixes: ea0c6d62391 ("test: Postcopy") Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru> Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230919102346.2117963-3-d-tatianin@yandex-team.ru>
2023-10-04i386/a-b-bootblock: factor test memory addresses out into constantsDaniil Tatianin1-3/+6
So that we have less magic numbers to deal with. This also allows us to reuse these in the following commits. Reviewed-by: Peter Xu <peterx@redhat.com> Reviewed-by: Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Daniil Tatianin <d-tatianin@yandex-team.ru> Signed-off-by: Juan Quintela <quintela@redhat.com> Message-ID: <20230919102346.2117963-2-d-tatianin@yandex-team.ru>
2022-08-24tests/migration/i386: Speed up the i386 migration test (when using TCG)Thomas Huth1-0/+1
When KVM is not available, the i386 migration test also runs in a rather slow fashion, since the guest code takes a couple of seconds to print the "B"s on the serial console, and the migration test has to wait for this each time. Let's increase the frequency here, too, so that the delays in the migration tests get smaller. Signed-off-by: Thomas Huth <thuth@redhat.com> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Message-Id: <20220819053802.296584-4-thuth@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20220822165608.2980552-5-alex.bennee@linaro.org>
2018-09-26tests/migration: Support cross compilation in generating boot header fileWei Huang1-0/+88
Recently a new configure option, CROSS_CC_GUEST, was added to $(TARGET)-softmmu/config-target.mak to support TCG-related tests. This patch tries to leverage this option to support cross compilation when the migration boot block file is being re-generated: * The x86 related files are moved to a new sub-dir (named ./i386). * A new top-layer Makefile is created in tests/migration/ directory. This Makefile searches and parses CROSS_CC_GUEST to generate CROSS_PREFIX. The CROSS_PREFIX, if available, is then passed to migration/$ARCH/Makefile. Reviewed-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Wei Huang <wei@redhat.com> Message-Id: <1536174934-26022-3-git-send-email-wei@redhat.com> Signed-off-by: Juan Quintela <quintela@redhat.com> Signed-off-by: Dr. David Alan Gilbert <dgilbert@redhat.com>