bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Test failures in coreutils-5.3.0 on cygwin


From: Jim Meyering
Subject: Re: Test failures in coreutils-5.3.0 on cygwin
Date: Wed, 12 Jan 2005 17:45:55 +0100

Eric Blake <address@hidden> wrote:
> As for tests/chgrp/basic, further investigation shows that you are using
> `ls -c -t f g' to sort the listings of the two files.  Did you intend to
> sort by ctime or by mtime?  The failure is that cygwin is listing g as

By ctime, as the `-c -t' options imply.
I suspect a problem with the syscalls.
Or maybe with the underlying file system.
For example, on SunOS with their tmpfs file system
there are similar problems.

> older than f.  Unfortunately, the temp files are deleted as part of the
> test; I tried reproducing the steps of the test in my /tmp:

You can arrange not to remove the temporary files in most
/bin/sh test scripts by commenting out the `trap ...' lines.

> $ touch f
> $ chown --from=:None -c :root f
> changed ownership of `f' to :root
> $ touch f g
> $ ~/coreutils-5.3.0/src/chgrp None f g
> $ ~/coreutils-5.3.0/src/chgrp root g
> $ sleep 1
> $ ~/coreutils-5.3.0/src/chgrp None f
> $ ~/coreutils-5.3.0/src/chgrp '' f
> $ stat f g
>   File: `f'
>   Size: 0               Blocks: 0          IO Block: 1024   regular empty file
> Device: d47c93feh/-730033154d   Inode: 340645      Links: 1
> Access: (0644/-rw-r--r--)  Uid: ( 1007/  eblake)   Gid: (  513/    None)
> Access: 2005-01-12 06:52:19.421500000 -0700
> Modify: 2005-01-12 06:52:19.421500000 -0700
> Change: 2005-01-12 06:51:35.952750000 -0700
>   File: `g'
>   Size: 0               Blocks: 0          IO Block: 1024   regular empty file
> Device: d47c93feh/-730033154d   Inode: 407455      Links: 1
> Access: (0644/-rw-r--r--)  Uid: ( 1007/  eblake)   Gid: (    0/    root)
> Access: 2005-01-12 06:52:19.421500000 -0700
> Modify: 2005-01-12 06:52:19.421500000 -0700
> Change: 2005-01-12 06:52:19.421500000 -0700
> $ ls -t f g
> f  g
> $ ls -c f g
> g  f
> $ ls -c -t f g
> g  f

Odd indeed.
It's as if chgrp doesn't affect ctime.

> Is there a bug in the cygwin syscalls used by chgrp not changing the ctime
> like it should?

Probably.

> You may want to consider moving the testsuite to an autotest framework
> from autoconf.  That would help in pinpointing some of the bugs, and has
> better support for keeping all temp files around when a test fails.

I actually began the conversion a couple of years ago, back when
autotest first appeared.  I vaguely remember finding that some of the
tests couldn't easily be shoehorned into that (very nice) framework, and
others were more concise and/or maintainable in the existing framework,
so I abandoned the effort.  Besides, most test failures these days are
due to old or broken systems.

But if someone volunteers to convert the /bin/sh scripts
to use autotest, I'd welcome the help.

>> If you run `make -k check', it will keep going in spite of failures.

Then you should use a make program that honors the -k option.
There must be a GNU make port to cygwin.

...
> User error -- I had copied and pasted from my terminal, rather than
> attaching, which flattened to spaces.  One more patch is necessary to
> account for $(EXEEXT): since `groups' is a script and does not have
> $(EXEEXT), the .x.1 rule was breaking when it tried to build groups.1.
>
> Updating man page groups.1
> groups.td/groups.exe: not found
> help2man: can't get `--help' info from groups.td/groups.exe
> make: *** [groups.1] Error 127
>
> 2005-01-12  Eric Blake  <address@hidden>  (tiny change)
>
>       * man/Makefile.am (.x.1): Don't use $(EXEEXT).

Thanks for the patch.

> Also, I noticed that you have both coreutils-5.3.0/tests/tr/repeat-compl.I
> and coreutils-5.3.0/tests/tr/repeat-Compl.I in the tarball (and the
> problem still exists in CVS).  This breaks in cygwin, which has case
> insensitive file names (only one of the two files gets unpacked), and is
> also a violation of the 8.3 file uniqueness naming rules required for
> porting to djgpp.  Please consider renaming files to make coreutils
> DOS-friendly.

I've just added code to detect such conflicts in the scripts that
generate/run many of the tests, and there are so many that I am reluctant
to obfuscate all of those test names to accommodate 8.3.  There was
already code to limit test names to 12 bytes so that derived temporary
file names would not exceed the limit of 14 imposed by some file systems,
and I found _that_ limiting.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]