From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <roman.habibov@tarantool.org>
Received: from smtp36.i.mail.ru (smtp36.i.mail.ru [94.100.177.96])
 (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
 (No client certificate requested)
 by dev.tarantool.org (Postfix) with ESMTPS id 4AD014696C3
 for <tarantool-patches@dev.tarantool.org>;
 Sun, 26 Apr 2020 06:16:31 +0300 (MSK)
Content-Type: text/plain;
	charset=utf-8
Mime-Version: 1.0 (Mac OS X Mail 13.0 \(3594.4.19\))
From: Roman Khabibov <roman.habibov@tarantool.org>
In-Reply-To: <20200424171844.GE112@tarantool.org>
Date: Sun, 26 Apr 2020 06:16:29 +0300
Content-Transfer-Encoding: quoted-printable
Message-Id: <05B1078E-1CD3-44D7-9CC7-D8CE7399FD48@tarantool.org>
References: <20200312102434.97300-1-roman.habibov@tarantool.org>
 <20200312102434.97300-3-roman.habibov@tarantool.org>
 <20200329090718.GD328@tarantool.org>
 <E1BA97E1-B48D-42F5-B3F2-BE71EF15876B@tarantool.org>
 <20200416102750.GA3110@tarantool.org>
 <451C0FA3-84FE-456A-86A2-77240532C63B@tarantool.org>
 <20200424171844.GE112@tarantool.org>
Subject: Re: [Tarantool-patches] [PATCH v2 2/2] lua: return getaddrinfo()
	errors
List-Id: Tarantool development patches <tarantool-patches.dev.tarantool.org>
List-Unsubscribe: <https://lists.tarantool.org/mailman/options/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=unsubscribe>
List-Archive: <https://lists.tarantool.org/pipermail/tarantool-patches/>
List-Post: <mailto:tarantool-patches@dev.tarantool.org>
List-Help: <mailto:tarantool-patches-request@dev.tarantool.org?subject=help>
List-Subscribe: <https://lists.tarantool.org/mailman/listinfo/tarantool-patches>, 
 <mailto:tarantool-patches-request@dev.tarantool.org?subject=subscribe>
To: Sergey Ostanevich <sergos@tarantool.org>
Cc: tarantool-patches@dev.tarantool.org



> On Apr 24, 2020, at 20:18, Sergey Ostanevich <sergos@tarantool.org> =
wrote:
>=20
> On 24 =D0=B0=D0=BF=D1=80 14:42, Roman Khabibov wrote:
>> Hi! Thanks for the review.
>>=20
>>> On Apr 16, 2020, at 13:27, Sergey Ostanevich <sergos@tarantool.org> =
wrote:
>>>=20
>>> On 06 =D0=B0=D0=BF=D1=80 05:08, Roman Khabibov wrote:
>>>>>> +test_run:cmd("setopt delimiter ';'")
>>>>>> +function check_err(err)
>>>>>> +    if err =3D=3D 'getaddrinfo: nodename nor servname provided, =
or not known' or
>>>>>> +       err =3D=3D 'getaddrinfo: Servname not supported for =
ai_socktype' or
>>>>>> +       err =3D=3D 'getaddrinfo: Name or service not known' or
>>>>>> +       err =3D=3D 'getaddrinfo: hostname nor servname provided, =
or not known' or
>>>>>> +       err =3D=3D 'getaddrinfo: Temporary failure in name =
resolution' or
>>>>>> +       err =3D=3D 'getaddrinfo: Name could not be resolved at =
this time' then
>>>>>> +        return true
>>>>>> +    end
>>>>>> +    return false
>>>>>> +end;
>>>>> I really doubt that different error messages from the set above =
will appear=20
>>>>> for the same error on different platforms. Could you please check =
for particular=20
>>>>> output for each case you trigger below?
>>>> Look at that:
>>>> =
https://travis-ci.org/github/tarantool/tarantool/jobs/546115892#L3581 - =
Linux failed
>>>> =
https://travis-ci.org/github/tarantool/tarantool/jobs/546115893#L3100 - =
macOS isn=E2=80=99t
>>>>=20
>>>=20
>>> Exactly, this means for the error EAI_NONAME those OSes have =
differnet
>>> messages. But you've put different errors in one bunch - I meant it
>>> should never return 'Temporary failure in name resolution' as a =
result
>>> for EAI_SERVICE, right?=20
>>>=20
>>> Are you testing for correct error returned for a particular case?
>> Don=E2=80=99t understand the question. I just check error messages =
that appeared
>> after travis/gitlab testing.
>>=20
> Different errors makes different messages.=20
> Same error can make different messages on different platforms.=20
>=20
> You put both into one: you don't care about what exact error came to
> you, right?=20
Right. The most important thing here is that the error is from =
getaddrinfo.

> Is it something expected from this patch at all - to differentiate the
> errors?
The idea of this patch is to throw a internal getaddrinfo error instead
of the obscure common  I/O error.

>>> Otherwise looks good.
>>>=20
>>> Sergos