aboutsummaryrefslogtreecommitdiff
path: root/tests/qtest
AgeCommit message (Collapse)AuthorFilesLines
2025-01-13tests/qtest/boot-serial-test: Initialize PL011 Control registerPhilippe Mathieu-Daudé1-1/+6
The tests using the PL011 UART of the virt and raspi machines weren't properly enabling the UART and its transmitter previous to sending characters. Follow the PL011 manual initialization recommendation by setting the proper bits of the control register. Update the ASM code prefixing: *UART_CTRL = UART_ENABLE | TX_ENABLE; to: while (true) { *UART_DATA = 'T'; } Note, since commit 51b61dd4d56 ("hw/char/pl011: Warn when using disabled transmitter") incomplete PL011 initialization can be logged using the '-d guest_errors' command line option. Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2025-01-13tests/qtest/boot-serial-test: Reorder pair of instructions in PL011 testPhilippe Mathieu-Daudé1-1/+1
In the next commit we are going to use a different value for the $w1 register, maintaining the same $x2 value. In order to keep the next commit trivial to review, set $x2 before $w1. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2025-01-13tests/qtest/boot-serial-test: Reduce for() loop in PL011 testsPhilippe Mathieu-Daudé1-6/+6
Since registers are not modified, we don't need to refill their values. Directly jump to the previous store instruction to keep filling the TXDAT register. The equivalent C code remains: while (true) { *UART_DATA = 'T'; } Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2025-01-13tests/qtest/boot-serial-test: Improve ASM comments of PL011 testsPhilippe Mathieu-Daudé1-9/+9
Re-indent ASM comments adding the 'loop:' label. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
2025-01-11pc-bios: ensure keymaps dependencies set vnc testsAlex Bennée1-1/+1
I was seeing failures on vnc-display-test on FreeBSD: make vm-build-freebsd V=1 TARGET_LIST=aarch64-softmmu BUILD_TARGET=check-qtest QEMU_LOCAL=1 DEBUG=1 Leads to: qemu-system-aarch64: -vnc none: could not read keymap file: 'en-us' Broken pipe ../src/tests/qtest/libqtest.c:196: kill_qemu() tried to terminate QEMU process but encountered exit status 1 (expected 0) which was as far as I could tell because we don't populate the $BLD/pc-bios/keymaps (although scripts/symlink-install-tree.py attempts to symlink qemu-bundle/usr/local/share/qemu/keymaps/ to that dir). Reviewed-by: Paolo Bonzini <pbonzini@redhat.com> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250108121054.1126164-31-alex.bennee@linaro.org>
2025-01-10tests/qtest: remove clock_steps from virtio testsAlex Bennée1-4/+0
In the qtest environment time will not step forward if the system is paused (timers disabled) or we have no timer events to fire. As a result VirtIO events are responded to directly and we don't need to step time forward. We still do timeout processing to handle the fact the target QEMU may not be ready to respond right away. This will usually be due to a slow CI system or if QEMU is running under something like rr. Future qtest patches will assert that time actually changes when a step is requested. Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20250108121054.1126164-17-alex.bennee@linaro.org>
2025-01-02qtest/fw-cfg: remove compiled out codeAni Sinha1-6/+0
Remove code that is already compiled out. This prevents confusion. CC: qemu-trivial@nongnu.org Signed-off-by: Ani Sinha <anisinha@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20250101081555.1050736-1-anisinha@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2025-01-02tests/qtest/migration: Re-enable postcopy testsFabiano Rosas1-1/+5
Postcopy tests have been inadvertently disabled since commit 124a3c58b8 ("tests/qtest/migration: Move ufd_version_check to utils"). That commit moved the ufd_version_check() function to another file but failed to make sense of the ifdefs and includes: The <sys/syscall> include was incorrectly dropped. It is needed to pull in <asm/unistd.h> for __NR_userfaultfd. The <sys/ioctl.h> was moved under the wrong ifdef. Fixes: 124a3c58b8 ("tests/qtest/migration: Move ufd_version_check to utils") Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de> Message-Id: <20241218192223.10551-2-farosas@suse.de>
2025-01-02tests/migration: Drop arch_[source|target]Peter Xu1-6/+2
Coverity complained about them. These two variables are never used now after commit 832c732c5d ("migration-test: Create arch_opts"), and/or commit 34cc54fb35 ("tests/qtest/migration-test: Use custom asm bios for ppc64"). Resolves: Coverity CID 1568379 Resolves: Coverity CID 1568380 Signed-off-by: Peter Xu <peterx@redhat.com> Reviewed-by: Alex Bennée <alex.bennee@linaro.org> Message-Id: <20241216161413.1644171-4-peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2025-01-02tests/qtest/virtio-iommu-test: Don't pass uninitialized data into qtest_memwriteFabiano Rosas1-2/+2
Valgrind complains about: Use of uninitialised value of size 8 & Conditional jump or move depends on uninitialised value(s) both at: at 0x5265931: _itoa_word (_itoa.c:180) by 0x527EEC7: __vfprintf_internal (vfprintf-internal.c:1687) by 0x528C8B0: __vsprintf_internal (iovsprintf.c:96) by 0x526B920: sprintf (sprintf.c:30) by 0x1296C7: qtest_memwrite (libqtest.c:1273) by 0x193C04: send_map (virtio-iommu-test.c:125) by 0x194392: test_attach_detach (virtio-iommu-test.c:214) by 0x17BDE7: run_one_test (qos-test.c:181) by 0x4B0699D: test_case_run (gtestutils.c:2900) by 0x4B0699D: g_test_run_suite_internal (gtestutils.c:2988) by 0x4B068B2: g_test_run_suite_internal (gtestutils.c:3005) by 0x4B068B2: g_test_run_suite_internal (gtestutils.c:3005) by 0x4B068B2: g_test_run_suite_internal (gtestutils.c:3005) Uninitialised value was created by a stack allocation at 0x193AFD: send_map (virtio-iommu-test.c:103) Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241209204427.17763-5-farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2025-01-02tests/qtest/bios-tables-test: Free tables at dump_aml_filesFabiano Rosas1-0/+1
The dump_aml_files() function calls load_expected_aml() to allocate the tables but never frees it. Add the missing call to free_test_data(). Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20241209204427.17763-4-farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2025-01-02tests/qtest/migration: Initialize buffer in probe_o_direct_supportFabiano Rosas1-0/+1
Valgrind complains about the probe_o_direct_support() function reading from an uninitialized buffer. For probing O_DIRECT support we don't actually need to write to the file, just make sure the pwrite call doesn't reject the write. Still, write zeroes to the buffer to suppress the warning. Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Peter Xu <peterx@redhat.com> Message-Id: <20241209204427.17763-3-farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2025-01-02tests/qtest/migration: Do proper cleanup in the dirty_limit testFabiano Rosas1-0/+5
The dirty_limit test does two migrations in a row and is leaking the first 'to' instance. Do proper cleanup. Reviewed-by: Peter Xu <peterx@redhat.com> Message-Id: <20241209204427.17763-2-farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2025-01-02tests/qtest/migration: Fix compile errors when CONFIG_UADK is setShameer Kolothum1-54/+0
Removes accidental inclusion of unrelated functions within CONFIG_UADK as this causes compile errors like: error: redefinition of ‘migrate_hook_start_xbzrle’ Fixes: 932f74f3fe6e ("tests/qtest/migration: Split compression tests from migration-test.c") Signed-off-by: Shameer Kolothum <shameerali.kolothum.thodi@huawei.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Message-Id: <20241217131046.83844-1-shameerali.kolothum.thodi@huawei.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-31ui & main loop: Redesign of system-specific main thread event handlingPhil Dennis-Jordan1-0/+1
macOS's Cocoa event handling must be done on the initial (main) thread of the process. Furthermore, if library or application code uses libdispatch, the main dispatch queue must be handling events on the main thread as well. So far, this has affected Qemu in both the Cocoa and SDL UIs, although in different ways: the Cocoa UI replaces the default qemu_main function with one that spins Qemu's internal main event loop off onto a background thread. SDL (which uses Cocoa internally) on the other hand uses a polling approach within Qemu's main event loop. Events are polled during the SDL UI's dpy_refresh callback, which happens to run on the main thread by default. As UIs are mutually exclusive, this works OK as long as nothing else needs platform-native event handling. In the next patch, a new device is introduced based on the ParavirtualizedGraphics.framework in macOS. This uses libdispatch internally, and only works when events are being handled on the main runloop. With the current system, it works when using either the Cocoa or the SDL UI. However, it does not when running headless. Moreover, any attempt to install a similar scheme to the Cocoa UI's main thread replacement fails when combined with the SDL UI. This change tidies up main thread management to be more flexible. * The qemu_main global function pointer is a custom function for the main thread, and it may now be NULL. When it is, the main thread runs the main Qemu loop. This represents the traditional setup. * When non-null, spawning the main Qemu event loop on a separate thread is now done centrally rather than inside the Cocoa UI code. * For most platforms, qemu_main is indeed NULL by default, but on Darwin, it defaults to a function that runs the CFRunLoop. * The Cocoa UI sets qemu_main to a function which runs the NSApplication event handling runloop, as is usual for a Cocoa app. * The SDL UI overrides the qemu_main function to NULL, thus specifying that Qemu's main loop must run on the main thread. * The GTK UI also overrides the qemu_main function to NULL. * For other UIs, or in the absence of UIs, the platform's default behaviour is followed. This means that on macOS, the platform's runloop events are always handled, regardless of chosen UI. The new PV graphics device will thus work in all configurations. There is no functional change on other operating systems. Implementing this via a global function pointer variable is a bit ugly, but it's probably worth investigating the existing UI thread rule violations in the SDL (e.g. #2537) and GTK+ back-ends. Fixing those issues might precipitate requirements similar but not identical to those of the Cocoa UI; hopefully we'll see some kind of pattern emerge, which can then be used as a basis for an overhaul. (In fact, it may turn out to be simplest to split the UI/native platform event thread from the QEMU main event loop on all platforms, with any UI or even none at all.) Signed-off-by: Phil Dennis-Jordan <phil@philjordan.eu> Reviewed-by: Akihiko Odaki <akihiko.odaki@daynix.com> Tested-by: Akihiko Odaki <akihiko.odaki@daynix.com> Message-ID: <20241223221645.29911-2-phil@philjordan.eu> [PMD: Declare 'qemu_main' symbol in tests/qtest/fuzz/fuzz.c, add missing g_assert_not_reached() call in main()] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-12-20include: Rename sysemu/ -> system/Philippe Mathieu-Daudé3-5/+5
Headers in include/sysemu/ are not only related to system *emulation*, they are also used by virtualization. Rename as system/ which is clearer. Files renamed manually then mechanical change using sed tool. Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Richard Henderson <richard.henderson@linaro.org> Tested-by: Lei Yang <leiyang@redhat.com> Message-Id: <20241203172445.28576-1-philmd@linaro.org>
2024-12-12tests/qtest/migration: Split validation tests + miscFabiano Rosas4-283/+286
Move the remaining tests into a misc-tests.c file. These tests are mostly about validation of input and should be in the future replaced by unit testing. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration-test: Fix and enable test_ignore_sharedNicholas Piggin1-6/+13
This test is already starting to bitrot, so first remove it from ifdef and fix compile issues. ppc64 transfers about 2MB, so bump the size threshold too. It was said to be broken on aarch64 but it may have been due to the limited shm size under Gitlab CI. Cc: Yury Kotov <yury-kotov@yandex-team.ru> Cc: Dr. David Alan Gilbert <dave@treblig.org> Signed-off-by: Nicholas Piggin <npiggin@gmail.com> Reviewed-by: Dr. David Alan Gilbert <dave@treblig.org> [put it under flaky tests, we still don't have a solution for the CI] Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Split CPR testsFabiano Rosas4-33/+61
Move the mode/reboot test into a separate file to hold all the CPR tests. Currently there's just one test, but we're adding more CPR modes and the feature is different enough from live migration that it's worth it to have a separate file for it. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Split precopy testsFabiano Rosas4-968/+1011
Split the precopy tests from migration-test.c. This is the largest group of tests and the more difficult one to break into smaller groups, so move all of it. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Split file testsFabiano Rosas4-310/+341
Split the file tests from migration-test.c. These are being moved to their own file due to being special enough compared with the regular stream migration. There is also the entire mapped-ram feature which depends on file migration. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Split postcopy testsFabiano Rosas4-77/+109
Split the next group of tests from migration-test.c, the postcopy tests. This is another well-defined group of tests and postcopy is a unique enough feature that it deserves it's own file. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Split compression tests from migration-test.cFabiano Rosas4-160/+242
Continuing the split of groups of tests from migration-test.c, split the compression tests into their own file. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Split TLS tests from migration-test.cFabiano Rosas4-789/+804
The migration-test.c file has become unwieldy large. It's quite confusing to navigate with all the test definitions mixed with hook definitions. The TLS tests make this worse with ifdef'ery. Since we're planning on having a smaller set of tests to run as smoke testing on all architectures, I'm taking the time to split some tests into their own file. Move the TLS tests into a file of their own. Acked-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Move common test codeFabiano Rosas6-1129/+1205
The migration tests have a set of core infrastructure routines. These are functions that are called by (almost) all tests and centralize the common operations of: starting migration on both sides, waiting for guests to boot, performing guest initialization and teardown, guest memory validation, etc. Move this basic framework code (and a few static helpers) into a separate file. Leave only individual test functions (and their own static helpers) in migration-test.c. Acked-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Isolate test initializationFabiano Rosas1-36/+86
We currently have some environment validation to perform and flags to set during the initialization of the tests. To be able to add more migration test binaries, we'll need these tasks to be in their own function so they can be called from more than one place. Move the initialization code to a function and introduce the MigrationTestEnv structure to hold the flags that are accessed during test registration. Make the env object static to avoid have to change all the code to pass it around. Similarly with the tmpfs variable, which is used extensively. Note: I'm keeping the new functions in migration-test.c because they are going to be moved in the next patch to the correct place. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Move kvm_dirty_ring_supported to utilsFabiano Rosas3-29/+30
Move kvm_dirty_ring_supported() to migration-util.c. Similarly to ufd_version_check(), this function is used during test definition so put it in the utils file. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Move ufd_version_check to utilsFabiano Rosas3-45/+52
Move ufd_version_check() to migration-util.c file. This is a helper function that is used during tests definition so it should be available outside of migration-test.c Since the function is moving to another file, change it to stop accessing the global uffd_feature_thread_id and take it as argument instead. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Rename migration-helpers.cFabiano Rosas7-10/+12
Rename migration-helpers.c to migration-util.c to make its purpose more explicit and avoid the "helper" terminology. Move the file to the qtest/migration/ directory along with the rest of the migration files. Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Move qmp helpers to a separate fileFabiano Rosas7-497/+542
We current have a bunch of non-test functions in migration-test.c and some others in migration-helpers.c. In order to split migration-test.c into separate test binaries, these helpers need to go somewhere else. To avoid making migration-helpers even larger, move all QMP-related functions into a new migration-qmp.c file and put it under the qtest/migration/ directory. The new file holds everything that has as its main responsibility to call into QMP. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Move bootfile code to its own fileFabiano Rosas5-60/+86
Move the code that creates the guest binary out of migration-test and into the qtest/migration/ directory, along with the rest of the a-b-kernel code. That code is part of the basic infrastructure of migration tests, it shouldn't be among the tests themselves. Also take the chance and rename migration-test.h, which is too generic a name for this header which contains only values related to guest memory offsets. Reviewed-by: Daniel P. Berrangé <berrange@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/migration: Disambiguate guestperf vs. a-bFabiano Rosas15-5/+890
The current build structure for migration tests is confusing. There is the tests/migration directory, which contains two different guest code implementations, one for the qtests (a-b-{bootblock|kernel}.S) and another for the guestperf script (stress.c). One uses a Makefile, while the other uses meson. The next patches will add a new qtests/migration/ directory to hold qtest code which will make the situation even more confusing. Move the guest code used by qtests into a new qtests/migration/ directory and rename the old one to tests/migration-stress. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Stop calling everything "test"Fabiano Rosas1-36/+36
Test frameworks usually prefix "test_" to the entry point of the test code. Having every function prefixed with test_ makes it hard to understand the code and to grep for the actual tests. Remove the "test" prefix from everything that is not a test. In order to still keep some namespacing, stick to the "migrate_" prefix, which is the most used currently. Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest/migration: Standardize hook namesFabiano Rosas1-168/+174
Standardize the hook names: - change the names to .start|end_hook to match test_migrate_start|end() - use the migrate_hook_start_ and migrate_hook_end_ prefixes Reviewed-by: Peter Xu <peterx@redhat.com> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest: Use qtest_system_reset_nowait() where appropriatePeter Maydell2-16/+2
In the device and drive plug/unplug tests we want to trigger a system reset and then see if we get the appropriate DEVICE_DELETED event. Use qtest_system_reset_nowait() here. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Fabiano Rosas <farosas@suse.de> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest: Use qtest_system_reset() instead of open-coded versionsPeter Maydell7-47/+10
Use the qtest_system_reset() function in various tests that were previously open-coding the system-reset. Note that in several cases this fixes a bug where the test did not wait for the RESET QMP event before continuing. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-12tests/qtest: Add qtest_system_reset() utility functionPeter Maydell2-0/+41
We have several qtest tests which want to reset the QEMU under test during the course of testing something. They currently generally have their own functions to do this, which work by sending a "system_reset" QMP command. However, "system_reset" only requests a reset, and many of the tests which send the QMP command forget the "and then wait for the QMP RESET event" part which is needed to ensure that the reset has completed. Provide a qtest_system_reset() function in libqtest so that we don't need to reimplement this in multiple different tests. A few tests (for example device hotplug related tests) want to perform the reset command and then wait for some other event that is produced during the reset sequence. For them we provide qtest_system_reset_nowait() so they can clearly indicate that they are deliberately not waiting for the RESET event. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Signed-off-by: Fabiano Rosas <farosas@suse.de>
2024-12-11test/qtest/ast2700-smc-test: Support to test AST2700Jamin Lin2-1/+74
Add test_ast2700_evb function and reused testcases which are from aspeed_smc-test.c for AST2700 testing. The base address, flash base address and ce index of fmc_cs0 are 0x14000000, 0x100000000 and 0, respectively. The default flash model of fmc_cs0 is "w25q01jvq" whose size is 128MB, so set jedec_id 0xef4021. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-11-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest: Introduce a new aspeed-smc-utils.c to place common testcasesJamin Lin4-741/+841
The testcases for ASPEED SMC model were placed in aspeed_smc-test.c. However, this test file only supports for ARM32. To support all ASPEED SOCs such as AST2700 whose CPU architecture is aarch64, introduces a new aspeed-smc-utils source file and move all common APIs and testcases from aspeed_smc-test.c to aspeed-smc-utils.c. Finally, users are able to re-used these testcase for AST2700 and future ASPEED SOCs testing. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-10-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest/aspeed_smc-test: Support write page command with QPI modeJamin Lin1-0/+74
Add a new testcase for write page command with QPI mode testing. Currently, only run this testcase for AST2500, AST2600 and AST1030. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-9-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest/aspeed_smc-test: Support to test AST1030Jamin Lin1-0/+42
Add test_ast1030_evb function and reused testcases for AST1030 testing. The base address, flash base address and ce index of fmc_cs0 are 0x7E620000, 0x80000000 and 0, respectively. The default flash model of fmc_cs0 is "w25q80bl" whose size is 1MB, so set jedec_id 0xef4014. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-8-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest/aspeed_smc-test: Support to test AST2600Jamin Lin1-0/+41
Add test_ast2600_evb function and reused testcases for AST2600 testing. The spi base address, flash base address and ce index of fmc_cs0 are 0x1E620000, 0x20000000 and 0, respectively. The default flash model of fmc_cs0 is "mx66u51235f" whose size is 64MB, so set jedec_id 0xc2253a. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-7-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest/aspeed_smc-test: Support to test AST2500Jamin Lin1-0/+40
Add test_ast2500_evb function and reused testcases for AST2500 testing. The spi base address, flash base address and ce index of fmc_cs0 are 0x1E620000, 0x20000000 and 0, respectively. The default flash model of fmc_cs0 is "mx25l25635e" whose size is 32MB, so set jedec_id 0xc22019. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-6-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest/aspeed_smc-test: Introducing a "page_addr" data fieldJamin Lin1-7/+10
Currently, these test cases used the hardcode offset 0x1400000 (0x14000 * 256) which was beyond the 16MB flash size for flash page read/write command testing. However, the default fmc flash model of ast1030-a1 EVB is "w25q80bl" whose size is 1MB. To test SoC flash models, introduces a new page_addr member in TestData structure, so users can set the offset for flash page read/write command testing. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-5-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest/aspeed_smc-test: Support to test all CE pinsJamin Lin1-37/+40
Currently, these test cases only support to test CE0. To test all CE pins, introduces new ce and node members in TestData structure. The ce member is used for saving the ce index and node member is used for saving the node path, respectively. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-4-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest/aspeed_smc-test: Introduce a new TestData to test different BMC SOCsJamin Lin1-247/+299
Currently, these test cases are only used for testing fmc_cs0 for AST2400. To test others BMC SOCs, introduces a new TestData structure. Users can set the spi base address, flash base address, jedesc id and so on for different BMC SOCs and flash model testing. Introduce new helper functions to make the test case more readable. Set spi base address 0x1E620000, flash_base address 0x20000000 and jedec id 0x20ba19 for fmc_cs0 with n25q256a flash for AST2400 SMC model testing. To pass the TestData into the test case, replace qtest_add_func with qtest_add_data_func. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-3-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-11test/qtest/aspeed_smc-test: Move testcases to test_palmetto_bmc functionJamin Lin1-4/+12
So far, the test cases are used for testing SMC model with AST2400 BMC. However, AST2400 is end off live and ASPEED is no longer support this SOC. To test SMC model for AST2500, AST2600 and AST1030, move the test cases from main to test_palmetto_bmc function. Signed-off-by: Jamin Lin <jamin_lin@aspeedtech.com> Reviewed-by: Cédric Le Goater <clg@redhat.com> Link: https://lore.kernel.org/r/20241127091543.1243114-2-jamin_lin@aspeedtech.com Signed-off-by: Cédric Le Goater <clg@redhat.com>
2024-12-03tests/qtest: add test for querying balloon guest statsDaniel P. Berrangé1-0/+20
This test would have identified the crash caused by the addition of new balloon stats fields. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Fabiano Rosas <farosas@suse.de> Acked-by: Michael S. Tsirkin <mst@redhat.com> Message-ID: <20241129135507.699030-4-berrange@redhat.com> Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
2024-12-03tests/qtest: drop 'fuzz-' prefix from virtio-balloon testDaniel P. Berrangé2-3/+3
This test file is expected to be extended for arbitrary virtio-balloon related tests, not merely those discovered by fuzzing. Signed-off-by: Daniel P. Berrangé <berrange@redhat.com> Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org> Reviewed-by: Fabiano Rosas <farosas@suse.de> Message-ID: <20241129135507.699030-3-berrange@redhat.com> [PMD: Update MAINTAINERS] Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org> Acked-by: Michael S. Tsirkin <mst@redhat.com>
2024-11-28tests/9p: also check 'Tgetattr' in 'use-after-unlink' testChristian Schoenebeck1-0/+5
This verifies expected behaviour of previous bug fix patch. Signed-off-by: Christian Schoenebeck <qemu_oss@crudebyte.com> Reviewed-by: Greg Kurz <groug@kaod.org> Message-Id: <7017658155c517b9665b75333a97c79aa2d4f3df.1732465720.git.qemu_oss@crudebyte.com>