aboutsummaryrefslogtreecommitdiff
path: root/test/mocks.c
diff options
context:
space:
mode:
authorJohn Levon <john.levon@nutanix.com>2021-06-30 15:24:48 +0100
committerGitHub <noreply@github.com>2021-06-30 15:24:48 +0100
commit677a541ca1f42d1f32a0371bbdf32005bdbd871d (patch)
tree3381320b7f4148c1ad6474c3021fc6834b8028bd /test/mocks.c
parent8b4089ad1164ef0d98d6d777de63de2aa25a1d8a (diff)
downloadlibvfio-user-677a541ca1f42d1f32a0371bbdf32005bdbd871d.zip
libvfio-user-677a541ca1f42d1f32a0371bbdf32005bdbd871d.tar.gz
libvfio-user-677a541ca1f42d1f32a0371bbdf32005bdbd871d.tar.bz2
return process request count in vfu_run_ctx() (#574)
Consumers such as SPDK would like to know if any actual work was done. Modify the API to support this. Also, clean up some stale mocking we no longer use. Signed-off-by: John Levon <john.levon@nutanix.com> Reviewed-by: Thanos Makatos <thanos.makatos@nutanix.com>
Diffstat (limited to 'test/mocks.c')
-rw-r--r--test/mocks.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/test/mocks.c b/test/mocks.c
index 6e34d4a..29fe298 100644
--- a/test/mocks.c
+++ b/test/mocks.c
@@ -62,7 +62,6 @@ static struct function funcs[] = {
{ .name = "dma_controller_add_region" },
{ .name = "dma_controller_remove_region" },
{ .name = "dma_controller_unmap_region" },
- { .name = "process_request" },
{ .name = "should_exec_command" },
{ .name = "migration_region_access_registers" },
{ .name = "handle_device_state" },
@@ -169,18 +168,6 @@ device_is_stopped(struct migration *migration)
return mock();
}
-int
-process_request(vfu_ctx_t *vfu_ctx)
-{
-
- if (!is_patched("process_request")) {
- return __real_process_request(vfu_ctx);
- }
- check_expected(vfu_ctx);
-
- return mock();
-}
-
bool
device_is_stopped_and_copying(struct migration *migration)
{