summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2007-10-21Put always-failing programs first in PATH, so tests cannot mistakenly run ↵Jim Meyering
installed versions. * Makefile.maint (my-distcheck): Set up a bogus bin/ dir, to be used for "make check". Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-10-20* doc/coreutils.texi: Add a cross-reference to bashref's Process ↵Jim Meyering
Substitution node.
2007-10-20* doc/coreutils.texi (tee invocation): Fix typo. Add a little.Jim Meyering
2007-10-20Adjust tests to pass, now that Test.pm ones use check.mk.Jim Meyering
* tests/check.mk (vc_exe_in_TESTS): Adjust regexp not to match the "TESTS = $x-tests" line in each Test.pm-derived Makefile.am file. * tests/sort/main: Remove this unused file.
2007-10-20Ensure that Test.pm-derived tests use the right $PATH.Jim Meyering
* tests/Makefile.am.in: Include $(top_srcdir)/tests/check.mk.
2007-10-20Prevent "make check" from leaving mktemp /tmp/tmp.* files behind.Bob Proulx
* tests/misc/help-version (mktemp_args): Tell mktemp to create its temporary file in the current directory.
2007-10-16Show how to make tee redirect to multiple processes.Jim Meyering
2007-10-14Pull all TESTS_ENVIRONMENT settings "up" into tests/check.mk.Jim Meyering
* tests/Makefile.am.in (TESTS_ENVIRONMENT): Remove definition. * tests/chgrp/Makefile.am: Likewise. * tests/chmod/Makefile.am: Likewise. * tests/chown/Makefile.am: Likewise. * tests/cp/Makefile.am: Likewise. * tests/dd/Makefile.am: Likewise. * tests/du/Makefile.am: Likewise. * tests/install/Makefile.am: Likewise. * tests/ln/Makefile.am: Likewise. * tests/ls/Makefile.am: Likewise. * tests/misc/Makefile.am: Likewise. * tests/mkdir/Makefile.am: Likewise. * tests/mv/Makefile.am: Likewise. * tests/readlink/Makefile.am: Likewise. * tests/rm/Makefile.am: Likewise. * tests/rmdir/Makefile.am: Likewise. * tests/tail-2/Makefile.am: Likewise. * tests/touch/Makefile.am: Likewise. * tests/check.mk (TESTS_ENVIRONMENT) [EXEEXT, EGREP, MAKE, PERL]: [CONFIG_HEADER, build_programs, host_os, host_triplet, PATH]: [REPLACE_GETCWD, CU_TEST_NAME]: Add definitions here. * tests/misc/pwd-long: Use $abs_top_builddir/src, not $BUILD_SRC_DIR. * tests/dd/skip-seek: Don't use $ENV{PROG}. * tests/rm/empty-name: Likewise. * tests/rm/unreadable: Likewise. * tests/mv/i-1: Likewise.
2007-10-14Fix a minor typo.Jim Meyering
* configure.ac (AC_INIT): Fix a typo (s/9.6/6.9/) that makes a difference only when running "make dist" without a .git/ subdir.
2007-10-09Move the help-version test into misc/.Jim Meyering
* tests/help-version: Move to... * tests/misc/help-version: ...here. Source test-lib.sh, as usual. Use $abs_top_builddir, rather than ".." and "../..".
2007-10-09Make the runcon-no-reorder test slightly more general.Jim Meyering
* tests/misc/runcon-no-reorder: Don't hard-code "unconstrained_t". Use slightly more general "runcon $(id -Z)". Suggestion from Stephen Smalley.
2007-10-09Skip the chcon test on a system with no SELinux support.Jim Meyering
* tests/test-lib.sh (require_selinux_): New function. * tests/misc/chcon: Use it. * tests/misc/selinux: Use it here, too. * tests/cp/cp-a-selinux: and here. * tests/selinux: Remove file. * tests/Makefile.am (EXTRA_DIST): Remove selinux. Reported by Mike Frysinger and Bauke Jan Douma.
2007-10-09* src/dircolors.hin: Recognize .lzma as a compressed-file suffix.Jim Meyering
2007-10-09* configure.ac (AM_INIT_AUTOMAKE): Use dist-lzma, rather than dist-bzip2.Jim Meyering
2007-10-09Now that we don't install su, don't make misleading suggestions.Jim Meyering
* src/Makefile.am (install-exec-local) [$(INSTALL_SU) != yes]: Don't suggest running "make install-root". (uninstall-local) [$(INSTALL_SU) != yes]: Don't even check the installed binary.
2007-10-08When forming a truncated name, use the "[...]" prefix even forJim Meyering
an extremely long name in the current directory. * src/remove.c (full_filename_): Rename a local variable. Use two separate "truncated" variables, in case the second call to right_justify does not indicate any truncation -- which would happen only if the single component FILENAME were longer than 511 bytes and DIR_NAME were empty.
2007-10-08rm could malfunction under unusual circumstances:Jim Meyering
When operating on a relative name longer than 511 bytes, and (when either processing a directory that is neither writable nor readable (but still searchable) or when determining whether to prompt), and encountering an ENOMEM error while forming the file name, rm would operate on a truncated-to-511-byte name starting with "[...]" rather than the intended one. * NEWS: Describe the bugs. * src/remove.c: Correct two misuses of full_filename: (full_filename0, xfull_filename): New functions. (full_filename_): Rewrite to use full_filename0. (AD_pop_and_chdir): Use xfull_filename, not full_filename. (write_protected_non_symlink): Likewise.
2007-10-07Don't let a helper function modify errno.Jim Meyering
* src/remove.c (full_filename_): Save and restore errno. Spotted by Bruno Haible.
2007-10-07Reflect 2->3 GPL copyright version update in gnulib.Jim Meyering
* gl/lib/tempname.h: Update copyright from gnulib. * gl/lib/tempname.c: Likewise. * .x-sc_GPL_version: Don't make an exception for those two files.
2007-10-07* configure.ac (AM_INIT_AUTOMAKE): Don't use dist-lzma just yet.Jim Meyering
2007-10-07New program: mktemp.Jim Meyering
* NEWS: Mention this. * README: Add mktemp to the list. * AUTHORS: Add this: mktemp: Jim Meyering * src/mktemp.c: New file. * src/Makefile.am (bin_PROGRAMS): Add mktemp. (mktemp_LDADD): Add $(LIB_GETHRXTIME). * man/mktemp.x: New file. * man/Makefile.am (dist_man_MANS): Add mktemp.1. (mktemp.1): New dependency. * man/.cvsignore: Add mktemp.1. * man/.gitignore: New file. * src/.cvsignore, src/.gitignore: Add mktemp. * tests/misc/mktemp: New file. * tests/misc/Makefile.am (TESTS): Add mktemp. * tests/Coreutils.pm (run_tests): Give the POST-test function access to stdout and stderr contents, so it can verify that the named-on-stdout file/dir does indeed exist and has proper permissions, etc. [po/ChangeLog] * POTFILES.in: Add src/mktemp.c.
2007-10-07Make tempname more random, via the randint module.Jim Meyering
* gl/modules/tempname (Depends-on): Add randint and stdbool. * gl/lib/tempname.c: Include randint.h and stdbool.h. (uint64_t): Remove definition. Not needed. [_LIBC] (RANDOM_BITS): Remove this block, now that we have proper random bits. (check_x_suffix): New function. (gen_tempname_len): Rename from __gen_tempname. Add a parameter, x_suffix_len, telling how many X's there must be at the end of the template. Use pseudo-random numbers all the way, rather than adding 7777 from one iteration to the next. (__gen_tempname): New function, to call gen_tempname_len, requiring a suffix length of 6. * gl/lib/tempname.h: Add prototype for gen_tempname_len. Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-10-07Convert coreutils' rand*.{c,h,m4} into modules.Jim Meyering
First step: move these files to gl/lib: * lib/rand-isaac.c, lib/rand-isaac.h * lib/randint.c, lib/randint.h * lib/randperm.c, lib/randperm.h * lib/randread.c, lib/randread.h Step 2: add modules/rand* and remove now-unneeded .m4 files. * gl/modules/randint: New file. * gl/modules/randperm: New file. * gl/modules/randread: New file. * m4/randint.m4: Remove file. * m4/randperm.m4: Remove file. * m4/randread.m4: Remove file. Step 3: use the new modules * bootstrap.conf (gnulib_modules): Add randint and randperm. * m4/prereq.m4 (gl_RANDINT, gl_RANDREAD, gl_RANDPERM): Don't require; These have been removed. (gl_ROOT_DEV_INO): Don't require; already handled via bootstrap.conf.
2007-10-07Copy from gnulib the parts of tempname that we'll modify.Jim Meyering
* gl/lib/tempname.c: Copy from gnulib. * gl/lib/tempname.h: Likewise. * gl/modules/tempname: Likewise. Allow GPLv2 on temporarily(?)-imported file from gnulib/libc. * .x-sc_GPL_version: New file. * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version
2007-10-07Avoid a pseudo-leak in sort.Jim Meyering
* src/sort.c (main) [lint]: Avoid a nominal leak.
2007-10-07Use puts, rather than printf ("%s\n". Slightly cleaner.Jim Meyering
* src/tsort.c (tsort): ...and more efficient.
2007-10-07Avoid seq malfunction on non-POSIX systems: mingw, BeOS, Interix.Jim Meyering
* bootstrap.conf (gnulib_modules): Add vasprintf-posix. Suggestion from Bruno Haible. Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-10-07Avoid a used-uninitialized error.Jim Meyering
* src/copy.c (copy_internal): Don't overload "use_stat".
2007-10-05Make a failing cross-partition mv give a sensible diagnostic.Jim Meyering
A cross-partition move of a file in a sticky tmpdir and owned by another user would evoke an invalid diagnostic after copying it: mv: cannot remove `x': Operation not permitted Either of the following (mv.c, remove.c) changes would fix the bug by itself. I think it's slightly better to use both; the added cost is minimal: mv: an extra lstat-per-mv-cmdline-arg-that-goes-cross-partition, rm: an extra lstat-per-unlink-that-fails-w/EPERM. * src/remove.c (remove_entry): Also lstat the file upon EPERM. * src/mv.c (rm_option_init): Initialize root_dev_ino just as is done in rm, so that a cross-partition invoked remove.c:rm call works the same way as one invoked from the command-line use of "rm". That setting of root_dev_ino makes rm() do the equivalent of an additional lstat for each argument, which in turn gives rm enough information to issue the right diagnostic. * tests/mv/sticky-to-xpart (version): New file. Test for the above. * tests/mv/Makefile.am (TESTS): Add sticky-to-xpart. Arrange for "make check-root" to run the new root-only test. * tests/Makefile.am (tb): New target, to run the new root-only test. (all_t): Add tb. * src/c99-to-c89.diff: Adjust offsets.
2007-10-05Add PACKAGE_VERSION to TESTS_ENVIRONMENT via check.mk.Jim Meyering
* tests/check.mk (TESTS_ENVIRONMENT): Add PACKAGE_VERSION here, rather than in every Makefile.am that needs it. * tests/rm/Makefile.am (TESTS_ENVIRONMENT): Remove PACKAGE_VERSION. * tests/misc/Makefile.am (TESTS_ENVIRONMENT): Likewise.
2007-10-05List two systems on which chroot works when run by non-root.Jim Meyering
2007-10-04Adapt to new gnulib naming scheme.Jim Meyering
* gl/lib/se-context.in.h: Rename from gl/lib/se-context_.h. * gl/lib/se-selinux.in.h: Rename from gl/lib/se-selinux_.h. * gl/m4/selinux-context-h.m4: Remove use of AC_LIBSOURCES. * gl/m4/selinux-selinux-h.m4: Likewise. * gl/modules/selinux-h (Files, Makefile.am): Reflect renaming. (Makefile.am) [lib_SOURCES]: Add se-context.in.h and se-selinux.in.h.
2007-10-04lib/search_.h: Remove unused file.Jim Meyering
2007-10-04* bootstrap (update_po_files): Work also when there are no .po files in po/.Jim Meyering
2007-10-04* bootstrap (slurp): Adapt to _.h -> .in.h name change.Jim Meyering
Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-10-04Remove test program: lib/t-fpending.c.Jim Meyering
* lib/t-fpending.c: Remove file. Now, this test is in gnulib. * lib/Makefile.am: Remove associated rules. * .gitignore: Remove lib/t-fpending.
2007-10-03* tests/misc/selinux: Skip this test if the initial chcon fails.Jim Meyering
2007-10-02Never copy through a symlink that cp has just created.Jim Meyering
* src/copy.c (copy_internal): When same-file detection requires 'stat'ing the destination file, also 'lstat' it and ensure that it wasn't the destination of a preceding copy operation. This bug was introduced on 2007-06-18. * tests/cp/abuse: New test for the above. * tests/cp/Makefile.am (TESTS): Add abuse.
2007-09-30cp: do not abbreviate in --help output.Jim Meyering
* src/cp.c (usage): Don't abbreviate: s/=link/=links/. Reported by Géraud Meyer in <http://bugs.debian.org/444137>. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-09-30Fix testsuite on cygwin.Eric Blake
* check.mk (%.log): Also allow suffix-less tests, on platforms where $(EXEEXT) is not empty. Signed-off-by: Eric Blake <ebb9@byu.net>
2007-09-30Test previous patch.Eric Blake
* tests/misc/groups-dash: New test. * tests/misc/Makefile.am (TESTS): Add it. Signed-off-by: Eric Blake <ebb9@byu.net>
2007-09-29* src/groups.sh: Don't ignore first argument if later argument is --.Eric Blake
Signed-off-by: Eric Blake <ebb9@byu.net>
2007-09-27Avoid spurious test failure when SELinux stats "selinux/class".Jim Meyering
* tests/ls/stat-free-symlinks: Grep for more precise /^stat("x"/.
2007-09-27Move file-set and hash-triple modules to gnulib.Jim Meyering
* bootstrap.conf (gnulib_modules): Remove file-set, now that it's in gnulib, and the canonicalize module requires it there. * gl/lib/file-set.c, gl/lib/file-set.h, gl/modules/hash-triple: Remove. * gl/lib/hash-triple.c, gl/lib/hash-triple.h, gl/modules/file-set: Remove.
2007-09-27Add a test to exercise a readlink bug.Jim Meyering
* tests/misc/readlink-fp-loop: New file. Test for the readlink bug fixed through today's change to Gnulib's canonicalize module. * tests/misc/Makefile.am (TESTS): Add readlink-fp-loop. Bug report and a test case from mpb.mail@gmail.com.
2007-09-27Make "Date input formats" easier to find in info filePádraig Brady
* doc/coreutils.texi (date invocation): `man date` gives all options for the date command except the description of the date input formats. Therefore it should be easy to browse to this info using `info date`. Signed-off-by: Pádraig Brady <P@draigBrady.com>
2007-09-25Use XOR, not OR to combine bits.Jim Meyering
* gl/lib/hash-triple.c (triple_hash): Use XOR (^), not OR (|), to combine the bits from hashing the name and those of the inode number. Add a few comments and remove out-of-context ones.
2007-09-24* NEWS: The recent rm-diagnostic fix also affects cross-partition "mv".Jim Meyering
2007-09-24copy.c: Remove definitions of factored-out functions.Jim Meyering
* src/copy.c: Include "file-set.h". (seen_file, record_file): Remove functions that I factored out on 2007-08-23.
2007-09-22Don't print the commands of a 10-line script that's run in each subdir.Jim Meyering
* tests/check.mk (vc_exe_in_TESTS): Add a leading "@", to reduce noise.