<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/ls/capability, branch v8.7</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v8.7</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v8.7'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2010-04-14T13:48:31Z</updated>
<entry>
<title>tests: avoid spurious failure of root-only ls/capability test</title>
<updated>2010-04-14T13:48:31Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-04-14T13:48:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=05bee6f116d81084f5796b2ab1ec12135fb72fc2'/>
<id>urn:sha1:05bee6f116d81084f5796b2ab1ec12135fb72fc2</id>
<content type='text'>
* tests/ls/capability: Adjust this test not to expect the no-op escape
sequence that was removed from all other tests by 2010-01-30 commit
5d43617e, "ls --color: don't emit a final no-op escape sequence".
</content>
</entry>
<entry>
<title>maint: ensure test independence from config macro format</title>
<updated>2010-01-23T22:53:52Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2010-01-22T19:26:16Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=014fead953b630560f308fe577cf5488f4c95bc0'/>
<id>urn:sha1:014fead953b630560f308fe577cf5488f4c95bc0</id>
<content type='text'>
* tests/cp/acl: Support USE_ACL not being defined.
* tests/mv/acl: Likewise. Also fix typo in skip message.
* tests/cp/preserve-slink-time: Support HAVE_UTIMENSAT being 0.
* tests/touch/no-dereference: Likewise.
* tests/ls/capability: Normalize so 1 is not required to be last char.
</content>
</entry>
<entry>
<title>maint: update all FSF copyright year lists to include 2010</title>
<updated>2010-01-01T13:06:47Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2010-01-01T09:56:28Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=1aa17dc89b3f313697661541adca0aa0defbdc09'/>
<id>urn:sha1:1aa17dc89b3f313697661541adca0aa0defbdc09</id>
<content type='text'>
Use this command:
git ls-files | grep -v COPYING \
  | xargs env UPDATE_COPYRIGHT_USE_INTERVALS=1 \
      build-aux/update-copyright
</content>
</entry>
<entry>
<title>ls: fix capability coloring</title>
<updated>2009-11-09T08:16:20Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-11-08T03:45:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=10d97b31910b0030f7716474a48b3fc8e00dd216'/>
<id>urn:sha1:10d97b31910b0030f7716474a48b3fc8e00dd216</id>
<content type='text'>
Capability checking was incorrectly done on just the base name
rather than on the whole path.  Consequently there could be both
false positives and negatives when coloring files with capabilities.
Also capability checking was not done at all in certain cases for
non executable files.  Note passing absolute rather than relative
names to cap_get_file() reduces the has_capability() overhead
from around 33% to 30%.  I.E. ls --color is now around 3% faster.

* src/ls.c (struct fileinfo): Add a has_capability member.
(print_color_indicator): Refactor to pass just a fileinfo pointer
and a flag to say if we're dealing with a symlink target.
(print_name_with_quoting): Likewise.
(gobble_file): Set has_capability in the fileinfo struct.  Also do
a capability check even if executable coloring is disabled.
Ditto for SETUID and SETUID coloring.
Comment on how expensive has_capability() is.
(print_long_format): Adjust to refactored print_name_with_quoting.
(quote_name): Likewise.
(print_file_name_and_frills): Likewise.
* tests/ls/capability: Test the various false positive and negatives.
* THANKS: Add reporter (Ivan Labath).
* NEWS: Mention the fix.
</content>
</entry>
<entry>
<title>tests: factor 350 fail=0 initializations into test-lib.sh</title>
<updated>2009-10-30T11:50:12Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2009-10-30T09:50:21Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=3c88587b2eadee11413f4207abbbf13af07c438d'/>
<id>urn:sha1:3c88587b2eadee11413f4207abbbf13af07c438d</id>
<content type='text'>
Run this command to remove the factored-out "fail=0" lines.
perl -ni -e '/^fail=0$/ or print' $(g grep -l '^fail=0$')
* tests/test-lib.sh: Initialize fail=0 here, not in 300+ scripts.
* tests/...: nearly all bourne shell scripts
Suggested by Eric Blake.
</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: skip a root-only test when configured without libcap</title>
<updated>2008-10-02T13:54:36Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-02T13:54:36Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7eb15e1020590ebc1f39e5679feea8f1106d241c'/>
<id>urn:sha1:7eb15e1020590ebc1f39e5679feea8f1106d241c</id>
<content type='text'>
* tests/ls/capability: Test for HAVE_CAP definition in config.h.
</content>
</entry>
<entry>
<title>tests: use "Exit $fail", not (exit $fail); exit $fail</title>
<updated>2008-09-10T11:20:10Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-09-07T08:31:27Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=68561594ca022703e255b3ef5686f176317e5fd4'/>
<id>urn:sha1:68561594ca022703e255b3ef5686f176317e5fd4</id>
<content type='text'>
* tests/test-lib.sh (Exit): New function by Ralf Wildenhues in automake
http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=20594c08f63
* tests/**: Convert all uses:

This restrictive change converted the vast majority:

  git grep -l '^(exit \$fail); exit \$fail$' \
    | xargs perl -pi -e 's/'^\(exit \$fail\); exit \$fail$/Exit \$fail/'

And this did the rest, plus a few undesirable ones, so I manually
backed out the changes to ChangeLog-* and build-aux/check.mk:

  git grep -l -E '\(exit [^)]+\); exit ' \
    | xargs perl -pi -e 's/\(exit (.+?)\); exit \1/Exit $1/'
</content>
</entry>
<entry>
<title>ls: --color now highlights files with capabilities, too</title>
<updated>2008-08-01T20:13:25Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2008-08-01T17:33:45Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=84f6abfe00b4ab533145623638b417a2221f9c75'/>
<id>urn:sha1:84f6abfe00b4ab533145623638b417a2221f9c75</id>
<content type='text'>
* src/ls.c: [HAVE_CAP] Include &lt;sys/capability.h&gt;.
(has_capability): New function for capability detection.
(print_color_indicator): Colorize file with capability.
* m4/jm-macro.m4: New configure option: --disable-libcap.
Check for libcap usability.
* src/Makefile.am (dir_LDADD, ls_LDADD, ...): Append $(LIB_CAP).
* src/dircolors.c: Update color lists.
* src/dircolors.hin: Mention new CAPABILITY color attribute.
* tests/ls/capability: Test for ls - colorize file with capability.
* tests/Makefile.am (root_tests): Add ls/capability.
* NEWS: Mention the change.
</content>
</entry>
</feed>
