From 22a80ef616beaf7ac495698a4219f37efe5635c8 Mon Sep 17 00:00:00 2001 From: Thanos Makatos Date: Thu, 18 Feb 2021 11:16:37 +0000 Subject: unit test exec_command and friends w.r.t. migration device state (#346) Signed-off-by: Thanos Makatos Reviewed-by: Swapnil Ingle --- test/mocks.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/mocks.h') diff --git a/test/mocks.h b/test/mocks.h index 06b853c..6f5765b 100644 --- a/test/mocks.h +++ b/test/mocks.h @@ -37,6 +37,9 @@ void patch(void *fn); bool is_patched(void *fn); +bool +__real_cmd_allowed_when_stopped_and_copying(u_int16_t cmd); + int handle_dirty_pages(vfu_ctx_t *vfu_ctx, uint32_t size, struct iovec **iovecs, size_t *nr_iovecs, @@ -69,5 +72,10 @@ __real_free(void *ptr); int __real_process_request(vfu_ctx_t *vfu_ctx); +bool +__real_device_is_stopped_and_copying(struct migration *migration); + +bool +__real_should_exec_command(vfu_ctx_t *vfu_ctx, uint16_t cmd); /* ex: set tabstop=4 shiftwidth=4 softtabstop=4 expandtab: */ -- cgit v1.1