[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PULL 00/14] Net patches
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PULL 00/14] Net patches |
Date: |
Tue, 8 Mar 2016 16:54:38 +0700 |
On 8 March 2016 at 16:06, Zhang Chen <address@hidden> wrote:
> I found the reason for this problem is that
> unix_connect() have not connect to sock_path before iov_send().
> It need time to establish connection. so can we fix it with usleep()
> like this:
>
> recv_sock = unix_connect(sock_path, NULL);
> g_assert_cmpint(recv_sock, !=, -1);
> + usleep(1000);
>
> ret = iov_send(send_sock[0], iov, 2, 0, sizeof(size) +
> sizeof(send_buf));
> g_assert_cmpint(ret, ==, sizeof(send_buf) + sizeof(size));
> close(send_sock[0]);
>
> ret = qemu_recv(recv_sock, &len, sizeof(len), 0);
I would prefer it if we could find a way to fix this race
reliably rather than just inserting a delay and hoping it
is sufficient. Otherwise the test is likely to be unreliable
if run on a heavily loaded or slow machine.
thanks
-- PMM
- [Qemu-devel] [PULL 11/14] rocker: allow user to specify rocker world by property, (continued)
- [Qemu-devel] [PULL 11/14] rocker: allow user to specify rocker world by property, Jason Wang, 2016/03/06
- [Qemu-devel] [PULL 12/14] filter: Add 'status' property for filter object, Jason Wang, 2016/03/06
- [Qemu-devel] [PULL 13/14] filter-buffer: Add status_changed callback processing, Jason Wang, 2016/03/06
- [Qemu-devel] [PULL 14/14] net: check packet payload length, Jason Wang, 2016/03/06
- Re: [Qemu-devel] [PULL 00/14] Net patches, Peter Maydell, 2016/03/07
- Re: [Qemu-devel] [PULL 00/14] Net patches, Jason Wang, 2016/03/08
- Re: [Qemu-devel] [PULL 00/14] Net patches, Wen Congyang, 2016/03/08
- Re: [Qemu-devel] [PULL 00/14] Net patches, Jason Wang, 2016/03/08
- Re: [Qemu-devel] [PULL 00/14] Net patches, Zhang Chen, 2016/03/08
- Re: [Qemu-devel] [PULL 00/14] Net patches, Wen Congyang, 2016/03/08
- Re: [Qemu-devel] [PULL 00/14] Net patches,
Peter Maydell <=
- Re: [Qemu-devel] [PULL 00/14] Net patches, Wen Congyang, 2016/03/08
- Re: [Qemu-devel] [PULL 00/14] Net patches, Li Zhijian, 2016/03/08
- Re: [Qemu-devel] [PULL 00/14] Net patches, Wen Congyang, 2016/03/09
- Re: [Qemu-devel] [PULL 00/14] Net patches, Jason Wang, 2016/03/14
- Re: [Qemu-devel] [PULL 00/14] Net patches, Jason Wang, 2016/03/09
- Re: [Qemu-devel] [PULL 00/14] Net patches, Li Zhijian, 2016/03/09
- Re: [Qemu-devel] [PULL 00/14] Net patches, Jason Wang, 2016/03/14
- Re: [Qemu-devel] [PULL 00/14] Net patches, Li Zhijian, 2016/03/14