diff options
author | John Levon <john.levon@nutanix.com> | 2021-02-04 09:58:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-04 09:58:55 +0000 |
commit | 8f464f0f52ac4c10b1c10376d26eddc644492966 (patch) | |
tree | 1264657242e5f5bb6f8ed552a4289a2d6c5d05b9 /test | |
parent | 3eca929802ed6efb57d9ee37a3d6728e3b8521c8 (diff) | |
download | libvfio-user-8f464f0f52ac4c10b1c10376d26eddc644492966.zip libvfio-user-8f464f0f52ac4c10b1c10376d26eddc644492966.tar.gz libvfio-user-8f464f0f52ac4c10b1c10376d26eddc644492966.tar.bz2 |
close listening socket in vfu_destroy_ctx() (#299)
We were forgetting to close vfu_ctx->fd, add a tran callback for this. While
we're there, clean up the tran callbacks somewhat.
Signed-off-by: John Levon <john.levon@nutanix.com>
Reviewed-by: Swapnil Ingle <swapnil.ingle@nutanix.com>
Diffstat (limited to 'test')
-rw-r--r-- | test/unit-tests.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/unit-tests.c b/test/unit-tests.c index baf6486..a4ead29 100644 --- a/test/unit-tests.c +++ b/test/unit-tests.c @@ -580,7 +580,7 @@ test_vfu_ctx_create(void **state __attribute__((unused))) assert_int_equal(0, vfu_realize_ctx(vfu_ctx)); patch(close); - expect_value(__wrap_close, fd, 0x0); + expect_value(__wrap_close, fd, vfu_ctx->fd); will_return(__wrap_close, 0); vfu_destroy_ctx(vfu_ctx); |