From patchwork Wed Apr 29 16:19:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 38870 Return-Path: X-Original-To: siddhesh@gotplt.org Delivered-To: x15919427@pdx1-sub0-mail-mx61.g.dreamhost.com Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.2 with cipher ADH-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pdx1-sub0-mail-mx61.g.dreamhost.com (Postfix) with ESMTPS id 0D92A9D972 for ; Wed, 29 Apr 2020 09:19:46 -0700 (PDT) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D6F21395B828; Wed, 29 Apr 2020 16:19:44 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D6F21395B828 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1588177184; bh=Aa0BpAa2QCUc48SwnBT4mQozfVO/JATa79fI+wY5ZZ4=; h=To:Subject:Date:List-Id:List-Unsubscribe:List-Archive:List-Post: List-Help:List-Subscribe:From:Reply-To:From; b=U2CnMig39QhlXbQ5UljDCbESuquGLLosAavb5OsrreFm2qUgQJWk0T/wT/l21H95y oVvKsVpN4aqcgNycqY02XOcGHeMktJB9N2PNIfKLWavBPDDO6NMC6qgAZapHLUpKx2 Xd1LVQnkbnWBPbPH7Xn93wjMhqP0kQFaynjZhqb4= X-Original-To: libc-alpha@sourceware.org Delivered-To: libc-alpha@sourceware.org Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [205.139.110.120]) by sourceware.org (Postfix) with ESMTP id 1D90A395B036 for ; Wed, 29 Apr 2020 16:19:43 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org 1D90A395B036 Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-254-qApgDw7-PLeVSsigT-t6Og-1; Wed, 29 Apr 2020 12:19:41 -0400 X-MC-Unique: qApgDw7-PLeVSsigT-t6Og-1 Received: by mail-qt1-f200.google.com with SMTP id w12so3306472qto.19 for ; Wed, 29 Apr 2020 09:19:41 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:to:from:subject:organization:message-id:date :user-agent:mime-version:content-language:content-transfer-encoding; bh=Aa0BpAa2QCUc48SwnBT4mQozfVO/JATa79fI+wY5ZZ4=; b=WXfgq9Tnd5iC/N9AYVOWA583ZtSj77owf01bAFhuXuSKBOhFPtV0qEhFUbnTuf8d6M v4ASFYR9QSUfM9cdn3zSNSHkOS+TGtZRxAfo1Y8VV0Uz0gDtz5yjChbs0HVmK2rcKZnj S89YMcyxxUfMXiq28HkXGxwkliRxMZsJcopfbwRvJs23DLxGObSioankdbqnuzzkCgkE sGVsfKIENLhp8ib4JpuSvHv4kRzCfV8zhq6TkTNuOqnb1GiKE2qW9laFcZrWxcvwKsPd piH/Xv6jKcCvrPnFQNBwb1JAZKzYSihF7Xyz3ptJwQxgdXebgEg9XB3aioDXBghcrg/F gXew== X-Gm-Message-State: AGi0PuZOAULYT+vyO7BHOKvCSoV/1kHr4KFCM6PDTBjmd2fFXU8UJRIQ ql2tgRRsw6d129KTgBHGqiwKYSz0xammw/p3/eeOIfzJXdnXB2NG2DhcToFLFq4ciICcdPhFcy2 RDUgGlenEmhEY6IaQyJ3T X-Received: by 2002:ae9:ef92:: with SMTP id d140mr30643676qkg.363.1588177180652; Wed, 29 Apr 2020 09:19:40 -0700 (PDT) X-Google-Smtp-Source: APiQypJYe2ZBBBZ+ZLVMyhHrN6D+3E2JrIP6lMQPZt7f9HFii/5PFUVYQXjb2fy4iD268AqMwK8Lww== X-Received: by 2002:ae9:ef92:: with SMTP id d140mr30643658qkg.363.1588177180435; Wed, 29 Apr 2020 09:19:40 -0700 (PDT) Received: from [192.168.1.4] (198-84-170-103.cpe.teksavvy.com. [198.84.170.103]) by smtp.gmail.com with ESMTPSA id m40sm17269551qtc.33.2020.04.29.09.19.39 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 29 Apr 2020 09:19:39 -0700 (PDT) To: DJ Delorie , libc-alpha Subject: [PATCH] locale/tst-localedef-path-norm: Don't create $(complocaledir) Organization: Red Hat Message-ID: Date: Wed, 29 Apr 2020 12:19:38 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0 MIME-Version: 1.0 Content-Language: en-US X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-21.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_BL, RCVD_IN_MSPIKE_L3, SPF_HELO_NONE, SPF_PASS, TXREP autolearn=ham autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on server2.sourceware.org X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-Patchwork-Original-From: Carlos O'Donell via Libc-alpha From: Carlos O'Donell Reply-To: Carlos O'Donell Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" DJ, Given that we creat $(complocaledir) now we can cleanup an existing test and remove the xmkdirp for support_complocaledir_prefix. OK for master? 8< --- 8< --- 8< From aee0b1425d57dfb3769b192a79d1d14cf02616f1 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Tue, 28 Apr 2020 15:46:00 -0400 Subject: [PATCH] locale/tst-localedef-path-norm: Don't create $(complocaledir) We automatically create $(complocaledir) in the testroot.root now and so we don't need to create it in the test. --- locale/tst-localedef-path-norm.c | 41 +++++++++++++++----------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/locale/tst-localedef-path-norm.c b/locale/tst-localedef-path-norm.c index 0a77262484..5b81a2828d 100644 --- a/locale/tst-localedef-path-norm.c +++ b/locale/tst-localedef-path-norm.c @@ -92,15 +92,12 @@ do_test (void) /* We are running as root inside the container. */ prog = xasprintf ("%s/localedef", support_bindir_prefix); - /* Create the needed directories: - - We need the default compiled locale dir for default output. - - We need an arbitrary absolute path for localedef output. - - Note: Writing to a non-default absolute path disables any kind + /* We need an arbitrary absolute path for localedef output. + Writing to a non-default absolute path disables any kind of path normalization since we expect the user wants the path exactly as they specified it. */ - xmkdirp (support_complocaledir_prefix, 0777); - xmkdirp ("/output", 0777); +#define ABSDIR "/output" + xmkdirp (ABSDIR, 0777); /* It takes ~10 seconds to serially execute 9 localedef test. We could run the compilations in parallel if we want to reduce test @@ -109,7 +106,7 @@ do_test (void) tests saves disk space during testing. */ /* Test 1: Expected normalization. - Run localedef and expect output in /usr/lib/locale/en_US1.utf8, + Run localedef and expect output in $(complocaledir)/en_US1.utf8, with normalization changing UTF-8 to utf8. */ run_test ((struct test_closure) { @@ -123,7 +120,7 @@ do_test (void) }); /* Test 2: No normalization past '@'. - Run localedef and expect output in /usr/lib/locale/en_US2.utf8@tEsT, + Run localedef and expect output in $(complocaledir)/en_US2.utf8@tEsT, with normalization changing UTF-8@tEsT to utf8@tEsT (everything after @ is untouched). */ run_test ((struct test_closure) @@ -138,7 +135,7 @@ do_test (void) }); /* Test 3: No normalization past '@' despite period. - Run localedef and expect output in /usr/lib/locale/en_US3@tEsT.UTF-8, + Run localedef and expect output in $(complocaledir)/en_US3@tEsT.UTF-8, with normalization changing nothing (everything after @ is untouched) despite there being a period near the end. */ run_test ((struct test_closure) @@ -153,7 +150,7 @@ do_test (void) }); /* Test 4: Normalize numeric codeset by adding 'iso' prefix. - Run localedef and expect output in /usr/lib/locale/en_US4.88591, + Run localedef and expect output in $(complocaledir)/en_US4.88591, with normalization changing 88591 to iso88591. */ run_test ((struct test_closure) { @@ -167,7 +164,7 @@ do_test (void) }); /* Test 5: Don't add 'iso' prefix if first char is alpha. - Run localedef and expect output in /usr/lib/locale/en_US5.a88591, + Run localedef and expect output in $(complocaledir)/en_US5.a88591, with normalization changing nothing. */ run_test ((struct test_closure) { @@ -181,7 +178,7 @@ do_test (void) }); /* Test 6: Don't add 'iso' prefix if last char is alpha. - Run localedef and expect output in /usr/lib/locale/en_US6.88591a, + Run localedef and expect output in $(complocaledir)/en_US6.88591a, with normalization changing nothing. */ run_test ((struct test_closure) { @@ -195,7 +192,7 @@ do_test (void) }); /* Test 7: Don't normalize anything with an absolute path. - Run localedef and expect output in /output/en_US7.UTF-8, + Run localedef and expect output in ABSDIR/en_US7.UTF-8, with normalization changing nothing. */ run_test ((struct test_closure) { @@ -203,13 +200,13 @@ do_test (void) "--no-archive", "-i", "en_US", "-f", "UTF-8", - "/output/en_US7.UTF-8", NULL }, + ABSDIR "/en_US7.UTF-8", NULL }, .exp = "en_US7.UTF-8", - .complocaledir = "/output" + .complocaledir = ABSDIR }); /* Test 8: Don't normalize anything with an absolute path. - Run localedef and expect output in /output/en_US8.UTF-8@tEsT, + Run localedef and expect output in ABSDIR/en_US8.UTF-8@tEsT, with normalization changing nothing. */ run_test ((struct test_closure) { @@ -217,13 +214,13 @@ do_test (void) "--no-archive", "-i", "en_US", "-f", "UTF-8", - "/output/en_US8.UTF-8@tEsT", NULL }, + ABSDIR "/en_US8.UTF-8@tEsT", NULL }, .exp = "en_US8.UTF-8@tEsT", - .complocaledir = "/output" + .complocaledir = ABSDIR }); /* Test 9: Don't normalize anything with an absolute path. - Run localedef and expect output in /output/en_US9@tEsT.UTF-8, + Run localedef and expect output in ABSDIR/en_US9@tEsT.UTF-8, with normalization changing nothing. */ run_test ((struct test_closure) { @@ -231,9 +228,9 @@ do_test (void) "--no-archive", "-i", "en_US", "-f", "UTF-8", - "/output/en_US9@tEsT.UTF-8", NULL }, + ABSDIR "/en_US9@tEsT.UTF-8", NULL }, .exp = "en_US9@tEsT.UTF-8", - .complocaledir = "/output" + .complocaledir = ABSDIR }); return 0;