From: xiaoqiang zhao <zxq_yx_007@163.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: kwolf@redhat.com, peter.maydell@linaro.org, armbru@redhat.com,
qemu-devel@nongnu.org, kraxel@redhat.com, pbonzini@redhat.com,
marcandre.lureau@redhat.com
Subject: Re: [PATCH v3 2/3] tests/util-sockets: add abstract unix socket cases
Date: Thu, 14 May 2020 08:26:24 +0800 [thread overview]
Message-ID: <0b5b8953-a9b8-71e6-0f40-6ec2c464b211@163.com> (raw)
In-Reply-To: <20200513154931.GI1253949@redhat.com>
在 2020/5/13 下午11:49, Daniel P. Berrangé 写道:
> On Sun, May 10, 2020 at 02:14:21PM +0800, xiaoqiang zhao wrote:
>> add cases to test tight and non-tight for abstract address type
>>
>> Signed-off-by: xiaoqiang zhao<zxq_yx_007@163.com>
>> ---
>> tests/test-util-sockets.c | 83 +++++++++++++++++++++++++++++++++++++++
>> 1 file changed, 83 insertions(+)
>>
>> diff --git a/tests/test-util-sockets.c b/tests/test-util-sockets.c
>> index 5fd947c7bf..8042fb9276 100644
>> --- a/tests/test-util-sockets.c
>> +++ b/tests/test-util-sockets.c
>> @@ -227,6 +227,84 @@ static void test_socket_fd_pass_num_nocli(void)
>> g_free(addr.u.fd.str);
>> }
>>
>> +static gpointer unix_server_thread_func(gpointer user_data)
>> +{
>> + SocketAddress addr;
>> + Error *err = NULL;
>> + int fd = -1;
>> + int connfd = -1;
>> + struct sockaddr_un un;
>> + socklen_t len = sizeof(un);
>> + char name[] = "/tmp/unix-test.sock";
> Fixed filenames are bad, as even though this is the abstract
> namespace and thus safe from on-disk clashes, the abstract
> namespace is still OS global. We should append both the PID
> and a sequence of random bytes to get something which doesnt
> clash if two copies of the unit test run concurrently.
>
agree.
next prev parent reply other threads:[~2020-05-14 0:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-05-10 6:14 [PATCH v3 0/3] qemu-sockets: add abstract UNIX domain socket support xiaoqiang zhao
2020-05-10 6:14 ` [PATCH v3 1/3] " xiaoqiang zhao
2020-05-11 18:01 ` Eric Blake
2020-05-12 6:52 ` xiaoqiang.zhao
2020-05-13 15:52 ` Daniel P. Berrangé
2020-05-10 6:14 ` [PATCH v3 2/3] tests/util-sockets: add abstract unix socket cases xiaoqiang zhao
2020-05-13 15:49 ` Daniel P. Berrangé
2020-05-14 0:26 ` xiaoqiang zhao [this message]
2020-05-10 6:14 ` [PATCH v3 3/3] qemu-options: updates for abstract unix sockets xiaoqiang zhao
2020-05-13 15:50 ` Daniel P. Berrangé
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=0b5b8953-a9b8-71e6-0f40-6ec2c464b211@163.com \
--to=zxq_yx_007@163.com \
--cc=armbru@redhat.com \
--cc=berrange@redhat.com \
--cc=kraxel@redhat.com \
--cc=kwolf@redhat.com \
--cc=marcandre.lureau@redhat.com \
--cc=pbonzini@redhat.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).