From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp55.i.mail.ru (smtp55.i.mail.ru [217.69.128.35]) (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 473404696C3 for ; Thu, 16 Apr 2020 13:27:52 +0300 (MSK) Date: Thu, 16 Apr 2020 13:27:50 +0300 From: Sergey Ostanevich Message-ID: <20200416102750.GA3110@tarantool.org> References: <20200312102434.97300-1-roman.habibov@tarantool.org> <20200312102434.97300-3-roman.habibov@tarantool.org> <20200329090718.GD328@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Subject: Re: [Tarantool-patches] [PATCH v2 2/2] lua: return getaddrinfo() errors List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Roman Khabibov Cc: tarantool-patches@dev.tarantool.org 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? Otherwise looks good. Sergos