<feed xmlns='http://www.w3.org/2005/Atom'>
<title>coreutils/tests/Makefile.am, branch v7.1</title>
<subtitle>Mirror of https://https.git.savannah.gnu.org/git/coreutils.git/
</subtitle>
<id>https://git.shady.money/coreutils/atom?h=v7.1</id>
<link rel='self' href='https://git.shady.money/coreutils/atom?h=v7.1'/>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/'/>
<updated>2009-02-17T13:12:44Z</updated>
<entry>
<title>install: add --compare (-C) option to install file only when necessary</title>
<updated>2009-02-17T13:12:44Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2009-02-17T12:16:54Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=dac5f12c6ed1225bfb8043d9ff7227d29439a955'/>
<id>urn:sha1:dac5f12c6ed1225bfb8043d9ff7227d29439a955</id>
<content type='text'>
* src/install.c (have_same_content): New function to compare files
content.
(extra_mode): New function checking for non-permission bits in mode.
(need_copy): New function to check if copy is necessary.
(main): Handle new option --compare (-C).
(copy_file): Skip file copying if not necessary.
(usage): Show new option --compare (-C) in --help.
* tests/install/install-C: Basic tests for install --compare (-C).
* tests/install/install-C-root: Tests requiring root privileges.
* tests/install/install-C-selinux: Tests requiring SELinux.
* tests/Makefile.am: Add new tests for install --compare (-C).
* doc/coreutils.texi: Document new install option --compare (-C).
* NEWS: Mention the change.
</content>
</entry>
<entry>
<title>ls: clean up after wrapped+colored file names with clear-to-EOL</title>
<updated>2009-02-10T13:47:39Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-12-31T18:17:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=adc62b5d9f3b4ab575c57b1b76eb6ad257a09f2c'/>
<id>urn:sha1:adc62b5d9f3b4ab575c57b1b76eb6ad257a09f2c</id>
<content type='text'>
This change addresses a relatively unusual case: ls --color, with
a highlighted name being printed initially in the last row of a
terminal emulator (possibly followed by other lines of output) such
that it is wrapped onto the following line, as the terminal emulator
scrolls the output.  That would cause the entire following line to
be highlighted, even if the name happened to use only one position.
The least-invasive patch would have made colorized output larger for
all uses.  The approach taken below is more invasive, but limits the
increase in overhead to only those lines that are expected to wrap.
* src/ls.c (enum indicator_no): Add C_CLR_TO_EOL.
(indicator_name): Add "cl".
(color_indicator): Add default escape codes for "cl".
(print_long_format): Propagate width to print_name_with_quoting.
(print_name_with_quoting): Print new C_CLR_TO_EOL string if needed.
Return the width of what we're printing.
(print_file_name_and_frills): Propagate width.
(print_type_indicator): Return bool (aka width).
(print_many_per_line): Pass column position to print_* function.
(print_current_files): Likewise.
(print_horizontal): Likewise.
(print_with_commas): Likewise.
* src/dircolors.c (slack_codes): Add "CLRTOEOL".
(ls_codes): Add "cl".
* tests/ls/color-clear-to-eol: New file.  Test for this fix.
* tests/Makefile.am (TESTS): Add ls/color-clear-to-eol.
* THANKS: Update.
Reported by Alexander V. Lukyanov.  See thread for details:
http://thread.gmane.org/gmane.linux.kernel/740021/focus=14824
Thanks to Jan Engelhardt for helping me reproduce the problem.

Demonstrate with this in an 80-column xterm:
  seq 200 # to start in the "bottom" row
  touch zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz.foo
  env LS_COLORS='*.foo=0;31;42' ls -og --color=always

Before the fix, you'd see something like this:
(where the file name is printed in red on a green background,
and each "=" denotes a space on a green background)
...
  -rw-r--r--  1       0 Feb  5 11:31 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\
  zzzzzzzzzzzzzz.foo===================================================

After the patch, the trailing green spaces are gone:

  -rw-r--r--  1       0 Feb  5 11:31 zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz\
  zzzzzzzzzzzzzz.foo
