From: DJ Delorie <dj@redhat.com>
To: "Carlos O'Donell" <carlos@redhat.com>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] locale/tst-localedef-path-norm: Don't create $(complocaledir)
Date: Thu, 30 Apr 2020 15:31:42 -0400 [thread overview]
Message-ID: <xnees493dt.fsf@greed.delorie.com> (raw)
In-Reply-To: <dd68911c-ce59-0e45-c301-1cd9f779c25c@redhat.com> (carlos@redhat.com)
"Carlos O'Donell" <carlos@redhat.com> writes:
> Given that we creat $(complocaledir) now we can cleanup an existing test
> and remove the xmkdirp for support_complocaledir_prefix.
>
> OK for master?
LGTM
Reviewed-by: DJ Delorie <dj@redhat.com>
> - /* 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
ok
> exactly as they specified it. */
> - xmkdirp (support_complocaledir_prefix, 0777);
Makefile does this for us. Ok.
> - xmkdirp ("/output", 0777);
> +#define ABSDIR "/output"
> + xmkdirp (ABSDIR, 0777);
Same function, but parameterized. Ok. The rest of the patch "just"
uses this macro.
>
> /* 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,
Ok.
> /* 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,
Ok^2
> /* 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,
Ok^3
> /* 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,
Ok^4
> /* 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,
Ok^5
> /* 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,
Ok^6
> /* 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,
Ok^7
> "-f", "UTF-8",
> - "/output/en_US7.UTF-8", NULL },
> + ABSDIR "/en_US7.UTF-8", NULL },
Ok.
> .exp = "en_US7.UTF-8",
> - .complocaledir = "/output"
> + .complocaledir = ABSDIR
Ok.
> /* 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,
Ok^8
> "-f", "UTF-8",
> - "/output/en_US8.UTF-8@tEsT", NULL },
> + ABSDIR "/en_US8.UTF-8@tEsT", NULL },
Ok.
> .exp = "en_US8.UTF-8@tEsT",
> - .complocaledir = "/output"
> + .complocaledir = ABSDIR
Ok.
> /* 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,
Ok^9
> "-f", "UTF-8",
> - "/output/en_US9@tEsT.UTF-8", NULL },
> + ABSDIR "/en_US9@tEsT.UTF-8", NULL },
Ok.
> .exp = "en_US9@tEsT.UTF-8",
> - .complocaledir = "/output"
> + .complocaledir = ABSDIR
Ok.
next prev parent reply other threads:[~2020-04-30 19:31 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-29 16:19 Carlos O'Donell
2020-04-30 19:31 ` DJ Delorie [this message]
2020-04-30 20:28 ` Carlos O'Donell
2020-05-02 18:15 ` H.J. Lu
2020-05-04 15:43 ` Carlos O'Donell
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=xnees493dt.fsf@greed.delorie.com \
--to=dj@redhat.com \
--cc=carlos@redhat.com \
--cc=libc-alpha@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).