]> git.ipfire.org Git - thirdparty/qemu.git/commit
bql: add a "mock" BQL for Rust unit tests
authorPaolo Bonzini <pbonzini@redhat.com>
Fri, 15 Nov 2024 11:08:43 +0000 (12:08 +0100)
committerPaolo Bonzini <pbonzini@redhat.com>
Thu, 19 Dec 2024 18:36:37 +0000 (19:36 +0100)
commitd4873c5d4fdd11f484df183e01c0825fe347fd8b
treee0b0e6537ec3ef995df5d463c6efd939d93bdb41
parent716d89f9cc14faf784d83c945c40b7e8256ae525
bql: add a "mock" BQL for Rust unit tests

Right now, the stub BQL in stubs/iothread-lock.c always reports itself as
unlocked.  However, Rust would like to run its tests in an environment where
the BQL *is* locked.  Provide an extremely dirty function that flips the
return value of bql_is_locked() to true.

Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
include/qemu/main-loop.h
rust/qemu-api/meson.build
rust/qemu-api/src/cell.rs
stubs/iothread-lock.c
system/cpus.c