summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2007-09-15Convert tests/mkdir/ to use test-lib.sh.Jim Meyering
2007-09-15Move the two tests in tests/md5sum to tests/misc/md5sum.Jim Meyering
* tests/md5sum/basic-1: Move this file to ... * tests/misc/md5sum: ...here. Don't rely on $PROG in env. * tests/md5sum/newline-1: Move this file to ... * tests/misc/md5sum-newline: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add md5sum. * tests/Makefile.am (SUBDIRS): Remove md5sum. * tests/md5sum: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/md5sum/Makefile
2007-09-15tests/sample-test: Update to use test-lib.sh.Jim Meyering
2007-09-15Convert tests/misc/ to use test-lib.sh, too.Jim Meyering
2007-09-15Convert tests/ls/, too.Jim Meyering
2007-09-15Convert tests/ln/, too.Jim Meyering
2007-09-15Convert tests/install/, too.Jim Meyering
2007-09-15Move the two tests in tests/fmt to tests/misc/fmt.Jim Meyering
* tests/fmt/basic: Move this file to ... * tests/misc/fmt: ...here. Don't rely on $PROG in env. * tests/fmt/long-line: Move this file to ... * tests/misc/fmt-long-line: ...here. * tests/misc/Makefile.am (TESTS): Add fmt. * tests/Makefile.am (SUBDIRS): Remove fmt. * tests/fmt: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/fmt/Makefile
2007-09-15Move the sole test in tests/factor to tests/misc/factor.Jim Meyering
* tests/factor/basic: Move this file to ... * tests/misc/factor: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add factor. * tests/Makefile.am (SUBDIRS): Remove factor. * tests/factor: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/factor/Makefile
2007-09-15Move the sole test in tests/expr to tests/misc/expr.Jim Meyering
* tests/expr/basic: Move this file to ... * tests/misc/expr: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add expr. * tests/Makefile.am (SUBDIRS): Remove expr. * tests/expr: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/expr/Makefile
2007-09-15Convert tests/du/*, too.Jim Meyering
2007-09-15Move the sole test in tests/dircolors to tests/misc/dircolors.Jim Meyering
* tests/dircolors/simple: Move this file to... * tests/misc/dircolors: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add dircolors. * tests/Makefile.am (SUBDIRS): Remove dircolors. * tests/dircolors: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/dircolors/Makefile
2007-09-15Convert tests/dd/*, too.Jim Meyering
2007-09-15Convert tests/mv, too.Jim Meyering
* tests/other-fs-tmpdir: Before, all callers would exit 77 upon failure to find the required dir. Now, exit 77 in this script so callers don't have to. Adjust callers.
2007-09-15Adjust chgrp, chmod, chown, cp tests to use test-lib.sh.Jim Meyering
* tests/check.mk: Also define abs_top_builddir.
2007-09-15Parallel "make check" support.Jim Meyering
* build-aux/check.mk: New file, from The Vaucanson Group. * .x-sc_GPL_version: New file, to allow "version 2 or later" in build-aux/check.mk. * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version. * tests/check.mk: New file. * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh. Begin factoring "sample-test" out of test scripts. * tests/test-lib.sh: New file, to be sourced by all tests that were previously derived from the "sample-test" template. * tests/mkdtemp: New file. * tests/touch/dir-1: Use test-lib.sh. * tests/touch/empty-file: Likewise. * tests/touch/fail-diag: Likewise. * tests/touch/fifo: Likewise. * tests/touch/no-create-missing: Likewise. * tests/touch/no-rights: Likewise. Also, don't sleep. * tests/touch/not-owner: Likewise. * tests/touch/obsolescent: Likewise. * tests/touch/read-only: Likewise. * tests/touch/relative: Likewise. * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk, to get the parallel-"make check" bits. Move a slow test into tests/misc. * tests/check.mk: Wrapper. * tests/ls/time-1: Move this file to tests/misc/ls-time. * tests/misc/ls-time: New file. From tests/ls/time-1. * tests/ls/Makefile.am (TESTS): Remove time-1. * tests/misc/Makefile.am (TESTS): Add ls-time.
2007-09-15Add support for parallel "make check" (in tests/misc, for now)Jim Meyering
2007-09-07chmod: don't ignore a dangling symlinkJim Meyering
* NEWS: Mention the bug fix. * src/chmod.c (process_file): Handle the case of FTS_SLNONE, i.e., give a diagnostic saying we cannot operate on such a file. * tests/chmod/thru-dangling: Compare new stderr output with expected.
2007-09-07Add a test: demonstrate that chmod ignores a dangling symlinkBob Proulx
* tests/chmod/thru-dangling: New test. Fails. * tests/chmod/Makefile.am (TESTS): Add thru-dangling.
2007-09-05Adapt to new SELinux behavior: "?" vs. new "unlabeled"Jim Meyering
* src/ls.c (gobble_file): Interpret the new "unlabeled" indicator from getfilecon/lgetfilecon the same way we interpret a negative return value: no security context. So we don't print the "+". * tests/selinux: Recognize that "unlabeled" means insufficient support for SELinux, just like "?".
2007-09-01Make groups-version executable,Jim Meyering
* tests/misc/groups-version: ... as it was in the patch.
2007-08-31Test yesterday's change to groups.Eric Blake
* tests/misc/groups-version: New test. * tests/misc/Makefile.am (TESTS): Add groups-version.
2007-08-29Ensure that TMPDIR is valid. Otherwise, it would cause test failures.Jim Meyering
* tests/misc/tty-eof: Set TMPDIR=. * tests/misc/sort-compress: Likewise.
2007-08-26tests/misc/fold: Fix a typo: missing \ in a never-seen diagnosticJim Meyering
2007-08-25Remove all .cvsignore files from version control.Jim Meyering
2007-08-23Don't let ln be a party to destroying user data.Jim Meyering
* src/ln.c: Include "file-set.h", "hash.h" and "hash-triple.h". (dest_set, DEST_INFO_INITIAL_CAPACITY): New globals. (do_link): Refuse to remove a just-created link. Record a name,dev,ino triple for each link we create. (main): Initialize dest_set, if needed. * tests/mv/childproof: Test for the above fix. * NEWS: Document this. Reported by Eric Blake. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-08-22Change "rm --verbose -r a//" not to print extra slashes in a///bJim Meyering
* src/remove.c (push_dir): Don't copy trailing slashes onto the stack. Reported by François Pinard. * tests/rm/v-slash: New file. Test for the above change. * tests/rm/Makefile.am (TESTS): Add v-slash.
2007-08-18Run each Coreutils.pm-based test in its own subdirectory.Jim Meyering
* tests/CuTmpdir.pm: New file. * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm. * tests/misc/od, tests/misc/base64, tests/misc/basename: * tests/misc/cut, tests/misc/date, tests/misc/dirname: * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail: * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum: * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum: * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag: * tests/misc/wc-files0-from, tests/misc/xstrtol: * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from: * tests/expr/basic, tests/factor/basic, tests/fmt/basic: * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1: * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec: * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1: * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it. * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test", not "../../src/test", so it works when run from a subdirectory. * tests/ls-2/tests: Create temp files and dirs from within the perl script, so that they're removed, when run from a subdirectory.
2007-08-16Consolidate od tests.Jim Meyering
* tests/misc/od: Perform od-zero-len's test here. Include boilerplate code, so tests run in a subdirectory. * tests/misc/od-zero-len: Remove this file.
2007-08-16* tests/ls/time-1: Include sample-test boilerplate code.Jim Meyering
Remove the then-unnecessary, hard-coded envvar "unset" commands.
2007-08-15od --skip (-j) works even on files in /proc, when the kernel liesJim Meyering
* src/od.c (skip): Don't let kernel misinformation (nonempty files in /proc with stat.st_size == 0) make "od -j N" misbehave. Patch by Paul Eggert. * NEWS: Document this work-around. * tests/misc/od-zero-len: New file, test for the above.
2007-08-14Add tests for the just-fixed "od -j N FILE" bug.Jim Meyering
* tests/misc/od: New file, test for the above. * tests/misc/Makefile.am (TESTS): Add od.
2007-08-04Exercise xstrtol's diagnostics via pr's --pages option.Jim Meyering
* tests/misc/xstrtol: New file. * tests/misc/Makefile.am (TESTS): Add xstrtol.
2007-08-02Adjust one more test to accommodate the recent fts change.Jim Meyering
This matters only on systems with insufficient openat support. * tests/du/inacc-dest: Adjust expected diagnostic.
2007-08-02Adjust the other two "no-x" tests and unify all three.Jim Meyering
* tests/du/no-x: Factor out du-specific bits. * tests/chmod/no-x: Use the same code. * tests/chgrp/no-x: Use the same code.
2007-08-02Adapt du's no-x test not to fail on older Linux systems.Jim Meyering
* tests/du/no-x: Accept a third variant of the diagnostic.
2007-07-31du: print size (probably incomplete) of each inaccessible directoryJim Meyering
* src/du.c (process_file): Print what we know of the size of a directory even when it is inaccessible. What we print is just the size of the directory itself, not counting any of its contents. * tests/du/inacc-dir: Test for this. * NEWS: Mention this change. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-31Add a test for du not counting size of inaccessible directories.Jim Meyering
* tests/du/inacc-dir: New file. Test for fts.c bug fixed yesterday. * tests/du/Makefile.am (TESTS): Add inacc-dir. * NEWS: Mention the bug fix. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-29Attempt to copy a regular file, even if stat says it is empty.Jim Meyering
* NEWS: Document this bug fix. * src/copy.c (copy_reg): Read from a regular file, even if it appears (stat.st_size == 0) to be empty. This reverts an optimization introduced on 2005-11-23 for coreutils-6.0. Otherwise, "cp /proc/cpuinfo /tmp" creates an empty file, on e.g., linux-2.6.20. * tests/cp/proc-zero-len: New file. Test for the above. * tests/cp/Makefile.am (TESTS): Add proc-zero-len. Reported by Dan Berrangé.
2007-07-26sort: Improve sort --random-sort test.Bob Proulx
Jim Meyering wrote: > so if your test were to run sort -R twice, and compare *those* outputs, > then it would trigger on this bug. Thanks. I don't have a system with the failure so I was working blind. Here is a rework of the patch. Bob >From 76dafb0dde4f8d685eb2b4b43fbf3c1cf9f0ff4b Mon Sep 17 00:00:00 2001 From: Bob Proulx <bob@proulx.com> Date: Thu, 26 Jul 2007 02:19:49 -0600 Subject: [PATCH] sort: Improve sort --random-sort test. * tests/misc/sort-rand: If "locale" is available pick a random non-C locale and check "sort --random-sort" behavior using it. Signed-off-by: Bob Proulx <bob@proulx.com>
2007-07-24sort: add a test to exercise the affected code.Jim Meyering
* tests/sort/Test.pm (realloc-buf): Exercise the code that changed yesterday. No other test in all of "make check" does this. * NEWS: Mention the fix.
2007-07-23Update all copyright notices to use the newer form.Jim Meyering
2007-07-20Document and add a test for today's sort bug fix.Jim Meyering
* NEWS: Describe the bug fix. * tests/sort/Test.pm (obs-inval): Add a test for today's fix.
2007-07-19Fix a portability bug in the new ls-color test.Jim Meyering
* tests/ls/stat-free-symlinks: Don't rely on the ability of a built-in printf to interpolate '\e'. Use '\033' instead.
2007-07-19"cp -i --update older newer" no longer prompts; same for mvJim Meyering
* src/copy.c (copy_internal): Perform "update" check before the possible interactive prompt. Reported by zeno_AT_biyg_DOT_org in <http://bugzilla.redhat.com/248591> * tests/mv/update: Add tests for the above. * NEWS: Mention the bug fix.
2007-07-15ls --color: Don't stat symlinks when neither ORPHAN nor MISSING attribute ↵Jim Meyering
has a color. * src/ls.c (main): Don't set check_symlink_color when C_EXEC is colored, unless ln=target (aka color_symlink_as_referent) is set. (gobble_file): Set f->linkok = true also when !check_symlink_color. http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927 Reported by Jeremy Maitin-Shepard. * tests/strace: New file, contents extracted from... * tests/mv/atomic: ...here. Source strace. * tests/ls/stat-free-symlinks: New file. Test for the above. Use strace to ensure that in this corner case, ls does not call stat. * tests/ls/Makefile.am (TESTS): Add stat-free-symlinks. * tests/Makefile.am (EXTRA_DIST): Add strace.
2007-07-11If there's a GPL vN copyright comment, require that N == 3.Jim Meyering
* Makefile.maint (sc_GPL_version): New rule. * tests/misc/arch: Fix the sole violation.
2007-07-10Skip "arch" test if it's not built.Jim Meyering
* tests/misc/Makefile.am (built_programs): Define. (TESTS_ENVIRONMENT): Add $(built_programs), for... * tests/misc/arch: ...this: skip the test if arch is not built. * src/Makefile.am (built_programs.list): New rule. * tests/Makefile.am (built_programs): Rename from all_programs. (TESTS_ENVIRONMENT): Use built_programs, not all_programs. * tests/help-version: Likewise. * NEWS: Mention that using --enable-no-install-program=X may cause "make check" to fail. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-10New program: archKarel Zak
* NEWS: Mention arch. * README: Add arch to the list of programs. * AUTHORS: Add arch. * src/uname.c: Include "uname.h". (PROGRAM_NAME): Handle arch, too. (ARCH_AUTHORS): Define. (uname_long_options, arch_long_options): Renamed and new globals. (usage): Handle arch-mode as well as uname-mode. (decode_switches): New function, extracted from main, to handle arch-mode as well as uname-mode. (main): Handle both modes. * src/uname-arch.c: New program, alias for "uname -m". * src/uname-uname.c: New file, default uname mode. * src/uname.h: New file, uname modes. * src/Makefile.am (EXTRA_PROGRAMS): Add arch. (uname_SOURCES, arch_SOURCES): Define. * man/arch.x: New file. * man/Makefile.am (dist_man_MANS): Add arch.1. (arch.1): New dependency. * tests/misc/arch: New test, compare "arch" with "uname -m" * configure.ac (OPTIONAL_BIN_PROGS): Add arch. (MAN): Add arch.1. * .x-sc_require_config_h: Exempt uname-arch.c and uname-uname.c from the always-include-<config.h> rule. Signed-off-by: Karel Zak <kzak@redhat.com> Signed-off-by: Jim Meyering <jim@meyering.net>
2007-07-10Change "version 2" to "version 3" in all copyright notices.Jim Meyering