* [PATCH] Makefile: replace lowercase letters regex with POSIX character class
@ 2018-07-19 10:03 Zorro Lang
2018-07-21 17:31 ` Eryu Guan
0 siblings, 1 reply; 2+ messages in thread
From: Zorro Lang @ 2018-07-19 10:03 UTC (permalink / raw)
To: fstests
Latest glibc changed some rules of sorting and regexes, the usage
likes "[a-z]" maybe not only stand for lowcase letters a..z in
different locale. Similar issues include [A-Z], [0-9] and so on.
For example, in en_US.UTF-8 locale, [a-z] means aAbBcCdD...zZ,
it stands for both of uppercase and lowercase. Currently this
issue cause `make install` fails on system with new glibc.
So use POSIX character class to instead of [...] group, something
likes [:lower:], [:upper:], [:alpha:], [:alnum:], etc... are common.
Signed-off-by: Zorro Lang <zlang@redhat.com>
---
Hi,
I found that there're two lines in common/config:
export LANG=C
export LC_ALL=C
That can make sure that all cases can use [a-z], [A-Z], [0-9] ...
as our expected. So we only need to fix this Makefile issue.
Due to I only find this one issue, so I'd like to use [:lower:].
If you prefer set locale in Makefile, please tell me.
Thanks,
Zorro
tests/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/Makefile b/tests/Makefile
index 11164e9e..8ce8f209 100644
--- a/tests/Makefile
+++ b/tests/Makefile
@@ -5,7 +5,7 @@
TOPDIR = ..
include $(TOPDIR)/include/builddefs
-TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[a-z]*/)))
+TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[[:lower:]]*/)))
include $(BUILDRULES)
--
2.14.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] Makefile: replace lowercase letters regex with POSIX character class
2018-07-19 10:03 [PATCH] Makefile: replace lowercase letters regex with POSIX character class Zorro Lang
@ 2018-07-21 17:31 ` Eryu Guan
0 siblings, 0 replies; 2+ messages in thread
From: Eryu Guan @ 2018-07-21 17:31 UTC (permalink / raw)
To: Zorro Lang; +Cc: fstests
On Thu, Jul 19, 2018 at 06:03:49PM +0800, Zorro Lang wrote:
> Latest glibc changed some rules of sorting and regexes, the usage
> likes "[a-z]" maybe not only stand for lowcase letters a..z in
> different locale. Similar issues include [A-Z], [0-9] and so on.
>
> For example, in en_US.UTF-8 locale, [a-z] means aAbBcCdD...zZ,
> it stands for both of uppercase and lowercase. Currently this
> issue cause `make install` fails on system with new glibc.
>
> So use POSIX character class to instead of [...] group, something
> likes [:lower:], [:upper:], [:alpha:], [:alnum:], etc... are common.
>
> Signed-off-by: Zorro Lang <zlang@redhat.com>
This looks fine to me, thanks for the fix!
Eryu
> ---
>
> Hi,
>
> I found that there're two lines in common/config:
> export LANG=C
> export LC_ALL=C
>
> That can make sure that all cases can use [a-z], [A-Z], [0-9] ...
> as our expected. So we only need to fix this Makefile issue.
> Due to I only find this one issue, so I'd like to use [:lower:].
>
> If you prefer set locale in Makefile, please tell me.
>
> Thanks,
> Zorro
>
> tests/Makefile | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/tests/Makefile b/tests/Makefile
> index 11164e9e..8ce8f209 100644
> --- a/tests/Makefile
> +++ b/tests/Makefile
> @@ -5,7 +5,7 @@
> TOPDIR = ..
> include $(TOPDIR)/include/builddefs
>
> -TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[a-z]*/)))
> +TESTS_SUBDIRS = $(sort $(dir $(wildcard $(CURDIR)/[[:lower:]]*/)))
>
> include $(BUILDRULES)
>
> --
> 2.14.4
>
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-07-21 18:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-07-19 10:03 [PATCH] Makefile: replace lowercase letters regex with POSIX character class Zorro Lang
2018-07-21 17:31 ` Eryu Guan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox