Re: xfstests can't be installed by running make install

2018-07-16 Thread Zorro Lang
On Tue, Jul 17, 2018 at 03:24:08PM +1000, Dave Chinner wrote:
> On Sun, Jul 15, 2018 at 03:11:10PM +0800, Eryu Guan wrote:
> > On Sun, Jul 15, 2018 at 03:43:20PM +1000, Dave Chinner wrote:
> > > On Thu, Jul 12, 2018 at 12:39:21AM +0800, Eryu Guan wrote:
> > > > The "wildcard" part is supposed to find all subdirs in tests dir, e.g.
> > > > "tests/ext4 tests/generic tests/xfs ...", files shouldn't be included.
> > > > So we get subdir list and go into each subdir and do install there.
> > > > 
> > > > But the same "wildcard" expression returns files too on fedora 28, e.g.
> > > > "tests/Makefile tests/ext4 tests/generic tests/xfs ...", as a result,
> > > 
> > > Should *never* return tests/Makefile, because that does not match
> > > the [a-z]* regex - it's a lowercase first character match, not
> > > uppercase. And the *only* things that should be in tests/ is the
> > > Makefile and all the test subdirs, so it shouldn't be matching the
> > > wrong thing. i.e. how are we getting tests/ as a result in the
> > > TESTS_SUBDIRS set?
> > 
> > That's why I think it's a bug of make. I did the following test on
> > Fedora 28 with make-4.2.1-6.fc28.x86_64.
> > 
> > [root@fedoravm tmp]# rpm -q make
> > make-4.2.1-6.fc28.x86_64
> > [root@fedoravm tmp]# pwd
> > /root/tmp
> > [root@fedoravm tmp]# ls -l
> > total 4
> > -rw-r--r--. 1 root root 206 Jul 15 14:58 Makefile
> > drwxr-xr-x. 1 root root   0 Jul 15 14:59 testdir
> > [root@fedoravm tmp]# cat Makefile 
> > STRING1 = $(wildcard $(CURDIR)/[a-z]*/)
> > STRING2 = $(wildcard ./[a-z]*/)
> > default:
> > @echo STRING1="$(STRING1)"
> > @echo STRING2="$(STRING2)"
> > [root@fedoravm tmp]# make
> > STRING1=/root/tmp/testdir/ /root/tmp/Makefile
> > STRING2=./testdir/ ./Makefile
> > [root@fedoravm tmp]#
> 
> So make 4.2.1 on fedora 28 has broken regex matching?
> 
> I just ran this on a debian based test machine:
> 
> $ make --version
> GNU Make 4.1
> 
> $ make
> STRING1=/home/dave/tmp_make/testdir/
> STRING2=./testdir/
> $
> 
> That works, but it's old. I just upgraded it to the lastest unstable
> package (4.2.1-1.1), which also upgraded glibc to 2.27-5. Looks like
> the make version matches fedora 28, but:
> 
> $ make --version
> GNU Make 4.2.1
> 
> $ make
> STRING1=/home/dave/tmp_make/testdir/
> STRING2=./testdir/
> $
> 
> the regex behaves correctly. So this looks like it might be
> something isolated to the fedora 28 distro package build or glibc
> version?

>From my testing:
1) make-4.2.1-4 built by glibc-2.26 works fine with glibc-2.26-27.
2) make-4.2.1-7 built by glibc-2.27 reproduce this bug with glibc-2.27-30.
3) make-4.2.1-4 built by glibc-2.26 reproduce this bug with glibc-2.27-30.
   Downgrade make forcibly by:
   # rpm -e --nodeps make
   # yum install make-4.2.1-4.xxx.rpm

Thanks,
Zorro

> 
> Cheers,
> 
> Dave.
> -- 
> Dave Chinner
> da...@fromorbit.com
> --
> To unsubscribe from this list: send the line "unsubscribe fstests" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: xfstests can't be installed by running make install

2018-07-16 Thread Eryu Guan
On Mon, Jul 16, 2018 at 07:48:26AM -0400, Paul Smith wrote:
> On Mon, 2018-07-16 at 15:30 +0800, Zorro Lang wrote:
> > > [root@fedoravm tmp]# ls -l
> > > total 4
> > > -rw-r--r--. 1 root root 206 Jul 15 14:58 Makefile
> > > drwxr-xr-x. 1 root root   0 Jul 15 14:59 testdir
> > > [root@fedoravm tmp]# cat Makefile 
> > > STRING1 = $(wildcard $(CURDIR)/[a-z]*/)
> > > STRING2 = $(wildcard ./[a-z]*/)
> > > default:
> > >  @echo STRING1="$(STRING1)"
> > >  @echo STRING2="$(STRING2)"
> > > [root@fedoravm tmp]# make
> > > STRING1=/root/tmp/testdir/ /root/tmp/Makefile
> > > STRING2=./testdir/ ./Makefile
> > > [root@fedoravm tmp]#
> 
> GNU make uses the system libc version of the glob(3) and fnmatch(3)
> functions to implement its wildcard function on any system which
> provides GNU libc.
> 
> So, if there's a change which introduces a problem with wildcard it is
> more likely to be related to the GNU libc implementation of glob() or
> fnmatch().
> 
> Unless you've somehow compiled GNU make to use its internal version of
> GNU glob()/fnmatch() instead of the system version.
> 
> I filed a bug about this with GNU libc a long time ago, and it was
> apparently fixed in GNU libc 2.19 in 2014.  So, I'm not sure why you've
> just started seeing it now.
> 
> https://sourceware.org/bugzilla/show_bug.cgi?id=10278

This problem here doesn't seem the same as the bug above, Fedora 28 has
glibc-2.27, which contains the fix for above bug, and the bug is about
trailing "/". But the problem here is we're asking for all lower case
filenames but wildcard returns upper case names too. e.g.

[root@fedoravm tmp]# pwd
/root/tmp
[root@fedoravm tmp]# ls -l
total 4
-rw-r--r--. 1 root root   0 Jul 17 10:51 aaa
-rw-r--r--. 1 root root   0 Jul 17 10:51 AAA
-rw-r--r--. 1 root root 273 Jul 17 10:50 Makefile
drwxr-xr-x. 1 root root   0 Jul 15 14:59 testdir
[root@fedoravm tmp]# cat Makefile
STRING1 = $(wildcard $(CURDIR)/[a-z]*/)
STRING2 = $(wildcard ./[a-z]*/)
STRING3 = $(wildcard $(CURDIR)/[a-z]*/.)
STRING4 = $(wildcard $(CURDIR)/[a-z]*)
default:
@echo STRING1="$(STRING1)"
@echo STRING2="$(STRING2)"
@echo STRING3="$(STRING3)"
@echo STRING4="$(STRING4)"
[root@fedoravm tmp]# make
STRING1=/root/tmp/aaa /root/tmp/AAA /root/tmp/testdir/ /root/tmp/Makefile
STRING2=./aaa ./AAA ./testdir/ ./Makefile
STRING3=/root/tmp/testdir/.
STRING4=/root/tmp/aaa /root/tmp/AAA /root/tmp/testdir /root/tmp/Makefile
[root@fedoravm tmp]#

STRING4 is asking for all lower file names, but both "AAA" and
"Makefile" are returned.

Thanks,
Eryu

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make


Re: xfstests can't be installed by running make install

2018-07-16 Thread Paul Smith
On Mon, 2018-07-16 at 15:30 +0800, Zorro Lang wrote:
> > [root@fedoravm tmp]# ls -l
> > total 4
> > -rw-r--r--. 1 root root 206 Jul 15 14:58 Makefile
> > drwxr-xr-x. 1 root root   0 Jul 15 14:59 testdir
> > [root@fedoravm tmp]# cat Makefile 
> > STRING1 = $(wildcard $(CURDIR)/[a-z]*/)
> > STRING2 = $(wildcard ./[a-z]*/)
> > default:
> >  @echo STRING1="$(STRING1)"
> >  @echo STRING2="$(STRING2)"
> > [root@fedoravm tmp]# make
> > STRING1=/root/tmp/testdir/ /root/tmp/Makefile
> > STRING2=./testdir/ ./Makefile
> > [root@fedoravm tmp]#

GNU make uses the system libc version of the glob(3) and fnmatch(3)
functions to implement its wildcard function on any system which
provides GNU libc.

So, if there's a change which introduces a problem with wildcard it is
more likely to be related to the GNU libc implementation of glob() or
fnmatch().

Unless you've somehow compiled GNU make to use its internal version of
GNU glob()/fnmatch() instead of the system version.

I filed a bug about this with GNU libc a long time ago, and it was
apparently fixed in GNU libc 2.19 in 2014.  So, I'm not sure why you've
just started seeing it now.

https://sourceware.org/bugzilla/show_bug.cgi?id=10278

___
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make