All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zorro Lang <zlang@redhat.com>
To: fstests@vger.kernel.org
Subject: [PATCH] Makefile: replace lowercase letters regex with POSIX character class
Date: Thu, 19 Jul 2018 18:03:49 +0800	[thread overview]
Message-ID: <20180719100349.5968-1-zlang@redhat.com> (raw)

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


             reply	other threads:[~2018-07-19 10:46 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-19 10:03 Zorro Lang [this message]
2018-07-21 17:31 ` [PATCH] Makefile: replace lowercase letters regex with POSIX character class Eryu Guan

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=20180719100349.5968-1-zlang@redhat.com \
    --to=zlang@redhat.com \
    --cc=fstests@vger.kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.