<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/ls, branch v7.6</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.6</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.6'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-09-07T17:36:37Z</updated>
<entry>
<title>tests: ls/color-clear-to-eol: append NL to accommodate old sed</title>
<updated>2009-09-07T17:36:37Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-07T17:36:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9547a78bda1d4f01a782c869be248b5e0faf31f9'/>
<id>urn:sha1:9547a78bda1d4f01a782c869be248b5e0faf31f9</id>
<content type='text'>
* tests/ls/color-clear-to-eol: Some vendor sed programs fail
to operate on lines that are not NL-terminated.
This affects at least Solaris 10's /bin/sed.
Reported by Pádraig Brady.
</content>
</entry>
<entry>
<title>tests: ls/stat-vs-dirent: avoid spurious test failure</title>
<updated>2009-09-05T17:06:31Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-09-05T17:06:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=c392c4b8ef5de84d67d354bb2ecdd544466c50c8'/>
<id>urn:sha1:c392c4b8ef5de84d67d354bb2ecdd544466c50c8</id>
<content type='text'>
* tests/ls/stat-vs-dirent: Avoid test failure when run from a
directory whose name (or ancestor directory name) starts with ".".
</content>
</entry>
<entry>
<title>ls -i: print consistent inode numbers also for mount points</title>
<updated>2009-09-01T05:07:45Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-07-02T16:01:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a977dbbe78f4dcb64e008f41c8a46c4972af834b'/>
<id>urn:sha1:a977dbbe78f4dcb64e008f41c8a46c4972af834b</id>
<content type='text'>
On most unix- and linux-based kernels, ls -i DIR_CONTAINING_MOUNT_POINT
would print the wrong inode number for any entry that is a mount point.
It would do that by relying on readdir's dirent.d_ino values, while
most readdir implementations return the inode number of the underlying,
inaccessible directory.  Thus, it is not consistent with what you'd
get when applying stat to the same entry.  This bug led to surprising
results like "ls -i" and "ls -i --color" printing different numbers (ls
must usually "stat" a file to colorize its name).  This change makes it
so that on offending systems, ls must stat non-command-line-arguments
for which otherwise it would be able to use "for free" dirent.d_ino
values.  Regardless of this change, ls is already required to stat every
command-line argument.  Note: versions of GNU ls prior to coreutils-6.0
did not perform the invalid optimization, and hence always printed
correct inode numbers.  Thus, for the sake of correctness, ls -i is
forgoing the readdir optimization, for any kernel (including linux!)
with POSIX-nonconforming readdir.  Note that currently, only Cygwin has
been agile enough to conform.

* src/ls.c (RELIABLE_D_INO): Define.
(print_dir): Use it.
For plenty of discussion, see this long thread:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14020
This bug was introduced by the 2006-02-26 commit, 33eb3efe:
"In ls, avoid calling stat for --inode (-i), when possible."
* tests/ls/readdir-mountpoint-inode: New test.
* tests/Makefile.am (TESTS): Add it.
* tests/ls/stat-vs-dirent: Don't suppress failure of this test,
now that ls -i is fixed.  Though note that it doesn't test well,
since it compares only the always-stat'd command-line arguments.
* NEWS (Bug fixes): Mention it.
</content>
</entry>
<entry>
<title>global: convert indentation-TABs to spaces</title>
<updated>2009-08-25T07:21:00Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-08-22T16:56:06Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=5e778f7c8d1ecf3d8f11385db013af2ba026e2a5'/>
<id>urn:sha1:5e778f7c8d1ecf3d8f11385db013af2ba026e2a5</id>
<content type='text'>
Transformed via this shell code:
t=$'\t'
git ls-files \
  | grep -vE '(^|/)((GNU)?[Mm]akefile|ChangeLog)|\.(am|mk)$' \
  | grep -vE 'tests/pr/|help2man' \
  | xargs grep -lE "^ *$t" \
  | xargs perl -MText::Tabs -ni -le \
    '$m=/^( *\t[ \t]*)(.*)/; print $m ? expand($1) . $2 : $_'
