Age | Commit message (Collapse) | Author |
|
These changes were mostly mechanical, made by running the
following command:
git grep -lw framework_failure | grep -v ChangeLog \
| xargs perl -pi -e 's/\b(framework_failure)\b/${1}_/'
and then editing init.cfg and `tests/cp/cp-a-selinux' by hand.
* tests/init.cfg (framework_failure): Remove, `framework_failure_'
from init.sh should be used instead in the tests.
Remove now-obsolete "FIXME" comment.
(is_local_dir_, require_strace_, require_membership_in_two_groups_,
require_sparse_support_, skip_if_mcstransd_is_running_,
mkfifo_or_skip_) Use `framework_failure_', not `framework_failure'.
* Many test scripts: Likewise.
|
|
* tests/init.cfg (framework_failure, getlimits_): Use 'fatal_'
instead of 'error_'.
(error_): Delete, it's not used anymore (and one is anyway
advised to use 'fatal_' instead).
Update heading comments.
* tests/shell-or-perl (error_): Renamed ...
(fatal_): ... to this, for consistency. Also, add a useful
comment.
|
|
* src/copy.c (create_hard_link): A new function refactored
from existing code.
(copy_internal): Call the new function from all 3 locations
that create hard links.
* tests/cp/same-file: Amend to match the adjusted diagnostic.
|
|
* tests/cp/preserve-link: Add test cases for when a missing
link in the destination tree is encountered first and second.
Also add cases for old and new separate files in the destination
tree, both to make the clobbering behavior explicit, and to
test any changes in this area in future.
|
|
* src/copy.c (copy_internal): Adjust formatting style to conform with
guidelines in HACKING: put braces around two one-line "else" blocks.
* tests/cp/existing-perm-dir: Use $(...), not `...`, and
stat rather than ls+cut to get the mode string.
mode=$(stat --p=%A dst/dir)
|
|
* src/copy.c (copy_internal): If we don't create the directory,
then we cannot have omitted permissions. Problem and trivial
fix reported by Eric Lammerts.
* tests/Makefile.am (TESTS): Add cp/existing-perm-dir.
* tests/cp/existing-perm-dir: New file.
|
|
* src/copy.c (copy_internal): With --update (-u), this function would
return early once it found that the destination is not older than the
source, *without* recording the source-dev/ino--to--dest_name mapping.
That mapping is required in order to preserve src hard links in the
destination tree, so when using cp with --update and --preserve=links
(perhaps via -p or -a), cp could fail to preserve one hard link
per inode when at least one of the hard-linked names already exists
in the destination tree.
Reported by Odd Harry Mannsverk in http://debbugs.gnu.org/8419.
* tests/cp/preserve-link: New file. Exercise the flaw/fix.
* tests/Makefile.am (TESTS): Add it.
* NEWS (Bug fixes): Mention it.
|
|
* src/timeout.c (settimeout): A new function to convert
from a floating point duration and call alarm() or
timer_settime() if that's available.
(parse_duration): Return a double rather than unsigned int.
(usage): Mention floating point is supported.
(main): Pass the double to settimeout() rather than
calling alarm() directly with the parsed int.
(cleanup): Likewise.
* doc/coreutils.texi (timeout invocation): Say floating point timeouts
now supported, and mention the caveat with resolution.
* bootstrap.conf: Include the timer-time gnulib module.
* tests/misc/timeout-parameters: Add a test with nanoseconds.
* NEWS: Mention the improvement.
|
|
The following dropped the space from the first field
printf "1234567 \t1\n" | unexpand -a
Note POSIX says that spaces should not precede tabs.
Also a single trailing space should not be converted
if the next field starts with non blank characters.
So we enforce those rules too, with this change.
* src/unexpand.c (unexpand): Implement as per POSIX rules.
* tests/misc/unexpand: Add tests, and adjust existing
tests as per POSIX rules.
* NEWS: Mention the fix.
Reported by Hallvard B Furuseth
|
|
* tests/misc/timeout: Check that 'timeout' is not confused when
starting off with a child.
|
|
Treat fractions as a request to round up to the next representable
value, and treat out-of-range values as maximal ones. This is
consistent with how "sleep" works. And this way, "timeout
999999999999999999d FOO" and "timeout 4.5 foo" are more likely to
do what the user wants.
* src/timeout.c: Include c-strtod.h and xstrtod.h, not xstrtol.h.
(apply_time_suffix): Change it to the way sleep.c's time_suffix
does things. Maybe this function (identical in both programs,
other than its name) should be moved to a library?
(parse_duration): Return a maximal value on overflow. Return
unsigned int, not unsigned long. Allow fractions, which round
up to the next integer value.
* tests/misc/timeout-parameters: Adjust tests to match new behavior.
Add a very large number.
|
|
* src/timeout.c (cleanup): Send signals directly to the child
in case it has started its own process group (like a cascaded
timeout command would for example).
* test/misc/timeout-group: Add a test case.
* NEWS: Mention the fix.
|
|
Or more accurately, commands not started from the shell prompt,
that are interactive, or need to receive Ctrl-C etc. from the terminal.
* doc/coreutils.texi (timeout invocation): Document --foreground.
* src/timeout.c (main): Set the foreground flag and don't create
a separate group.
(cleanup): Only send a signal directly to the monitored command
when the foreground flag is set.
(usage): Describe --foreground.
* tests/misc/timeout-group: Add a new test.
* tests/Makefile.am: Reference new test.
NEWS: Mention the new option.
Reported by Shay Shimony
Analysis by Alan Curry
Fix suggested by Paul Eggert
|
|
* tests/misc/md5sum: Exercise new --strict option.
|
|
* tests/ls/stat-free-color: The system may perform additional stat
calls upon loading (seen on OpenSuSE-11.4). Count only the number
of stat calls compared to --help.
This also reduces back to "1" the number of expected calls,
effectively reverting part of 2011-06-01 commit, ccf2d9a4.
|
|
* tests/cp/sparse-fiemap: Use "head -n99" in place of "head -99".
The latter is officially obsolete.
|
|
* tests/init.sh (warn_): Use "sed 1q" in place of "head -1".
The latter is officially obsolete but more portable than "head -n1".
Reported by Bernhard Voelker.
|
|
* tests/init.sh (w2_): Remove, moving contents into...
(warn_): ...here. Call self from subshell when IFS must be changed.
|
|
* tests/shell-or-perl: Prefer the `read' builtin over `grep' to
look at the shebang line of test scripts. Since `read' is a
special builtin, it might abort the whole program upon failures,
so add extra sanity checks, verifying that the test script exists
and is readable, before trying to read from it.
|
|
This change implements a more correct and idiomatic use of the
features of the Automake-provided 'parallel-tests' harness.
Moreover, this change is required in order for the testsuite to
continue to work with the new testsuite harness that is planned
to be introduced in Automake 1.12 (which, as of the writing date,
is still under development and in alpha state).
* tests/shell-or-perl: New auxiliary script.
* tests/Makefile.am (EXTRA_DIST): Distribute it.
* tests/check.mk (TESTS_ENVIRONMENT): Remove definition of the
`shell_or_perl_' shell function, whose code has been moved in
the new script above (with a few improvements and extensions).
Do not use it to run the test scripts.
(LOG_COMPILER): New, properly invoking `shell-or-perl'.
|
|
* tests/misc/sort-spinlock-abuse: Fix typo:
s/"very expensive" are/"very expensive" tests are/
|
|
Ensure that English diagnostics are emitted even when using
French sorting rules.
* tests/misc/sort-debug-keys: Unset LC_ALL and set LC_COLLATE,
LC_CTYPE and LC_NUMERIC to the fr_FR.UTF-8 locale, while setting
LC_MESSAGES=C. Reported by Stefano Lattarini.
|
|
* tests/misc/sort-spinlock-abuse: Classify as "very expensive" to
avoid unwarranted failure once and for all.
|
|
* tests/init.cfg (skip_test_): Remove function.
Use skip_ in place of skip_test_ everywhere else.
* cfg.mk (sc_prohibit_skip_): Remove rule.
* tests/**: Use skip_, not skip_test_, everywhere.
|
|
* tests/init.sh (warn_): When $stderr_fileno_ != 2,
emit the diagnostic to both the tty and the log file.
|
|
* tests/init.sh (warn_): Use printf, not echo. The latter would
misbehave when given strings containing a backslash or starting
with e.g., -n. James Youngman suggested setting IFS.
|
|
Running "make check" normally prints a diagnostic to the outermost
stderr (usually a tty) to explain why a test is skipped. It did this
by redirecting FD 9 to stderr (via "exec 9>&2") before invoking the
shell script. Shell scripts write skip-explanation to FD 9 via
init.sh's skip_ function. However, with ksh and HP-UX's /bin/sh,
the effects of "exec 9>&2" are canceled upon fork-and-exec, so we
would get a "Bad file number" diagnostic and no skip explanation on
those systems.
* tests/check.mk (TESTS_ENVIRONMENT): Redirect more portably, via
"$(SHELL) 9>&2", rather than the prior "exec 9>&2; $(SHELL) ..."
Actually, we use "shell_or_perl_ 9>&2", to make this effective
also for the perl-based tests.
* tests/init.sh (stderr_fileno_): Update the advice in comments.
See http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22488
for lots of discussion. Stefano Lattarini suggested the solution
of putting "9>&2" after the command. Reported by Bruno Haible.
|
|
* tests/init.sh: Sync recent changes from gnulib.
|
|
Revert "init.sh: accommodate shells for which 1>&$stderr_fileno_ fails"
This reverts commit 6fb9aeedd1b858a61d5cbf7f15782adf29ff733a.
That change did not solve the problem. For details, see
http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8846#74
|
|
* tests/init.sh (warn_): Use eval to work around a bug in some shells,
like those of Solaris 10 and HP-UX 11.11.
Improved by Stefano Lattarini.
|
|
* tests/misc/sort-spinlock-abuse: This test would frequently fail
when run on a system under heavy load. Increase duration and limit.
|
|
* tests/dd/nocache: Relax the test, as the system
may return various errors from posix_fadvise().
HPUX 11.31 returns ENOTTY for example.
Reported by Bruno Haible
|
|
* tests/tail-2/inotify-rotate: Increase timeout from 10s to 40s
to avoid load-induced false positive.
|
|
* tests/ls/stat-free-color: This test recently began to fail on
rawhide because dynamic library start-up code now stats "/selinux",
making the total number of calls 2 rather than the prior 1.
Create two more dangling symlinks, so that any erroneous stat-
or lstat-calling code will get at least those three.
|
|
* tests/split/suffix-length: Rename from tests/misc/split-a.
* tests/split/b-chunk: Rename from misc/split-bchunk.
* tests/split/fail: Rename from tests/misc/split-fail.
* tests/split/lines: Rename from tests/misc/split-l.
* tests/split/l-chunk: Rename from tests/misc/split-lchunk.
* tests/split/r-chunk: Rename from tests/misc/split-rchunk.
* tests/Makefile.am (TESTS): Reflect renaming.
|
|
* src/chown_core.c (describe_change): Accept the ownership of
the original file and output that when not changing.
This is significant when --from is specified as then
the original and specified ownership may be different.
(user_group_str): A new helper function refactored from
describe_change().
(change_file_owner): Pass the original user and group
strings to describe_change().
* test/chown/basic: Add a test case.
* NEWS: Mention the fix.
|
|
* src/split.c (main): Exit with a diagnostic if --filter
is specified along with a specific chunk number.
* test/split/filter: Ensure this combination fails.
|
|
* src/split.c (bytes_split): Stop reading when we
can no longer write to a child process.
(lines_rr): Likewise.
(lines_bytes_split): No change is made here since
input is bounded by the original file size.
* test/split/filter: Add test cases.
|
|
src/split.c (main): Don't unblock SIGPIPE before cleanup,
as then any pending signals will be sent and cause
the main split process to exit with a non zero status (141).
* test/split/filter: Add a test for this case.
|
|
* src/split.c (lines_bytes_chunk): Handle the edge case
where the file is truncated as we read.
* tests/misc/split-lchunk: Cleanup; no functional change.
|
|
* src/chmod.c (describe_change): Pass in the original mode,
and output this in the messages.
* tests/chmod/c-option: Adjust as per the new message.
* THANKS.in: Remove the now auto-generated name.
* NEWS: Mention the change in behavior.
Signed-off-by: Pádraig Brady <P@draigBrady.com>
|
|
* tests/ls/stat-free-color: Also check for stat64 and lstat64 syscalls.
This fixes a test failure reported by Stefano Lattarini.
|
|
* src/split.c (lines_chunk_split): Ensure that data is only
written to stdout when k specified. Also ensure that
extra files are not created when there is more data available
than reported in the file size.
* tests/misc/split-lchunk: Verify that split -n l/k/n doesn't
generate any files, and that -n l/n always generates n files.
* NEWS: Mention the fix.
|
|
* tests/misc/tac-continue: Fix typo in usually-skipped test:
s/mkfifo_or_skip/mkfifo_or_skip_/ (i.e., append "_").
This test is usually skipped, because I'm probably the only
one to set the FULL_PARTITION_TMPDIR envvar, and recently the
one I'd been using ceased to exist, so this test was skipped
even for me. Good argument for making this a root-only test
and creating a full partition just for this test case.
|
|
* src/printf.c (STRTOX): Don't access memory after a
string containing a single quote character.
* tests/misc/printf: Add tests for various combinations
of single quote characters combined with a numeric format.
* THANKS.in: Add bug reporter.
* NEWS: Mention the fix.
Reported-by: Paul Marinescu <paul.marinescu@imperial.ac.uk>
|
|
* tests/cp/existing-perm-race: s/mkfifo/mkfifo_or_skip_/
* tests/cp/file-perm-race: Likewise.
* tests/cp/parent-perm-race: Likewise.
* tests/cp/special-f: Likewise.
* tests/dd/reblock: Likewise.
* tests/ls/file-type: Likewise.
* tests/misc/cat-buf: Likewise.
* tests/misc/mknod: Likewise.
* tests/misc/printf-surprise: Likewise.
* tests/misc/selinux: Likewise.
* tests/misc/sort-spinlock-abuse: Likewise.
* tests/misc/stdbuf: Likewise.
* tests/misc/tac-continue: Likewise.
* tests/init.cfg: Improve the error message when skipping.
|
|
* gl/lib/randperm.c (randperm_new): When the number of items
to return H, is much smaller than the total number of items N,
use a hash to represent the sparse permutations of the set N.
This is currently enabled for N > 128K and N/H > 32.
* tests/misc/shuf: Ensure shuf can quickly return 2 numbers
from a large range.
* gl/modules/randperm: Depend on hash.
* NEWS: Mention the change.
|
|
* tests/du/bigtime (future_time): Split long line.
|
|
* cfg.mk (sc_prohibit_skip_): New rule.
* tests/init.cfg (skip_test_): Add a comment.
|
|
skip_test_ emits its diagnostic both to FD 9 (tty), and to
FD 2 (usually the log file), whereas init.sh's skip_ emits
only to FD 9. Without that, the log is slightly less useful.
* tests/cp/fiemap-2: Use skip_test_, not skip_.
* tests/cp/fiemap-perf: Likewise.
* tests/du/bigtime: Likewise.
* tests/du/files0-from-dir: Likewise.
* tests/du/move-dir-while-traversing: Likewise.
* tests/init.sh: Likewise.
* tests/misc/sort-stale-thread-mem: Likewise.
* tests/misc/stat-nanoseconds: Likewise.
* tests/mv/i-3: Likewise.
* tests/mv/sticky-to-xpart: Likewise.
* tests/split/filter: Likewise.
Prompted by a report from Pádraig Brady.
|