summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2010-12-05tests: remove useless definition of $SORT in sort-compressJim Meyering
* tests/misc/sort-compress (SORT): Remove unused definition.
2010-12-04tests: make it harder to lose a race in spinlock-abuseJim Meyering
* tests/misc/sort-spinlock-abuse: On a busy system, with only 12 pauses of length 0.1 seconds, the buggy (busy-spinlock blocked) sort would fail to accumulate 1 second of CPU time, and hence would mistakenly pass. Increase from 12 to 50.
2010-12-03sort: merge_queue -> queuePaul Eggert
* src/sort.c (struct thread_args, sortlines_thread, sortlines, sort): Rename "merge_queue" to "queue", for consistency with other functions that just use the name "queue" for these things.
2010-12-03sort: clarify queue_check_insertPaul Eggert
* src/sort.c (queue_check_insert): Clarify body a bit, and remove no-longer-needed comment.
2010-12-03sort: fix problems with merge node dest pointerPaul Eggert
* src/sort.c (mergelines_node): Return void, not size_t. All callers changed. Change *node->dest here, not in caller. Do not change node->dest: it's not needed and could cause problems on (mostly theoretical) hosts that do not allow adding integers to null pointers. (queue_check_insert_parent): Omit MERGED parameter; no longer needed. All callers changed.
2010-12-03sort: simplify write_uniquePaul Eggert
* src/sort.c (write_unique): Simplify slightly so that there is just one call to write_line, not two.
2010-12-03sort: put queue arg firstPaul Eggert
* src/sort.c (queue_check_insert, queue_check_insert_parent): Make the queue arg first, for consistency with other functions such as queue_insert that put the queue arg first. Rename from check_insert and update_parent, respectively. All callers changed.
2010-12-03sort: tune struct_merge_node slightlyPaul Eggert
* src/sort.c (struct merge_node): 'lock' is now the actual lock, not a pointer to the lock; there's no need for indirection here. Make 'level' unsigned int instead of size_t, since it is a bit-shift count; also, move it next to a bool so that it's more likely to take less space. All uses changed. (sortlines, sort): Spell out initialization instead of using an initializer. This makes the initializer a bit easier to understand, and avoids unnecessary stores into the spin lock.
2010-12-03sort: Clarify commentsPaul Eggert
* src/sort.c: Improve comments a bit.
2010-12-03tests: cleanup rm -rf fails under NFSPaul Eggert
This problem was observed on RHEL 5.5 x86-64 when running as a client of a NetApp FAS2050. * tests/cp/cp-mv-backup: Don't leave a file descriptor open to a file in a directory that will be cleaned up with "rm -rf". Under NFS, when the rm unlinks that file, it is instead renamed to .nfsXXXX and then rm cannot remove the parent directory, and the test fails. * tests/cp/same-file: Likewise.
2010-12-03cp: fix bug with fine-grained src to nearby coarse-grained destPaul Eggert
The actual fix is in gnulib's lib/utimecmp.c. * NEWS: Document fix.
2010-12-03build: update gnulib submodule to latestPaul Eggert
2010-12-01sort: fix bug on 64-bit hosts with at least 32768 processorsPaul Eggert
* src/sort.c (MAX_MERGE): Avoid integer overflow when on a machine with (say) 32-bit int and 64-bit size_t and when level == 15. Without this fix, on such a machine with 32768 or more processors, the level computation could overflow on large input, and this would result in division by zero.
2010-12-01tests: add test for parallel sort -u segfault bugJim Meyering
* tests/misc/sort-unique-segv: New file. * tests/Makefile.am (TESTS): Add it.
2010-12-01sort -u: fix a thread-race pointer corruption bugPaul Eggert
* src/sort.c (write_unique): Save the entire "struct line", not just a pointer to one. Otherwise, with a multi-thread run, sometimes, with some inputs, fillbuf would would win a race and clobber a "saved->text" pointer in one thread just before it was dereferenced in a comparison in another thread. * NEWS (Bug fixes): Mention it.
2010-11-27tests: don't let the OMP_NUM_THREADS envvar affect sort testsJim Meyering
* tests/envvar-check (vars): Add OMP_NUM_THREADS.
2010-11-27tests: test for parallel sort spinlock abuseJim Meyering
* tests/misc/sort-spinlock-abuse: New file. * tests/Makefile.am (TESTS): Add it. (XFAIL_TESTS): Mark this as an expected-to-fail (for now) test.
2010-11-27tsort: suppress a valgrind memory leak warningPádraig Brady
* src/tsort.c (tsort): Unconditionally invoking the free() doesn't increase scalability, so do it only with -Dlint
2010-11-24maint: update the valgrind support scriptPádraig Brady
* README-valgrind: Include the "noinst" programs in those wrapped by valgrind. Update $PATH in check.mk rather than Makefile.am. Make wrapper scripts work when suppressions not setup. Keep lines < 80 chars.
2010-11-22cp: give a better diagnostic for nonexistent dest/Paul Eggert
This patch was written by Jim Meyering and myself. * src/copy.c (copy_reg): Turn EISDIR to ENOTDIR to improve the quality of diagnostics for commands like "cp a nosuch/". Reported by Марк Коренберг and Alan Curry in the thread starting at: http://lists.gnu.org/archive/html/bug-coreutils/2010-11/msg00178.html * THANKS: Update. * tests/mv/trailing-slash: Add a test.
2010-11-22split: add --number to generate a particular number of filesChen Guo
* src/split.c (usage, long_options, main): New options --number, --unbuffered, --elide-empty-files. (set_suffix_length): New function to auto increase suffix length to handle a specified number of files. (create): New function. Refactored from cwrite() and ofile_open(). (bytes_split): Add max_files argument to support byte chunking. (lines_chunk_split): New function. Split file into chunks of lines. (bytes_chunk_extract): New function. Extract a chunk of file. (of_info): New struct. Used by functions lines_rr and ofile_open to keep track of file descriptors associated with output files. (ofile_open): New function. Shuffle file descriptors when there are more output files than available file descriptors. (lines_rr): New function to distribute lines round-robin to files. (chunk_parse): New function. Parses K/N syntax. * tests/misc/split-bchunk: New test for byte chunking. * tests/misc/split-lchunk: New test for line delimited chunking. * tests/misc/split-rchunk: New test for round-robin chunking. * tests/Makefile.am: Reference new tests. * tests/misc/split-fail: Add failure scenarios for new options. * tests/misc/split-l: Fix a typo. s/ln/split/. * doc/coreutils.texi (split invocation): Document --number. * NEWS: Mention the new feature. * .mailmap: Map new email address for shortlog. Signed-off-by: Pádraig Brady <P@draigBrady.com>
2010-11-19build: update gnulib to fix a syntax error in a testJim Meyering
2010-11-18maint: avoid NEWS-related syntax-check failureJim Meyering
* NEWS: Add 2nd blank line to separate latest changes from those of 8.7, to avoid syntax-check failure.
2010-11-18od: fix bugs in displaying floating-point valuesPaul Eggert
* NEWS: Describe patch. * bootstrap.conf (gnulib_modules): Add ftoastr. * src/od.c: Include ftoastr.h, not float.h. (FLT_DIG, DBL_DIG): Remove. No need to verify LDBL_DIG. (FMT_BYTES_ALLOCATED): No need to worry about floating point now, since this format is no longer used for floating point. (PRINT_FIELDS): New macro, with most of the guts of the old PRINT_TYPE. (PRINT_TYPE): Rewrite to use PRINT_FIELDS. (PRINT_FLOATTYPE): New macro. This uses the new functions from ftoastr. (print_float, print_double, print_long_double): Reimplement using PRINT_FLOATTYPE. (decode_one_format): Calculate field widths based on ftoastr-supplied macros. * tests/Makefile.am (TESTS): Add misc/od-float. * tests/misc/od-float: New file.
2010-11-18build: update gnulib submodule to latestPaul Eggert
2010-11-18maint: syntax-check: prevent new $VERBOSE/--version testsJim Meyering
* cfg.mk (sc_prohibit_verbose_version): New rule.
2010-11-17tests: convert tests/misc/selinux manuallyJim Meyering
2010-11-17tests: convert the multi-prog $VERBOSE/--version usesJim Meyering
E.g., -test "$VERBOSE" = yes && { env -- pwd --version; readlink --version; } +print_ver_ pwd readlink -test "$VERBOSE" = yes && { stdbuf --version; mv --version; } +print_ver_ stdbuf mv Use this command: git grep -l 'VERBOSE.*--version'|xargs perl -ni \ -e '/^test "\$VERBOSE" = yes && { .*--version/ or print,next;' \ -e 's/env -- //g;' \ -e 's/test "\$VERBOSE" = yes && { /print_ver_ /;' \ -e ' s/(\w+) --version;/$1/g; s/ *}$//; print'
2010-11-17tests: convert "... env -- prog --version" usesJim Meyering
E.g., -test "$VERBOSE" = yes && env -- pwd --version +print_ver_ pwd git grep -l 'VERBOSE.*--version'|xargs perl -pi -e \ 's/test "\$VERBOSE" = yes && env -- (\w+) --version/print_ver_ $1/'
2010-11-17tests: substitute the single-program $VERBOSE/--version usesJim Meyering
Automatically make all of the changes like this: -test "$VERBOSE" = yes && chgrp --version +print_ver_ chgrp git grep -l 'VERBOSE.*--version'|xargs perl -pi -e \ 's/test "\$VERBOSE" = yes && (\w+) --version/print_ver_ $1/'
2010-11-17tests: factor out VERBOSE-only --version-printing codeJim Meyering
* tests/init.cfg (print_ver_): New function.
2010-11-17tests: remove test-lib.sh; now all tests use gnulib's init.shJim Meyering
* tests/test-lib.sh: Remove file. No longer used. * tests/Makefile.am (EXTRA_DIST): Remove it here, too. * tests/sample-test: Correct a comment.
2010-11-17tests: convert remaining uses of test-lib.sh to init.shJim Meyering
RHS='. "\${srcdir=.}/init.sh"; path_prepend_ ../src' git grep -l test-lib.sh \ | xargs perl -pi -e 's,^\. \$srcdir/test-lib\.sh$,'"$RHS",
2010-11-17tests: convert 'if test "$VERBOSE" = yes; then' to test ... &&Jim Meyering
2010-11-17tests: convert first batch of tests from test-lib.sh to init.shJim Meyering
Initially, I did this, git grep -l srcdir/test-lib.sh|xargs perl -p0i -e '~180-byte script' but that line would have been much longer than the maximum permitted by coreutils' commit hook, and wasn't readable besides, so here's a more readable version: lhs=$(printf '%s\\n' \ 'if test "$VERBOSE" = yes; then' \ ' set -x' \ ' touch --version' \ 'fi' \ '' \ '. $srcdir/test-lib.sh' \ | sed 's/\$/\\\$/g;s/touch/(\\w+)/') rhs=$(printf '%s\\n' \ '. "${srcdir=.}/init.sh"; path_prepend_ ../src' \ 'test "$VERBOSE" = yes && FIXME --version' \ | sed 's/\$/\\\$/g;s/FIXME/\$1/') git grep -l srcdir/test-lib.sh|xargs perl -p0i -e "s,$lhs,$rhs,"
2010-11-17tests: move a comment so automated conversion worksJim Meyering
2010-11-17maint: add a NEWS-checking syntax-check ruleJim Meyering
* cfg.mk (sc_NEWS_two_empty_lines): New syntax-check rule.
2010-11-16build: add `patch` as a bootstrap dependencyPádraig Brady
* bootstrap.conf (buildreq): require `patch` as it's used by gnulib-tool to apply local diffs to gnulib modules
2010-11-16split: fail immediately if impossible to create a large filePádraig Brady
* src/split.c (main): Error if -[bC] value > OFF_T_MAX * tests/misc/split-fail: Adjust for the new lower limits
2010-11-16truncate: fix a very unlikely case for undiagnosed errorsPádraig Brady
src/truncate.c (main): Use a bool to store if an error occurred, rather than an int, to protect against overflow. (do_ftruncate): Likewise. Also change 0/false to mean failure rather than success.
2010-11-16maint: fix a new -Wpointer-sign gcc warningPádraig Brady
* src/csplit.c (max_out): Fix a new warning introduced with commit 6568b173, 2010-11-10, "csplit: do not rely on..."
2010-11-16build: enable the -Wpointer-sign gcc warningPádraig Brady
... when configured with the --enable-gcc-warnings option. This follows on from commit 34ef0a01, 2010-10-14, "sort: fix unportable cast of unsigned char * -> char *" * configure.ac: -Wall implicitly enables this warning so remove the explicit disabling.
2010-11-15maint: add a missed fadvise-tests modulePádraig Brady
* gl/modules/fadvise-tests: Add the module previously missed in commit 63b5e816, 2010-07-14, "fadvise: new module ...". * gl/tests/test-fadvise.c: Add a comment as to why we don't check return values.
2010-11-13doc: tweak NEWS and coreutils.texiPaul Eggert
* doc/coreutils.texi (stat invocation): Add sentence-ending period. * NEWS: Correct stat change description: s/floating point //. * cfg.mk (old_NEWS_hash): Update, to match this NEWS change.
2010-11-13post-release administriviaJim Meyering
* NEWS: Add header line for next release. * .prev-version: Record previous version. * cfg.mk (old_NEWS_hash): Auto-update.
2010-11-13version 8.7Jim Meyering
* NEWS: Record release date.
2010-11-13build: update gnulib...Jim Meyering
...to fix the failing update-copyright test, and for the openat portability fix.
2010-11-13build: update gnulib for linux 2.6.9 nanosleep workaroundJim Meyering
Also, do the following to avoid "make syntax-check" failure induced by new rules. * .x-sc_bindtextdomain: Exempt files with an #ifdef'd "main". * Makefile.am: Add this file.
2010-11-13maint: remove fstimeprec (variable precision time stamp) supportJim Meyering
The implementation of variable-precision time stamps relied on heuristics that made the output subtly nondeterministic, or at least hard to reproduce: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/21531/focus=21538 So, for now at least, we're removing that feature. * bootstrap.conf (gnulib_modules): Remove fstimeprec. * gl/lib/fstimeprec.c, gl/lib/fstimeprec.h: Remove files. * gl/modules/fstimeprec, gl/modules/fstimeprec-tests: Likewise. * gl/tests/test-fstimeprec.c: Remove file.
2010-11-13stat: do not provide variable precision time stampsJim Meyering
* src/stat.c: Don't include fstimeprec.c. (out_epoch_sec): Don't call fstimeprec. * NEWS: Update description. * doc/coreutils.texi: Likewise.