diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-io-channel-socket.c | 2 | ||||
-rw-r--r-- | tests/vhost-user-test.c | 17 |
2 files changed, 3 insertions, 16 deletions
diff --git a/tests/test-io-channel-socket.c b/tests/test-io-channel-socket.c index 855306b8dd..f73e063d7d 100644 --- a/tests/test-io-channel-socket.c +++ b/tests/test-io-channel-socket.c @@ -383,7 +383,7 @@ static void test_io_channel_unix(bool async) qapi_free_SocketAddress(listen_addr); qapi_free_SocketAddress(connect_addr); - unlink(TEST_SOCKET); + g_assert(g_file_test(TEST_SOCKET, G_FILE_TEST_EXISTS) == FALSE); } diff --git a/tests/vhost-user-test.c b/tests/vhost-user-test.c index 8b2164b99d..421d432f44 100644 --- a/tests/vhost-user-test.c +++ b/tests/vhost-user-test.c @@ -127,25 +127,12 @@ typedef struct TestServer { int fds_num; int fds[VHOST_MEMORY_MAX_NREGIONS]; VhostUserMemory memory; - GMutex data_mutex; - GCond data_cond; + CompatGMutex data_mutex; + CompatGCond data_cond; int log_fd; uint64_t rings; } TestServer; -#if !GLIB_CHECK_VERSION(2, 32, 0) -static gboolean g_cond_wait_until(CompatGCond cond, CompatGMutex mutex, - gint64 end_time) -{ - gboolean ret = FALSE; - end_time -= g_get_monotonic_time(); - GTimeVal time = { end_time / G_TIME_SPAN_SECOND, - end_time % G_TIME_SPAN_SECOND }; - ret = g_cond_timed_wait(cond, mutex, &time); - return ret; -} -#endif - static const char *tmpfs; static const char *root; |