</content>
</entry>
<entry>
<title>maint: update all Copyright year lists to include 2009</title>
<updated>2009-06-23T20:33:15Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-06-23T20:33:15Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2232b4d08fdc8ff3ae8e7aa1fa28c8315c41d9ad'/>
<id>urn:sha1:2232b4d08fdc8ff3ae8e7aa1fa28c8315c41d9ad</id>
<content type='text'>
</content>
</entry>
<entry>
<title>tests: ls --color, permissions override hardlink coloring</title>
<updated>2009-06-11T10:39:24Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-06-11T10:34:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=ba1c5239bc4b9719a20cedd35a313fa4237e7151'/>
<id>urn:sha1:ba1c5239bc4b9719a20cedd35a313fa4237e7151</id>
<content type='text'>
* tests/ls/multihardlink: Add a test case to demonstrate
and test this non obvious behavior.
</content>
</entry>
<entry>
<title>ls --color: do not colorize files with multiple hard links by default</title>
<updated>2009-06-11T07:53:50Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2009-06-10T17:44:43Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0df338f6719ec2bcf1e1dea2d8b12dc66daf8a1e'/>
<id>urn:sha1:0df338f6719ec2bcf1e1dea2d8b12dc66daf8a1e</id>
<content type='text'>
* src/ls.c: Rename hl-&gt;mh, do not colorize files with multiple
hard links by default.
* src/dircolors.c: Rename HARDLINK -&gt; MULTIHARDLINK, hl -&gt; mh.
* src/dircolors.hin: Do not colorize files with multiple hard links by
default.
* tests/Makefile.am: Rename the test case accordingly.
* tests/ls/multihardlink: Additionally test ls' default behavior
and factor out some duplication.
* NEWS: Mention the change in behavior.
</content>
</entry>
<entry>
<title>ls: fix alignment when month names have varying widths</title>
<updated>2009-04-02T23:34:11Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-03-24T14:29:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=612b647dd16d5abc03b295abe42d8b4a0fe660f7'/>
<id>urn:sha1:612b647dd16d5abc03b295abe42d8b4a0fe660f7</id>
<content type='text'>
Reported by Samuel Thibault and Stéphane Raimbault, as the glibc fr_FR
locale has recently changed to use the official but variable width
abbreviated month names. Other glibc locales also have variable widths.
http://sourceware.org/ml/libc-locales/2008-q1/msg00035.html
http://sourceware.org/bugzilla/show_bug.cgi?id=9859
* NEWS: Mention the fix
* gl/lib/mbsalign.c: A new module to align and truncate a
string in a specified number of screen cells, while handling
multi-byte characters appropriately.
* gl/lib/mbsalign.h: Ditto
* gl/modules/mbsalign: Ditto
* bootstrap.conf: Reference the new module
* src/ls.c (abmon_init): New function, precompute the abbreviated
months aligned left in a minimum width column &lt;= 5 screen cells.
(align_nstrftime): New function, replace the first %b in the
format specification to strftime with the precomputed month string.
Note using the cached month strings speeds up `ls -lU` by around 17%
on glibc-2.7-2 on linux at least.  Also if we implement this function
using heap storage rather than automatic storage, and use snprintf
instead of strcpy, ls will slow down by 2% and 1% respectively
(i.e. a net gain of 14% rather than 17%).
* tests/ls/abmon-align: A new test to test ls alignment for
various formats and locales
* tests/Makefile.am: Reference the new test
</content>
</entry>
<entry>
<title>ls: make it possible to disable coloring of hard links</title>
<updated>2009-03-24T16:11:00Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2009-03-24T11:16:20Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2827bb5704a153a0b4ac9c4af8b83ed015012f68'/>
<id>urn:sha1:2827bb5704a153a0b4ac9c4af8b83ed015012f68</id>
<content type='text'>
* src/ls.c (print_color_indicator): Don't color hard links if disabled
(when there is an empty hl= in the LS_COLORS environment variable).
* tests/ls/hardlink: Add test case for disabled hard link highlighting.
* NEWS: Mention the change.
</content>
</entry>
<entry>
<title>tests: using printf with \e for ESC isn't portable</title>
<updated>2009-02-25T21:43:07Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-02-25T18:51:04Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=bba5a47651a4a09f745f7f996c3b22fc410fabef'/>
<id>urn:sha1:bba5a47651a4a09f745f7f996c3b22fc410fabef</id>
<content type='text'>
* tests/ls/color-clear-to-eol: Use \33, not \e for ascii ESC.
This test failed when using the built-in printf of /bin/sh from
NetBSD 1.6.
</content>
</entry>
</feed>
