From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 5B322385802B; Fri, 23 Sep 2022 17:31:35 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 5B322385802B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1663954295; bh=muvktxbz2k7saKqC6XlquHmUfMq381+Ge7xwWFNdKEY=; h=From:To:Subject:Date:From; b=Fb0CbLoPEnHSFDgpkfm63DDpVlr5bsR523JMujlElCKViHC8sfohHlgKfWpaa0G2P //7EXz5y72LBbZHq1xsAQ2i0GCz76LSmMqZRalAM4uowBDvm15l+6FsJCK/3BKJ+u1 0gt0BV1wBq14ozd/DknRRzJMCY8N/iUZxR/UPyNM= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Florian Weimer To: glibc-cvs@sourceware.org Subject: [glibc] nss: Use shared prefix in IPv4 address in tst-reload1 X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/master X-Git-Oldrev: fecf481f0f853ec52f54075bbf06f31638298374 X-Git-Newrev: c02e29a0ba47d636281e1a026444a1a0a254aa12 Message-Id: <20220923173135.5B322385802B@sourceware.org> Date: Fri, 23 Sep 2022 17:31:35 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=c02e29a0ba47d636281e1a026444a1a0a254aa12 commit c02e29a0ba47d636281e1a026444a1a0a254aa12 Author: Florian Weimer Date: Fri Sep 23 19:30:57 2022 +0200 nss: Use shared prefix in IPv4 address in tst-reload1 Otherwise, sorting based on the longest-matching prefix in getaddrinfo can reorder the addresses in ways the test does not expect, depending on the IPv4 address of the host. Reviewed-by: Siddhesh Poyarekar Diff: --- nss/tst-reload1.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/nss/tst-reload1.c b/nss/tst-reload1.c index 9cc6115c96..c9db197d55 100644 --- a/nss/tst-reload1.c +++ b/nss/tst-reload1.c @@ -43,12 +43,12 @@ static struct passwd pwd_table_1[] = { static const char *hostaddr_5[] = { - "ABCD", "abcd", "1234", NULL + "ABCd", "ABCD", "ABC4", NULL }; static const char *hostaddr_15[] = { - "4321", "ghij", NULL + "4321", "4322", NULL }; static const char *hostaddr_25[] = @@ -86,12 +86,12 @@ static const char *hostaddr_6[] = static const char *hostaddr_16[] = { - "7890", "a1b2", NULL + "7890", "7891", NULL }; static const char *hostaddr_26[] = { - "qwer", "tyui", NULL + "qwer", "qweR", NULL }; static struct hostent host_table_2[] = {