</content>
</entry>
<entry>
<title>cp/mv: add xattr support</title>
<updated>2009-01-29T12:26:07Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2009-01-23T11:17:53Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=0889381cbfdbb4895e6b8693d14c0f5c77bc85bc'/>
<id>urn:sha1:0889381cbfdbb4895e6b8693d14c0f5c77bc85bc</id>
<content type='text'>
This patch was originally written by Andreas GrÃ¼nbacher, nowadays
available at
http://www.suse.de/~agruen/coreutils/5.91/coreutils-xattr.diff

* bootstrap.conf: Add gnulib module verror.
* po/POTFILES.in: Add lib/verror.c.
* m4/xattr.m4: Check for libattr availability, new configure option
--disable-xattr.
* m4/prereq.m4: Require gl_FUNC_XATTR.
* src/Makefile.am: Link cp, mv and ginstall with libattr.
* src/copy.h: Add preserve_xattr and require_preserve_xattr to
cp_options.
* src/copy.c (copy_attr_error): New function to handle errors during
xattr copying.
(copy_attr_quote): New function to quote file name in error messages
printed by libattr.
(copy_attr_free): Empty function requested by libattr to free quoted
string.
(copy_attr_by_fd): New fd-oriented function to copy xattr.
(copy_attr_by_name): New name-oriented function to copy xattr.
(copy_reg, copy_internal): Call copy_extended_attributes function.
* src/cp.c (usage): Mention new --preserve=xattr option.
(decode_preserve_arg): Handle new --preserve=xattr option.
* src/mv.c: Always attempt to preserve xattr.
* src/install.c: Never attempt to preserve xattr.
* tests/misc/xattr: New test for xattr support in cp, mv and install.
* tests/Makefile.am: Add the new test to list.
* doc/coreutils.texi: Mention xattr support, new --preserve=xattr
option.
* NEWS: Mention the change.
</content>
</entry>
<entry>
<title>tests: Add a test to verify shred's default operations</title>
<updated>2009-01-28T15:39:18Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2009-01-26T02:19:13Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=2f61473e85f984f8b65dc149553241ebef7b5e76'/>
<id>urn:sha1:2f61473e85f984f8b65dc149553241ebef7b5e76</id>
<content type='text'>
* tests/Makefile.am: add new test
* tests/misc/shred-passes: Verify the operations shred
does by default to overwrite and remove a zero length file.
</content>
</entry>
<entry>
<title>dd: Better handle user specified offsets that are too big</title>
<updated>2009-01-28T15:14:57Z</updated>
<author>
<name>Pádraig Brady</name>
<email>P@draigBrady.com</email>
</author>
<published>2008-11-20T10:28:31Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=460ebb078ed7bf249af745d8725d6c37e7f15b57'/>
<id>urn:sha1:460ebb078ed7bf249af745d8725d6c37e7f15b57</id>
<content type='text'>
Following are the before and after operations for seekable files,
for the various erroneous offsets handled by this patch:

skip beyond end of file
  before: immediately exit(0);
  after : immediately printf("cannot skip to specified offset"); exit(0);

skip &gt; max file size
  before: read whole file and exit(0);
  after : immediately printf("cannot skip: Invalid argument"); exit(1);
seek &gt; max file size
  before: immediately printf("truncate error: EFBIG"); exit(1);
  after : immediately printf("truncate error: EFBIG"); exit(1);

skip &gt; OFF_T_MAX
  before: read whole device/file and exit(0);
  after : immediately printf("cannot skip:"); exit(1);
seek &gt; OFF_T_MAX
  before: immediately printf("truncate error: offset too large"); exit(1);
  after : immediately printf("truncate error: offset too large"); exit(1);

skip &gt; device size
  before: read whole device and exit(0);
  after : immediately printf("cannot skip: Invalid argument"); exit(1);
seek &gt; device size
  before: read whole device and printf("write error: ENOSPC"); exit(1);
  after : immediately printf("cannot seek: Invalid argument"); exit(1);

