summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-04-21sleep,timeout: support overflowing floating point valuesPádraig Brady
* src/sleep.c (main): Allow ERANGE since we allow "inf" values. * src/timeout.c (parse_duration): Likewise. * tests/misc/sleep.sh: New file. Tests for sleep(1). * tests/misc/timeout-parameters.sh: Add case for newly allowed $LDBL_MAX. Also use returns_ throughout the file. Also avoid small timeout values which might give false failures under load.
2016-04-21tests: avoid potential overflows with `expr`Pádraig Brady
* cfg.mk (sc_prohibit_expr_unsigned): expr uses intmax_t internally when GMP is not available, so flag any uses of unsigned limits. * tests/misc/timeout-parameters.sh: Remove the overflow related to UINT_MAX as it's handled by the following case. Change the following case from 99... to $TIME_T_OFLOW to be more expressive in what it's actually testing. Directly check that commands succeed, rather than inspecting $? afterwards. * tests/dd/skip-seek-past-dev.sh: Guard against large device sizes. * tests/id/setgid.sh: Protect: Guard against large group IDs. * tests/misc/cut-huge-range.sh: Tweak comment to avoid syntax check. It's tempting to simplify to just skip the test if expr fails, but SIZE_MAX > INTMAX_MAX is the common case.
2016-04-20tests: fix recent false failure due to a racePádraig Brady
* tests/cp/parent-perm-race.sh: This new race introduced in commit v8.25-5-g632eda5 is quite hard to hit, but is due to `ls > fifo` doing write()/close()/exit() once `cp` has open() the source fifo. Then the subsequent comparison of the destination file may fail due to the file being missing or empty. Previously `ls` generated output that was independent of `cp`. Now we must wait for `cp` to finish before inspecting the destination file that it wrote.
2016-04-18tests: let mkdir/p-v.sh fail when compare failsBernhard Voelker
* tests/mkdir/p-v.sh: Set fail=1 when compare fails: the latter only sets a non-Zero return code; evaluating that is up to the caller.
2016-04-14seq: do not allow NaN argumentsBernhard Voelker
* src/seq.c (isnan): Define macro. (scan_arg): Add check if the given argument is NaN, and exit with a proper error diagnostic in such a case. (usage): Document it. * tests/misc/seq.pl: Add tests. * doc/coreutils.texi (seq invocation): Document the change. * NEWS (Changes in behavior): Mention the change.
2016-04-14seq: do not allow 0 as increment valueBernhard Voelker
* src/seq.c (main): Exit with an error diagnostic when the given step value is Zero. (usage): Document it. * doc/coreutils.texi (seq invocation): Likewise. * tests/misc/seq.pl: Add tests. * NEWS (Changes in behavior): Mention the change. Reported by Маренков Евгений in: http://bugs.gnu.org/23110
2016-04-14stat,tail: add support for M1FSYigal Korman
* src/stat.c (human_fstype): Add file system ID definition. * NEWS (Improvements): Mention the change, moving the previously added "prl_fs" change note from "Changes in behavior" to here. Fixes http://bugs.gnu.org/23283
2016-03-31stat: report type for "prl_fs" file systemsPádraig Brady
* src/stat.c (human_fstype): Identify the parallels file system. Also tag as remote so that tail(1) doesn't use inotify, which fails to detect changes made outside a VM. Fixes http://bugs.gnu.org/23143
2016-03-17date ls pr: fix time zone abbrs on SysV platformsPaul Eggert
The problematic code computed a struct tm in one time zone, and then printed it or converted it to a string in another. To be portable the same time zone needs to be used for both operations. On GNU platforms this is not an issue, but incorrect output can be generated on System V style platforms like AIX where time zone abbreviations are available only in the 'tzname' global variable. Problem reported by Assaf Gordon in: http://bugs.gnu.org/23035 * NEWS: Document the bug. * src/date.c (show_date): * src/ls.c (long_time_expected_width, print_long_format): * src/pr.c (init_header): * src/stat.c (human_time): Use localtime_rz instead of localtime, so that the time zone information is consistent for both localtime and time-formatting functions like fprintftime and nstrftime. For 'stat' this change is mostly just a code cleanup but it also causes stat to also print nanoseconds when printing time stamps that are out of localtime range, as this is more consistent with what other programs do. For programs other than 'stat' this fixes bugs with time zone formats that use %Z. * src/du.c, src/pr.c (localtz): New static var. (main): Initialize it. * src/du.c (show_date): New time zone argument, so that localtime and fprintftime use the same time zone information. All callers changed. * tests/misc/time-style.sh: New file. * tests/local.mk (all_tests): Add it. * tests/misc/date.pl: Test alphabetic time zone abbreviations.
2016-03-15maint: remove gl/lib/reg*.c.diff; no longer neededJim Meyering
* gl/lib/regcomp.c.diff: Remove file, now that gnulib's regcomp.c compiles regex.c with -Wno-unused-parameter. * gl/lib/regex_internal.h.diff: Likewise. * gl/lib/regex_internal.c.diff: This file induced a change to ensure that the "Idx" type was unsigned and to remove a few "VAR < 0" comparisons. These days, it is probably fine to stay in sync with gnulib/glibc's copies of these files, so remove these patches, too. * gl/lib/regexec.c.diff: Likewise. Prompted by a report by Assaf Gordon and a suggestion from Paul Eggert.
2016-03-09build: update gnulib submodule to latestEric Blake
Mainly for: *bdb72bc6 set-permissions: fix compilation on Cygwin * bootstrap: Sync with gnulib. * gl/lib/regcomp.c.diff: Regenerate against latest gnulib.
2016-03-06tests: avoid false-failure of split/filter.sh on XFSJim Meyering
* tests/split/filter.sh: Use OFF_T_MAX-1 rather than OFF_T_MAX as the size of a test file, to avoid false failure on an XFS file system (or any file system permitting a file of size OFF_T_MAX). Reported as http://bugs.gnu.org/22931
2016-03-04test: Document that -a and -o are undesirableEric Blake
POSIX recommends avoiding -a and -o, for good reason. src/test.c (usage): Mention that inherent ambiguities exist with binary -a and -o. Problem reported by Martin Gebert in: http://bugs.gnu.org/22909
2016-02-23all: be less strict about usage if POSIX 2008Paul Eggert
sort, tail, and uniq now support traditional usage like 'sort +2' and 'tail +10' on systems conforming to POSIX 1003.1-2008 and later. * NEWS: Document this. * doc/coreutils.texi (Standards conformance, tail invocation) (sort invocation, uniq invocation, touch invocation): Document new behavior, or behavior's dependence on POSIX 1003.1-2001. * src/sort.c (struct keyfield.traditional_used): Rename from obsolete_used, since implementations are now allowed to support it. All uses changed. (main): Allow traditional usage if _POSIX2_VERSION is 200809. * src/tail.c (parse_obsolete_option): Distinguish between traditional usage (which POSIX 2008 and later allows) and obsolete (which it still does not). * src/uniq.c (strict_posix2): New function. (main): Allow traditional usage if _POSIX2_VERSION is 200809. * tests/misc/tail.pl: Test for new behavior.
2016-02-22doc: document sort -o F F dangerPaul Eggert
Problem reported by Yanyan Jiang 蒋炎岩 in: http://bugs.gnu.org/22769 * doc/coreutils.texi (sort invocation): Mention possibility of 'sort -o F F' data loss during crashes.
2016-02-16date: free timezone variable to avoid valgrind warningDaniel Lockyer
* src/date.c (main): Free TZ variable to pacify valgrind, guarded by IF_LINT.
2016-02-15split: adjust recent --number changesPádraig Brady
* src/split.c (lines_rr): Reinstate the conditional setting of the WROTE boolean, as otherwise split -n r/1 would consume all input when all --filter commands are stopped. There was a test in place to check for this, but it was incorrect as detailed below. (input_file_size): Immediately disallow --number with non seekable inputs, as such an invocation is not currently generally supported and will fail as the data overflows the internal buffer. * tests/split/l-chunk.sh: Adjust to again disallow -n /dev/zero. Also change all '&& fail=1' checks to use the 'returns_ 1' form. * tests/split/filter.sh: Change the no longer supported /dev/zero case to a regular $OFF_T_MAX file (supported on XFS for example). Also fix the timeout(1) commands so they're not subject to pipefail issues.
2016-02-15stty: fix translated --help so the gettext header is not printedGöran Uddeborg
* src/stty.c (usage): Remove an erroneous call to translate an empty string, added in commit v8.23-112-g564f84a, which results in the gettext header being printed for translated languages. * THANKS.in: Remove the now committer. * NEWS: Mention the bug fix.
2016-02-12tests: don't wait forever on GNU/HurdPaul Eggert
* tests/cp/parent-perm-race.sh: Add timeouts so that the test does not wait forever on GNU/Hurd. This does not fix the underlying bug but at least lets the tests make progress. Problem reported by Nelson H.F. Beebe in: http://bugs.gnu.org/22624 Also, check that 'cp' actually copies the data; this is a better test anyway, and simplifies the test code. Also, avoid unlikely race if 'pid' is set in the environment.
2016-02-12split: fix problems with /dev/zeroPaul Eggert
Problem reported by Nelson H.F. Beebe in: http://bugs.gnu.org/22624 Other problems also fixed: basically, the code got confused because GNU/Linux reports that /dev/zero has size zero. * src/split.c (input_file_size): Now takes struct stat *, not just size. Always store the first buffer. All callers changed. Treat /dev/zero as an infinitely-large file, both on GNU/Linux where fstat and lseek say its size is zero, and on GNU/Hurd where they say the size is OFF_T_MAX. (cwrite): Return true on success. (bytes_split): Don't try to read past EOF, and stop if a write fails. (lines_rr): Omit stray check for ignorable errno. (main): Get file size only when n_units > 1, since that's the only time it is needed. Defer most of the work to input_file_size. * tests/split/l-chunk.sh: Adjust tests to match new behavior on oddball inputs.
2016-01-29doc: fix the --iso-8601 example in date --helpVincent Lefevre
* src/date.c (usage): The colon is used in the timezone offset since commit v8.24-64-g17bbf6c. * THANKS.in: Remove committer. Fixes http://bugs.gnu.org/22491
2016-01-24build: avoid dynamic linking issue on Solaris sparcPádraig Brady
Solaris Studio 12 on sparc (not x86) will not remove unused functions, thus leaving a reference to an undefined program_name symbol from emit_try_help(). * src/system.h (emit_try_help): Change from an inline function to a macro, so that the inline function is not actually defined in libstdbuf.c. Fixes http://bugs.gnu.org/22430
2016-01-20maint: post-release administriviaPádraig Brady
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2016-01-20version 8.25Pádraig Brady
* NEWS: Record release date.
2016-01-19tests: avoid false failure in tail inotify testPádraig Brady
* tests/tail-2/wait.sh: Restrict inotify specific test portion to local file systems and also not with ---disable-inotify specified. Failure noticed on NFS.
2016-01-19tests: avoid false failure due to remove() ignoring u-w on NFSPádraig Brady
* tests/rm/rm1.sh: Also remove the group write bit which was required on one NFS setup at least. Note u-w was enough to deny file creation, g-w was also required to deny file removal. * tests/rm/cycle.sh: Likewise. * tests/mv/perm-1.sh: Likewise.
2016-01-19tests: avoid false failure in preserve-slink-time.sh on GPFSPádraig Brady
* tests/cp/preserve-slink-time.sh: Add a delay between the ln and the cp so that there is enough difference between the timestamps so GPFS won't discard the update. Reported by Assaf Gordon.
2016-01-19tests: avoid false failure in shred-passes.shPádraig Brady
* tests/misc/shred-passes.sh: Specify an exact amount to shred, to avoid running out of simulated random data on file systems with a large st_blksize like GPFS for example. Reported by Assaf Gordon.
2016-01-19tail: disable inotify with only non existent filesPádraig Brady
tests/tail-2/F-headers.sh and test/tail-2/retry.sh fail on on remote file systems due to tail going into inotify mode due to not being able to determine the remoteness of the non existent files. * src/tail.c (any_non_remote_file): A new function used to disable inotify when there are no open files, as we can't determine remoteness in that case. * NEWS: Mention the bug fix.
2016-01-18all: don't unconditionally use leaf optimization for NFSPádraig Brady
* gnulib: Update to latest where the only change is to not unconditionally enable leaf optimization for fts on NFS, as it was seen to abort() with some NFS servers as per: https://bugzilla.redhat.com/1299169 This affects utilities that traverse directories like cp, rm, chmod etc. * NEWS: Adjust the improvement message to leave only XFS.
2016-01-18tests: adjust memory limits in head-c.shAssaf Gordon
* tests/misc/head-c.sh: Further increase the limit to 8MB over the base test command. 5.1MB was seen as minimum extra needed on FreeBSD 9.3 x86_64.
2016-01-18tests: adjust delays to avoid false positivesPádraig Brady
* tests/rm/dangling-symlink.sh: The effective delay was only 1.5s. So delay before the operation, and increase the iteration count by 1 to increase the delay to 6.3s. This failure was noticed once on a FreeBSD 10.2 x86_64 virtual machine. * tests/dd/stats.sh: Remove quotes on sleep argument to ensure arguments are accumulated appropriately. * tests/du/move-dir-while-traversing.sh: sleep before operation, to increase the effective delay from 1.6s to 3.2s. * tests/tail-2/flush-initial.sh: Likewise. * tests/tail-2/pipe-f2.sh: Sleep first so that the effective delay matches the commented value.
2016-01-18test: skip test rather than fail with Solaris 10 sedPádraig Brady
* tests/rm/r-root.sh: This test was seen to ERROR due to sed input not having a terminating '\n'. Therefore just skip with diagnostics upon failure to adjust the error output with sed. Reported by Assaf Gordon.
2016-01-16tests: fix false failure with spaces in absolute $PWDPádraig Brady
* tests/install/create-leading.sh: Ensure $PWD is quoted. Reported by `make dist-check`.
2016-01-16build: update gnulib submodule to latestPádraig Brady
Mainly for: * dce117a sig2str: list all signals on FreeBSD >= 7 * cff4b38 acl-permissions: port to USE_ACL==0 platforms
2016-01-16tests: show mount list on failure for df testsPádraig Brady
* init.cfg (dump_mount_list_): A new function to output the system mount list. * tests/df/df-symlink.sh: Call dump_mount_list_ upon failure. * tests/df/over-mount-device.sh: Likewise. * tests/df/problematic-chars.sh: Likewise. * tests/df/skip-rootfs.sh: Likewise. * tests/df/total-verify.sh: Likewise. * tests/df/unreadable.sh: Likewise.
2016-01-16tests: avoid false failure with BTRFS subvolumesPádraig Brady
* tests/df/df-symlink.sh: Only check the symmetry of the source <-> target lookup, when the source is only mounted once, which isn't the case if '.' is a BTRFS subvolume for example. Reported by Assaf Gordon on a default OpenSUSE 42.1 install.
2016-01-16mv: consistently warn about multiply specified source dirsPádraig Brady
* src/copy.c (copy internal): Remember directories irrespective of their link count, because on some file systems like BTRFS, directories always have a link count of 1.
2016-01-15tests: remove a non portable localtime testPádraig Brady
* tests/misc/date.pl: This test was dependent on perl unconditionally calling the system localtime() as date(1) does. However perl has its own configure checks in place to avoid buggy localtime implementations. Therefore comment out this test as a FIXME for now. This test was seen to fail on FreeBSD 10 where localtime() returns nonsense values instead of failing for arguments >= 2^56.
2016-01-15tests: adjust memory limits in head-c.shPádraig Brady
* tests/misc/head-c.sh: Further increase the limit, to account for the fact that head(1) needs at least 1.576MB over the base test command on FreeBSD 10. 4MB should be enough headroom while still providing over allocation protection. Reported by Assaf Gordon.
2016-01-15tests: simplify invalid signal determination for kill -lPádraig Brady
* src/operand2sig.c (operand2sig): Add a detailed comment explaining why we validate even very large shell exit status values. * tests/misc/kill.sh: Add a test case for the ksh scheme. Simplify the INVALID signal number determination which also avoids a false failure on systems like FreeBSD 10 with incomplete signal list (caused by inaccurate NSIG).
2016-01-15tests: support older fallocate number formatsPádraig Brady
* tests/cp/fiemap-extents.sh: Support RHEL6 fallocate which doesn't support IEC suffixes like "MiB" on numbers. Also add some extra framework_failure_ protections. Reported by Assaf Gordon.
2016-01-15tests: avoid coredumps when determining memory limitsPádraig Brady
* init.cfg (get_min_ulimit_v_): Refactor ulimit call to... (ulimit_supported_): ...here, and add calls to avoid coredumps.
2016-01-14sort: with --debug, flag setlocale() failures on OpenBSDPádraig Brady
Locale categories are not equivalent on OpenBSD, and LC_COLLATE only supports "C" for example. Now LC_ALL is supported to set multiple other categories on OpenBSD, so setlocale(LC_ALL, "") returns a string indicating which categories were updated and which ignored. Therefore... * src/sort.c (main): ...Call setlocale(LC_COLLATE, "") to explicitly check whether a specified LC_ALL or LC_COLLATE environment variable value is supported for the LC_COLLATE category. Also use !! to explicitly convert to bool to support c89 systems where bool is an int, and thus would get values > 1. Reported by Assaf Gordon.
2016-01-13maint: remove temporary doc/constants.texi-t during buildPádraig Brady
* doc/local.mk (constants.texi): Remove temp file.
2016-01-13maint: fix old spelling mistakes in NEWSPádraig Brady
* NEWS: s/descendent/descendant/; s/indiscriminite/indiscriminate/. * cfg.mk (old_NEWS_hash): Update via `make update-NEWS-hash`.
2016-01-13doc: suggest dd "sync" flag to maximize "nocache" effectivenessPádraig Brady
doc/coreutils.texi (dd invocation): Add oflag=sync to the streaming example. Also reference the "direct" flag. Mention this is only a request to the system. * src/dd.c (usage): Mention the "sync" flag along with "nocache". Also mention that it's only a request to drop the cache. * THANKS.in: Add reporter Francois Rigault.
2016-01-13doc: mention the '0#' printf flags with stat %aPádraig Brady
* src/stat.c (usage): Mention the '#' and '0' flags are useful with %a. * doc/coreutils.texi (stat invocation): Likewise. Also give an example printing unambiguous octal output. Reported at http://bugs.debian.org/810539
2016-01-13mv: fix data loss with repeated source dir and same destinationPádraig Brady
commit v8.23-31-g90aa291 failed to consider this case, where the previous rename has failed, thus causing the following to remove the specified directory: mv dir dir dir * src/copy.c (copy_internal): Assume this rename attempt has succeeded, as a previous failure will already have been handled, and we don't want to remove the source directory in this case. * tests/cp/duplicate-sources.sh: Consolidate this test file to... * tests/mv/dup-source.sh: ...here. Add test cases for same source and dest. * tests/local.mk: Remove the consolidated test. * NEWS: Mention the bug fix. Reported at https://bugzilla.redhat.com/1297464
2016-01-13tests: include part of wc-files0.sh skipped by mistakePádraig Brady
* tests/misc/wc-files0.sh: $fail is always set to 0, so correct the test to include that part of the test case.