- Sep 20, 2023
-
-
Kevin Wolf authored
bdrv_unref() is called by a lot of places that need to hold the graph lock (it naturally happens in the context of operations that change the graph). However, bdrv_unref() takes the graph writer lock internally, so it can't actually be called while already holding a graph lock without causing a deadlock. bdrv_unref() also can't just become GRAPH_WRLOCK because it drains the node before closing it, and draining requires that the graph is unlocked. The solution is to defer deleting the node until we don't hold the lock any more and draining is possible again. Note that keeping images open for longer than necessary can create problems, too: You can't open an image again before it is really closed (if image locking didn't prevent it, it would cause corruption). Reopening an image immediately happens at least during bdrv_open() and bdrv_co_create(). In order to solve this problem, make sure to run the deferred unref in bdrv_graph_wrunlock(), i.e. the first possible place where we can drain again. This is also why bdrv_schedule_unref() is marked GRAPH_WRLOCK. The output of iotest 051 is updated because the additional polling changes the order of HMP output, resulting in a new "(qemu)" prompt in the test output that was previously on a separate line and filtered out. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-ID: <20230911094620.45040-6-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Sep 08, 2023
-
-
Michael Tokarev authored
I'm getting io-qcow2-244 test failure on mips* due to output mismatch: Take an internal snapshot: -qemu-img: Could not create snapshot 'test': -95 (Operation not supported) +qemu-img: Could not create snapshot 'test': -122 (Operation not supported) No errors were found on the image. This is because errno values might be different across different architectures. This error message in qemu-img.c is the only one which prints errno directly, all the rest print strerror(errno) only. Fix this error message and the expected output of the 3 test cases too. Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Message-ID: <20230811110946.2435067-1-mjt@tls.msk.ru> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Fiona Ebner authored
Since commit ca2a5e63 ("qemu_cleanup: begin drained section after vm_shutdown()"), there will be an additional pause for jobs during qemu_cleanup(). The reason is that the bdrv_drain_all() call in do_vm_stop() is not inside the drained section used by qemu_cleanup() anymore. I.e., there is a second drained section now that ends before the final one in qemu_cleanup() starts. Thus, job_pause() is called twice during cleanup (via child_job_drained_begin()). Test 185 needs to be adapted directly too, because it waits for a specific number of JOB_STATUS_CHANGE events before the BLOCK_JOB_CANCELLED event. Reported-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Fiona Ebner <f.ebner@proxmox.com> Message-ID: <20230817112538.255111-1-f.ebner@proxmox.com> Reviewed-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Markus Armbruster authored
docs/multi-thread-compression.txt uses parameter names with underscores instead of dashes. Wrong since day one. docs/rdma.txt, tests/qemu-iotests/181, and tests/qtest/test-hmp.c are wrong the same way since commit cbde7be9 (v6.0.0). Hard to see, as test-hmp doesn't check whether the commands work, and iotest 181 appears to be unaffected. Fixes: 263170e6 (docs: Add a doc about multiple thread compression) Fixes: cbde7be9 (migrate: remove QMP/HMP commands for speed, downtime and cache size) Signed-off-by:
Markus Armbruster <armbru@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru>
-
Michael Tokarev authored
with some rewording in tests/qemu-iotests/298 tests/qtest/fuzz/generic_fuzz.c tests/unit/test-throttle.c as suggested by Eric. Signed-off-by:
Michael Tokarev <mjt@tls.msk.ru> Reviewed-by:
Eric Blake <eblake@redhat.com>
-
Andrey Drobyshev authored
In the previous commit e2f93826 ("tests/qemu-iotests/197: add testcase for CoR with subclusters") we've introduced a new testcase for copy-on-read with subclusters. Test 197 always forces qcow2 as the top image, but allows backing image to be in any format. That last test case didn't meet these requirements, so let's fix it by using more generic "qemu-io -c map" command. Signed-off-by:
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Message-ID: <20230907220718.983430-1-andrey.drobyshev@virtuozzo.com> Tested-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Eric Blake <eblake@redhat.com>
-
- Sep 06, 2023
-
-
Alexander Ivanov authored
Write a pattern to the first cluster. Corrupt the data_off field and check if the field was repaired on image opening and the pattern has not changed. Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
Denis V. Lunev <den@openvz.org>
-
Alexander Ivanov authored
Images repairing in parallels_open() was added, thus parallels tests fail. Access to an image leads to repairing the image. Further image check don't detect any corruption. Remove reads after image creation in test 131. Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
Denis V. Lunev <den@openvz.org>
-
Alexander Ivanov authored
In this test cluster size is 64k, but modern tools generate images with cluster size 1M. Calculate cluster size using track field from image header. Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
Denis V. Lunev <den@openvz.org>
-
Alexander Ivanov authored
Replace hardcoded numbers by variables. Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
Denis V. Lunev <den@openvz.org>
-
Alexander Ivanov authored
Fill a parallels image with a pattern and write another pattern to the second cluster. Corrupt the image and check if the pattern changes. Repair the image and check the patterns on guest and host sides. Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
Denis V. Lunev <den@openvz.org>
-
Alexander Ivanov authored
Write a pattern to the last cluster, extend the image by 1 claster, repair and check that the last cluster still has the same pattern. Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
Denis V. Lunev <den@openvz.org>
-
Alexander Ivanov authored
Fill the image with a pattern to generate entries in the BAT, set the first BAT entry outside the image, try to read the corrupted image. At the image opening it should be repaired, check for zeroes in the first cluster. Signed-off-by:
Alexander Ivanov <alexander.ivanov@virtuozzo.com> Reviewed-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
Denis V. Lunev <den@openvz.org>
-
- Aug 30, 2023
-
-
Andrey Drobyshev authored
Add testcase which checks that allocations during copy-on-read are performed on the subcluster basis when subclusters are enabled in target image. This testcase also triggers the following assert with previous commit not being applied, so we check that as well: qemu-io: ../block/io.c:1236: bdrv_co_do_copy_on_readv: Assertion `skip_bytes < pnum' failed. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Denis V. Lunev <den@openvz.org> Signed-off-by:
Andrey Drobyshev <andrey.drobyshev@virtuozzo.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-ID: <20230711172553.234055-4-andrey.drobyshev@virtuozzo.com>
-
- Jun 28, 2023
-
-
Kevin Wolf authored
This is a better regression test for the bugs hidden by commit 80fc5d26 ('graph-lock: Disable locking for now'). With that commit reverted, it hangs instantaneously and reliably for me. It is important to have a reliable test like this, because the following commits will set out to fix the actual root cause of the deadlocks and then finally revert commit 80fc5d26, which was only a stopgap solution. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-ID: <20230605085711.21261-2-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Jun 07, 2023
-
-
Vladimir Sementsov-Ogievskiy authored
The event is racy: it will not appear in the output if bitmap is migrated during downtime period of migration and postcopy phase is not started. Fixes: ae00aa23 "iotests: 194: test also migration of dirty bitmap" Reported-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Message-Id: <20230607143606.1557395-1-vsementsov@yandex-team.ru> Reviewed-by:
Richard Henderson <richard.henderson@linaro.org> Signed-off-by:
Richard Henderson <richard.henderson@linaro.org>
-
- Jun 05, 2023
-
-
Hanna Czenczek authored
Test that even vectored IO requests with 1024 vector elements that are not aligned to the device's request alignment will succeed. Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by:
Hanna Czenczek <hreitz@redhat.com> Message-Id: <20230411173418.19549-5-hreitz@redhat.com>
-
- Jun 02, 2023
-
-
Eric Blake authored
Rather than open-coding two different ways to check for an unwanted negative sign, reuse the same code in both functions. That way, if we decide down the road to accept "-0" instead of rejecting it, we have fewer places to change. Also, it means we now get ERANGE instead of EINVAL for negative values in qemu_strtosz, which is reasonable for what it represents. This in turn changes the expected output of a couple of iotests. The change is not quite complete: negative fractional scaled values can trip us up. This will be fixed in a later patch addressing other issues with fractional scaled values. Signed-off-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Hanna Czenczek <hreitz@redhat.com> Message-Id: <20230522190441.64278-18-eblake@redhat.com>
-
Eric Blake authored
In the past, commit a231cb27 ("iotests: Fix 104 for NBD", v2.3.0) added an additional filter to _filter_img_info to rewrite NBD URIs into the expected output form. This recently broke when we tweaked tests to run in a per-format directory, which did not match the regex, because _img_info itself is now already changing SOCK_DIR=/tmp/tmpphjfbphd/raw-nbd-104 into /tmp/tmpphjfbphd/IMGFMT-nbd-104 prior to _img_info_filter getting a chance to further filter things. While diagnosing the problem, I also noticed some filter lines rendered completely useless by a typo when we switched from TCP to Unix sockets for NBD (in shell, '\\+' is different from "\\+" (one gives two backslash to the regex, matching the literal 2-byte sequence <\+> after a single digit; the other gives one backslash to the regex, as the metacharacter \+ to match one or more of <[0-9]>); since the literal string <nbd://127.0.0.1:0\+> is not a valid URI, that regex hasn't been matching anything for years so it is fine to just drop it rather than fix the typo. Fixes: f3923a72 ("iotests: Switch nbd tests to use Unix rather than TCP", v4.2.0) Fixes: 5ba7db09 ("iotests: always use a unique sub-directory per test", v8.0.0) Signed-off-by:
Eric Blake <eblake@redhat.com> Message-Id: <20230519150216.2599189-1-eblake@redhat.com> Reviewed-by:
Daniel P. Berrangé <berrange@redhat.com>
-
- May 30, 2023
-
-
Kevin Wolf authored
If blockdev-create references an existing node in an iothread (e.g. as it's 'file' child), then suddenly all of the image creation code must run in that AioContext, too. Test that this actually works. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20230525124713.401149-13-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
It has no internal callers, so its only use is being called from individual test cases. If the name starts with an underscore, it is considered private and linters warn against calling it. 256 only gets away with it currently because it's on the exception list for linters. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20230525124713.401149-12-kwolf@redhat.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- May 25, 2023
-
-
Paolo Bonzini authored
Clean up monitor_event to just use monitor_suspend/monitor_resume, using mon->mux_out to protect against incorrect nesting (especially on startup). The only remaining case of reading suspend_cnt is in the can_read callback, which is just advisory and can use qatomic_read. As an extra benefit, mux_out is now simply protected by mon_lock. Also, moving the prompt to the beginning of the main loop removes it from the output in some error cases where QEMU does not actually start successfully. It is not a full fix and it would be nice to also remove the monitor heading, but this is already a small (though unintentional) improvement. Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 22, 2023
-
-
Thomas Huth authored
This way QEMU won't complain in case the VGA card or the NIC device are not available in the binary, thus it won't spoil the output and the test then passes with such QEMU binaries that have a limited configuration, too. Message-Id: <20230512124033.502654-18-thuth@redhat.com> Acked-by:
Paolo Bonzini <pbonzini@redhat.com> Signed-off-by:
Thomas Huth <thuth@redhat.com>
-
- May 19, 2023
-
-
Kevin Wolf authored
This tests exercises graph locking, draining, and graph modifications with AioContext switches a lot. Amongst others, it serves as a regression test for bdrv_graph_wrlock() deadlocking because it is called with a locked AioContext and for AioContext handling in the NBD server. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20230517152834.277483-4-kwolf@redhat.com> Tested-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Skip TestBlockdevReopen.test_insert_compress_filter() if the 'compress' driver isn't available. In order to make the test succeed when the case is skipped, we also need to remove any output from it (which would be missing in the case where we skip it). This is done by replacing qemu_io_log() with qemu_io(). In case of failure, qemu_io() raises an exception with the output of the qemu-io binary in its message, so we don't actually lose anything. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20230511143801.255021-1-kwolf@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- May 18, 2023
-
-
Paolo Bonzini authored
Signed-off-by:
Paolo Bonzini <pbonzini@redhat.com>
-
- May 15, 2023
-
-
Sam Li authored
Taking account of the new zone append write operation for zoned devices, BLOCK_ACCT_ZONE_APPEND enum is introduced as other I/O request type (read, write, flush). Signed-off-by:
Sam Li <faithilikerun@gmail.com> Message-id: 20230508051916.178322-3-faithilikerun@gmail.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Sam Li authored
The patch tests zone append writes by reporting the zone wp after the completion of the call. "zap -p" option can print the sector offset value after completion, which should be the start sector where the append write begins. Signed-off-by:
Sam Li <faithilikerun@gmail.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20230508051510.177850-4-faithilikerun@gmail.com Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
Sam Li authored
The new block layer APIs of zoned block devices can be tested by: $ tests/qemu-iotests/check zoned Run each zone operation on a newly created null_blk device and see whether it outputs the same zone information. Signed-off-by:
Sam Li <faithilikerun@gmail.com> Reviewed-by:
Stefan Hajnoczi <stefanha@redhat.com> Acked-by:
Kevin Wolf <kwolf@redhat.com> Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com> Message-id: 20230508045533.175575-7-faithilikerun@gmail.com Message-id: 20230324090605.28361-7-faithilikerun@gmail.com [Adjust commit message prefix as suggested by Philippe Mathieu-Daudé <philmd@linaro.org>. --Stefan] Signed-off-by:
Stefan Hajnoczi <stefanha@redhat.com>
-
- May 10, 2023
-
-
Kevin Wolf authored
This tests that trying to resize an image with QMP block_resize doesn't hang or otherwise fail when the image is attached to a device running in an iothread. This is a regression test for the recent fix that changed qmp_block_resize, which is a coroutine based QMP handler, to avoid calling no_coroutine_fns directly. Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20230509134133.373408-1-kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
Kevin Wolf authored
Socket paths need to be short to avoid failures. This is why there is a iotests.sock_dir (defaulting to /tmp) separate from the disk image base directory. Make use of it to fix failures in too deeply nested test directories. Fixes: ab7f7e67 Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20230503165019.8867-1-kwolf@redhat.com> Reviewed-by:
Eric Blake <eblake@redhat.com> Reviewed-by:
Vladimir Sementsov-Ogievskiy <vsementsov@yandex-team.ru> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Apr 11, 2023
-
-
Kevin Wolf authored
Signed-off-by:
Kevin Wolf <kwolf@redhat.com> Message-Id: <20230411115231.90398-1-kwolf@redhat.com> Signed-off-by:
Kevin Wolf <kwolf@redhat.com>
-
- Apr 04, 2023
-
-
Daniel P. Berrangé authored
The 'check' script will use "#!/usr/bin/env python3" by default to locate python, but this doesn't work in distros which lack a bare 'python3' binary like NetBSD. We need to explicitly invoke 'check' by referring to the 'python' variable in meson, which resolves to the detected python binary that QEMU intends to use. This fixes a regression introduced by commit 51ab5f8b Author: Daniel P. Berrangé <berrange@redhat.com> Date: Wed Mar 15 17:43:23 2023 +0000 iotests: register each I/O test separately with meson Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Paolo Bonzini <pbonzini@redhat.com> Reviewed-by:
Philippe Mathieu-Daudé <philmd@linaro.org> Message-Id: <20230329124539.822022-1-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Reviewed-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20230403134920.2132362-9-alex.bennee@linaro.org>
-
- Mar 22, 2023
-
-
Daniel P. Berrangé authored
Currently meson registers a single test that invokes an entire group of I/O tests, hiding the test granularity from meson. There are various downsides of doing this * You cannot ask 'meson test' to invoke a single I/O test * The meson test timeout can't be applied to the individual tests * Meson only gets a pass/fail for the overall I/O test group not individual tests * If a CI job gets killed by the GitLab timeout, we don't get visibility into how far through the I/O tests execution got. This switches meson to perform test discovery by invoking 'check' in dry-run mode. It then registers one meson test case for each I/O test. Parallel execution remains disabled since the I/O tests do not use self contained execution environments and thus conflict with each other. Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Hanna Czenczek <hreitz@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20230303160727.3977246-8-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-25-alex.bennee@linaro.org>
-
Daniel P. Berrangé authored
The current test runner is only safe against parallel execution within a single instance of the 'check' process, and only if -j is given a value greater than 2. This prevents running multiple copies of the 'check' process for different test scenarios. This change switches the output / socket directories to always include the test name, image format and image protocol. This should allow full parallelism of all distinct test scenarios. eg running both qcow2 and raw tests at the same time, or both file and nbd tests at the same time. It would be possible to allow for parallelism of the same test scenario by including the pid, but that would potentially let many directories accumulate over time on failures, so is not done. Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Hanna Czenczek <hreitz@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20230303160727.3977246-7-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-24-alex.bennee@linaro.org>
-
Daniel P. Berrangé authored
Currently the tests have their stdin inherited from the test harness, meaning they are connected to a TTY. The QEMU processes spawned by certain tests, however, modify TTY settings and if the test exits abnormally the settings might not be restored. The python test harness thus has some logic which will capture the initial TTY settings and restore them once all tests are finished. This does not, however, take into account the possibility of many copies of the 'check' program running in parallel. With parallel execution, a later invokation may save the TTY state that QEMU has already modified, and thus restore bad state leaving the TTY non-functional. None of the I/O tests shnould actually be interactive requiring user input and so they should not require a TTY at all. To avoid this while TTY save/restore complexity we can connect the test stdin to /dev/null instead. Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Hanna Czenczek <hreitz@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20230303160727.3977246-6-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-23-alex.bennee@linaro.org>
-
Daniel P. Berrangé authored
Recently meson started complaining that TAP test reports don't include the TAP protocol version. While this warning is bogus and has since been removed from Meson, it looks like good practice to include this header going forward. The GLib library test harness has started unconditionally printing the version, so this brings the I/O tests into line. Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Acked-by:
Hanna Czenczek <hreitz@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20230303160727.3977246-5-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-22-alex.bennee@linaro.org>
-
Daniel P. Berrangé authored
When asking 'check' to list individual tests by invoking it in dry run mode, it prints the paths to the tests relative to the base of the I/O test directory. When asking 'check' to run an individual test, however, it mandates that only the unqualified test name is given, without any path prefix. This inconsistency makes it harder to ask for a list of tests and then invoke each one. Thus the test listing code is change to flatten the test names, by printing only the base name, which can be directly invoked. Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Acked-by:
Hanna Czenczek <hreitz@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20230303160727.3977246-4-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-21-alex.bennee@linaro.org>
-
Daniel P. Berrangé authored
The 'check' script can be invoked in "dry run" mode, in which case it merely does test discovery and prints out all their names. Despite only doing test discovery it still validates that the various QEMU binaries can be found. This makes it impossible todo test discovery prior to building QEMU. This is a desirable feature to support, because it will let meson discover tests. Fortunately the code in the TestEnv constructor is ordered in a way that makes this fairly trivial to achieve. We can just short circuit the constructor after the basic directory paths have been set. Reviewed-by:
Thomas Huth <thuth@redhat.com> Reviewed-by:
Alex Bennée <alex.bennee@linaro.org> Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Acked-by:
Hanna Czenczek <hreitz@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20230303160727.3977246-3-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-20-alex.bennee@linaro.org>
-
Daniel P. Berrangé authored
The 'check' script has some rather dubious logic whereby it assumes that if invoked as a symlink, then it is running from a separate source tree and build tree, otherwise it assumes the current working directory is a combined source and build tree. This doesn't work if you want to invoke the 'check' script using its full source tree path while still using a split source and build tree layout. This would be a typical situation with meson if you ask it to find the 'check' script path using files('check'). Rather than trying to make the logic more magical, add support for explicitly passing the dirs using --source-dir and --build-dir. If either is omitted the current logic is maintained. Signed-off-by:
Daniel P. Berrangé <berrange@redhat.com> Reviewed-by:
Thomas Huth <thuth@redhat.com> Acked-by:
Hanna Czenczek <hreitz@redhat.com> Tested-by:
Thomas Huth <thuth@redhat.com> Message-Id: <20230303160727.3977246-2-berrange@redhat.com> Signed-off-by:
Alex Bennée <alex.bennee@linaro.org> Message-Id: <20230315174331.2959-19-alex.bennee@linaro.org>
-