* NEWS: Summarize this change in behavior.
* src/dd.c (skip): Add error checking for large seek/skip offsets on
seekable files, rather than deferring to using read() to advance offset.
(dd_copy): Print a warning if skip past EOF, as per FIXME comment.
* test/Makefile.am: Add 2 new tests.
* tests/dd/seek-skip-past-file: Add tests for first 3 cases above.
* tests/dd/seek-skip-past-dev: Add root only test for last case above.
</content>
</entry>
<entry>
<title>cp/mv: add --no-clobber (-n) option to not overwrite target</title>
<updated>2009-01-14T08:09:22Z</updated>
<author>
<name>Kamil Dudka</name>
<email>kdudka@redhat.com</email>
</author>
<published>2009-01-13T17:35:00Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=d01338eb3d30e5634f1b4d4179c229f54eea0b44'/>
<id>urn:sha1:d01338eb3d30e5634f1b4d4179c229f54eea0b44</id>
<content type='text'>
* src/cp.c (usage): Show new option -n in --help.
(main): Handle new option -n.
* src/mv.c (usage): Show new option -n in --help.
(main): Handle new option -n.
* doc/coreutils.texi: Document new cp/mv option -n.
* tests/cp/cp-i: Add tests for -f, -i and -n options.
* tests/mv/mv-n: New test for mv -n.
* tests/Makefile.am: Add test mv/mv-n to the list.
* NEWS: Mention the change.
</content>
</entry>
<entry>
<title>tests: ensure that chmod, chgrp and chown honor --silent</title>
<updated>2008-12-03T10:02:57Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-11-29T09:47:12Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=9b8023e69c3ae9cd54e724fe63bd81e55bc00e6a'/>
<id>urn:sha1:9b8023e69c3ae9cd54e724fe63bd81e55bc00e6a</id>
<content type='text'>
* tests/chmod/silent: New file, to test all three programs.
* tests/Makefile.am (TESTS): Add chmod/silent.
* NEWS (Bug fixes): Mention this.
The bug was introduced in 96a5d2ce6a53d96cb667af78f13e56fadcdb91e6.
</content>
</entry>
<entry>
<title>cp, mv: remove 3-year-deprecated+warned-about --reply option</title>
<updated>2008-12-01T16:03:37Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-10-08T06:51:38Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=7ef56a26fd911e551f1bd9d2783afb7fbed6c669'/>
<id>urn:sha1:7ef56a26fd911e551f1bd9d2783afb7fbed6c669</id>
<content type='text'>
* src/cp.c (reply_args, reply_vals): Remove globals.
[REPLY_OPTION]: Remove enum.
(long_opts) ["reply"]: Remove initializer.
(main): Remove case stmt.
* src/mv.c: Likewise.
Don't include "argmatch.h".  No longer used.
* NEWS (Changes in behavior): Mention this.
* tests/Makefile.am (TESTS): Remove mv/reply-no.
* tests/mv/reply-no: Remove file.
* tests/mv/i-link-no: Update, now that --reply= is gone.
</content>
</entry>
<entry>
<title>tests: start long-running cp/link-heap earlier</title>
<updated>2008-11-30T18:15:51Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-11-28T20:32:39Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=847ab6a518b0e5d88f4e1aba29aa1caeef889fa2'/>
<id>urn:sha1:847ab6a518b0e5d88f4e1aba29aa1caeef889fa2</id>
<content type='text'>
* tests/Makefile.am (TESTS): Move cp/link-heap nearer the start of the
list, so that its termination doesn't delay a parallel "make check".
</content>
</entry>
<entry>
<title>tests: dd: add a test for the required behavior</title>
<updated>2008-11-22T09:31:08Z</updated>
<author>
<name>Jim Meyering</name>
<email>meyering@redhat.com</email>
</author>
<published>2008-11-21T22:12:17Z</published>
<link rel='alternate' type='text/html' href='https://git.shady.money/coreutils/commit/?id=a5e53ecc2cf8404760094631a772d4ce255bdcac'/>
<id>urn:sha1:a5e53ecc2cf8404760094631a772d4ce255bdcac</id>
<content type='text'>
* tests/dd/reblock: New file.  Test for the required functionality.
Based on an example and discussion from this thread:
http://lists.gnu.org/archive/html/bug-coreutils/2008-11/msg00153.html
* tests/Makefile.am (TESTS): Add dd/reblock.
</content>
</entry>
</feed>
