diff options
| author | Eric Blake <eblake@redhat.com> | 2017-09-11 12:20:02 -0500 |
|---|---|---|
| committer | Thomas Huth <thuth@redhat.com> | 2019-03-12 07:40:59 +0100 |
| commit | a189a9375bfe07549dd506e91bfa8af8165f05e2 (patch) | |
| tree | ea38ec719a4c39b0abd3a43df32556dc127f2f82 /tests/libqos/libqos.h | |
| parent | 6415c2d0b66eab958be2a1fd81615c55793cefa6 (diff) | |
| download | focaccia-qemu-a189a9375bfe07549dd506e91bfa8af8165f05e2.tar.gz focaccia-qemu-a189a9375bfe07549dd506e91bfa8af8165f05e2.zip | |
ahci-test: Drop dependence on global_qtest
Managing parallel connections to two different monitors via the implicit global_qtest makes it hard to copy-and-paste code to tests that are not aware of the implicit state; the management of global_qtest is even harder to follow because it was masked behind set_context(). Instead, explicitly pass QTestState* around (generally, by reusing the member already present in ahci->parent QOSState), and call explicit qtest_* functions on all places that interact with a monitor. We can assert that the conversion is correct by checking that global_qtest remains NULL throughout the test (a later patch that changes global_qtest to not be a public global variable will drop the assertions). Signed-off-by: Eric Blake <eblake@redhat.com> Acked-by: John Snow <jsnow@redhat.com> [thuth: rebased patch to current master branch] Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'tests/libqos/libqos.h')
| -rw-r--r-- | tests/libqos/libqos.h | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/tests/libqos/libqos.h b/tests/libqos/libqos.h index 149b0be8bc..8e971c25a3 100644 --- a/tests/libqos/libqos.h +++ b/tests/libqos/libqos.h @@ -28,7 +28,6 @@ void qtest_shutdown(QOSState *qs); bool have_qemu_img(void); void mkimg(const char *file, const char *fmt, unsigned size_mb); void mkqcow2(const char *file, unsigned size_mb); -void set_context(QOSState *s); void migrate(QOSState *from, QOSState *to, const char *uri); void prepare_blkdebug_script(const char *debug_fn, const char *event); void generate_pattern(void *buffer, size_t len, size_t cycle_len); |