From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 2178) id 76A853857407; Thu, 13 Oct 2022 13:44:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 76A853857407 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1665668686; bh=cCtBvXDjVia5BpB3sHFbfhfhcCs8DPJNhtgwFTYLc5E=; h=From:To:Subject:Date:From; b=Q7uxC1vw+VFwUjt3ajcDoAk05a+oat+JxRDJ1mE10oOToud0ShjoVyOoKPn/hgifa JsGfs/cYL1fS4q8OEFBJB89kaior0F4ZGs1CMwdINUozT04ROJLyXdrHzPCg8nGW4h MCiwz0DB9B3D9ebg0MoJ/jx7abgUp+eKaimnEV5E= 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/release/2.35/master] nss: Use shared prefix in IPv4 address in tst-reload1 X-Act-Checkin: glibc X-Git-Author: Florian Weimer X-Git-Refname: refs/heads/release/2.35/master X-Git-Oldrev: 135c29bf9cda370a909bc3d17711c85564ba3913 X-Git-Newrev: f8730697d24f1ecdeb8a76d4a21f5e3da4d3e451 Message-Id: <20221013134446.76A853857407@sourceware.org> Date: Thu, 13 Oct 2022 13:44:46 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=f8730697d24f1ecdeb8a76d4a21f5e3da4d3e451 commit f8730697d24f1ecdeb8a76d4a21f5e3da4d3e451 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 (cherry picked from commit c02e29a0ba47d636281e1a026444a1a0a254aa12) 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 fdc5bdd65b..bc32bb132a 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[] = {