[Tarantool-patches] [PATCH v2 2/2] lua: return getaddrinfo() errors

Sergey Ostanevich sergos at tarantool.org
Fri Apr 24 20:18:44 MSK 2020


On 24 апр 14:42, Roman Khabibov wrote:
> Hi! Thanks for the review.
> 
> > On Apr 16, 2020, at 13:27, Sergey Ostanevich <sergos at tarantool.org> wrote:
> > 
> > On 06 апр 05:08, Roman Khabibov wrote:
> >>>> +test_run:cmd("setopt delimiter ';'")
> >>>> +function check_err(err)
> >>>> +    if err == 'getaddrinfo: nodename nor servname provided, or not known' or
> >>>> +       err == 'getaddrinfo: Servname not supported for ai_socktype' or
> >>>> +       err == 'getaddrinfo: Name or service not known' or
> >>>> +       err == 'getaddrinfo: hostname nor servname provided, or not known' or
> >>>> +       err == 'getaddrinfo: Temporary failure in name resolution' or
> >>>> +       err == '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 
> >>> for the same error on different platforms. Could you please check for particular 
> >>> 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’t
> >> 
> > 
> > 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? 
> > 
> > Are you testing for correct error returned for a particular case?
> Don’t understand the question. I just check error messages that appeared
> after travis/gitlab testing.
> 
Different errors makes different messages. 
Same error can make different messages on different platforms. 

You put both into one: you don't care about what exact error came to
you, right? 

Is it something expected from this patch at all - to differentiate the
errors?

> > Otherwise looks good.
> > 
> > Sergos
> 


More information about the Tarantool-patches mailing list