diff options
| author | Peter Maydell <peter.maydell@linaro.org> | 2024-08-20 15:49:04 +0100 |
|---|---|---|
| committer | Fabiano Rosas <farosas@suse.de> | 2024-09-03 16:24:33 -0300 |
| commit | d278455eb121da15703f3528be457abfb85f2e42 (patch) | |
| tree | e8c92ae10f8cfdc95dfe9a904f6f5f64f7ce4ed5 /scripts/qapi/introspect.py | |
| parent | ceb1ab1af443c729292879621d138dba53bc3134 (diff) | |
| download | focaccia-qemu-d278455eb121da15703f3528be457abfb85f2e42.tar.gz focaccia-qemu-d278455eb121da15703f3528be457abfb85f2e42.zip | |
tests/qtest/migration-test: Fix bootfile cleanup handling
If you invoke the migration-test binary in such a way that it doesn't run any tests, then we never call bootfile_create(), and at the end of main() bootfile_delete() will try to unlink(NULL), which is not valid. This can happen if for instance you tell the test binary to run a subset of tests that turns out to be empty, like this: (cd build/asan && QTEST_QEMU_BINARY=./qemu-system-x86_64 ./tests/qtest/migration-test --tap -k -p bang) # random seed: R02S6501b289ff8ced4231ba452c3a87bc6f # Skipping test: userfaultfd not available 1..0 ../../tests/qtest/migration-test.c:182:12: runtime error: null pointer passed as argument 1, which is declared to never be null /usr/include/unistd.h:858:48: note: nonnull attribute specified here Handle this by making bootfile_delete() not needing to do anything because bootfile_create() was never called. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Fabiano Rosas <farosas@suse.de> [fixed conflict with aee07f2563] Signed-off-by: Fabiano Rosas <farosas@suse.de>
Diffstat (limited to 'scripts/qapi/introspect.py')
0 files changed, 0 insertions, 0 deletions