summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2011-06-13tests: avoid a false failure on HPUX systemsPádraig Brady
* 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
2011-06-11tests: inotify-rotate: avoid false positive under heavy loadJim Meyering
* tests/tail-2/inotify-rotate: Increase timeout from 10s to 40s to avoid load-induced false positive.
2011-06-01tests: stat-free-color: accommodate stat of /selinux on rawhideJim Meyering
* 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.
2011-05-28tests: move tests/misc/split-* into tests/split/...Jim Meyering
* 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.
2011-05-27chown,chgrp: output the correct ownership in -v messagesPádraig Brady
* 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.
2011-05-26split: diagnose when --filter is used with a chunk numberPádraig Brady
* 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.
2011-05-26split: exit when we can no longer write to a --filterPádraig Brady
* 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.
2011-05-26split: return success even if a --filter exitsPádraig Brady
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.
2011-05-25split: fix an edge case where -n l/... creates an extra filePádraig Brady
* 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.
2011-05-25chmod: output the original mode in verbose modeBernhard Voelker
* 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>
2011-05-25tests: ls/stat-free-color: fix unwarranted failure on a 32-bit systemJim Meyering
* tests/ls/stat-free-color: Also check for stat64 and lstat64 syscalls. This fixes a test failure reported by Stefano Lattarini.
2011-05-24split: fix cases where -n l/... creates extraneous filesPádraig Brady
* 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.
2011-05-22tests: fix typo in tac-continueJim Meyering
* 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.
2011-05-18printf: fix an out-of-bounds memory accessPádraig Brady
* 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>
2011-05-14tests: refactor more tests to use mkfifo_or_skip_Pádraig Brady
* 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.
2011-05-14shuf: use memory more efficiently when returning a subsetPádraig Brady
* 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.
2011-05-13maint: avoid syntax-check failure due to long lineJim Meyering
* tests/du/bigtime (future_time): Split long line.
2011-05-13maint: add new syntax-check rule to prohibit use of skip_Jim Meyering
* cfg.mk (sc_prohibit_skip_): New rule. * tests/init.cfg (skip_test_): Add a comment.
2011-05-13tests: use skip_test_, not skip_Jim Meyering
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.
2011-05-13ls: allow stat-free use of --colorJim Meyering
Even on a system with d_type support, the default use of --color makes ls stat every file in order to be able to honor settings like EXEC, STICKY, ORPHAN, SETUID, etc., because those settings require information that is not provided by dirent.d_type. However, if for a potentially large performance gain, you are willing to disable those settings, you can now make ls --color give type-related coloring and perform no stat calls at all (other than the unavoidable call-per- command-line argument). Before this change, even with all of those attributes disabled, ls --color would still stat every directory. Now, we're down to the minimum of one stat call per command-line arg. * src/ls.c (gobble_file): With --color, don't stat a non-command-line-specified directory when no directory-coloring attribute is enabled. * tests/init.cfg (require_dirent_d_type_): New function. * tests/d_type-check: New script, mostly from Pádraig Brady. * tests/Makefile.am (EXTRA_DIST): Add it. * tests/ls/stat-free-color: New test. * tests/Makefile.am (TESTS): Add it. * doc/coreutils.texi (General output formatting): Describe how to use dircolors to make ls --color refrain from calling stat on a d_type-enabled file system. Prompted by a query from Josef Bacik.
2011-05-07tests: don't fail the split --filter=CMD test if xz is not availableJim Meyering
* tests/split/filter: Skip if xz is not installed.
2011-05-06tests: test split's new --filter=CMD optionJim Meyering
* tests/Makefile.am (TESTS): Add split/filter. * tests/split/filter: New file.
2011-05-06sort: fix a contradictory --debug warningPádraig Brady
* src/sort.c (key_warn): `sort -k2,1n --debug` would output warnings about being both "zero width" and "spanning multiple fields". Suppress the latter one. * tests/misc/sort-debug-warn: Add a couple of test cases.
2011-04-29tests: distribute new file, CuSkip.pmJim Meyering
Without this, most perl-based tests would fail in "make distcheck". * tests/Makefile.am (EXTRA_DIST): Add CuSkip.pm
2011-04-28tests: remove useless test: misc/pwd-unreadable-parentJim Meyering
* tests/Makefile.am (TESTS): Remove misc/pwd-unreadable-parent. This test was misleading and useless (was always skipped). Inspired by a report from Bruno Haible: http://debbugs.gnu.org/8570 * tests/misc/pwd-unreadable-parent: Remove file.
2011-04-28tests: write skip explanation from perl scripts also to outer stderrJim Meyering
* tests/CuSkip.pm (skip): New file/module/function, to help the perl test scripts "skip" a test consistently, emitting a diagnostic both into the log file and into the outermost stderr stream that is more likely to be seen by a human. * tests/check.mk (TESTS_ENVIRONMENT): Add -MCuSkip. * tests/misc/date-next-dow: Use CuSkip::skip in place of warn+exit-77. * tests/misc/tty-eof: Likewise. * tests/misc/uniq: Likewise. * tests/rm/fail-eperm: Likewise. * tests/misc/md5sum-newline: Likewise. Also, s/program_name/ME/. * tests/misc/ls-misc (setuid_setup, main): Likewise. * tests/misc/pwd-long: Likewise, and add -I"$abs_srcdir" -MCuSkip to the $PERL invocation command. Inspired by a request from Bruno Haible regarding misc/tty-eof: http://debbugs.gnu.org/8570
2011-04-25tail --follow=name no longer implies --retryJim Meyering
* src/tail.c (tail_forever_inotify): Just as without inotify, tail --follow=name now terminates when the last tailed-by-name file is unlinked or moved aside. This bug was introduced on 2009-06-15 via commit ae494d4b, "tail: use inotify if it is available". Reported by Tim Underwood in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/22286 * NEWS (Bug fixes): Mention this. * tests/tail-2/follow-name: Test for this. * tests/Makefile.am (TESTS): Add it.
2011-04-25tests: tail-2/pipe-f2: avoid false-positive failureJim Meyering
Otherwise, this would fail (albeit rarely) on a "make -j24 check" run. * tests/tail-2/pipe-f2: Increase timeout from 1 second to 10, to avoid false positive failure.
2011-04-22tests: sparse-fiemap: adjust syntax to accommodate older awkAlan Curry
* tests/cp/sparse-fiemap: Parenthesize ternary expression used as an argument to awk's printf. Otherwise, gawk 3.0.1 and the one from debian stable's original-awk would get a syntax error. Reported by Dennis Clarke. Copyright note: tiny change
2011-04-21tests: sparse-fiemap: with root/ext3, do not create an ext4 FSJim Meyering
* tests/cp/sparse-fiemap: When this test was run as root on an ext3 file system, (ext3 had known problems), it would trickily create and mount a loopback ext4 file system and use that instead. However, due to a bug in 2.6.39-rc1..rc3, this loopback test (when run in another loopback FS) exposed a bug with 1k-blocksize ext4 whereby non-NUL data would be read from a hole. For details, see this: http://thread.gmane.org/gmane.comp.file-systems.ext4/24495
2011-04-21tests: sparse-fiemap: report more detail upon failure; ignore an FPJim Meyering
* tests/cp/sparse-fiemap: Fail right away with details, when cmp fails. When extent maps are found to differ, display them and merely warn.
2011-04-20copy: do not treat unwritten extents specially: avoid XFS/ext4 data lossJim Meyering
* src/copy.c (extent_copy): Do not treat "unwritten extents" specially. Otherwise, with a release-candidate 2.6.39-rc3 kernel, XFS or ext4, when using gold as your linker, and if you forget to run "make check", you could end up installing files full of zeros instead of the expected binaries. For a lot of discussion, see http://thread.gmane.org/gmane.comp.file-systems.xfs.general/37895 * tests/cp/fiemap-empty: Disable this test.
2011-04-20tests: remove spurious syntax from a perl snippetJim Meyering
* tests/cp/sparse-fiemap: Remove spurious BEGIN {...} block.
2011-04-13tests: fix a false positive fiemap test on some file systemsPádraig Brady
* tests/filefrag-extent-compare: Don't check the length of the last extent, as this was seen to vary on XFS, where it leaves trailing blocks allocated for performance reasons. * tests/cp/fiemap-empty: Though not seen as an issue in practise, try to avoid possible issues with the allocator in file systems, by requesting to allocate a power of 2.
2011-04-12maint: correct kernel version in test commentPádraig Brady
2011-04-11maint: remove doubled words in comments, e.g., s/to to/to/Jim Meyering
* tests/ls/color-norm: s/to to/to/ * gl/lib/mbsalign.h (mbs_align_t): s/or or/or/ * src/extent-scan.c (extent_scan_read): s/the the/the/ * src/libstdbuf.c: s/the the/the/ * tests/misc/stdbuf: s/on on/on/ * ChangeLog-2005: s/for\n\tfor /for\n\t/
2011-04-04tests: avoid spurious parallel failure due to temporary disk fullJim Meyering
Running the new fiemap-empty test uses 600MB of disk space via fallocate, and in so doing caused failure in unrelated tests that were running in parallel on a small file system. Rather than simply running fallocate (which allocates the space, inducing disk full when it fails), skip the test if there is less than 800MB of free space, as computed via stat and awk. * tests/init.cfg (require_file_system_bytes_free_): New function. * tests/cp/fiemap-empty: Use it.
2011-04-04tests: don't ever leave a backgrounded "sleep 10m" processJim Meyering
* tests/misc/help-version: Sleep only ~30s, not 10m. The latter was a problem when somehow that sleep process would hang around and thereby prevent (for up to 10m) a normal unmount of the temporary partition in which I'd run the tests.
2011-04-04tests: preserve-gid: don't chown temporary PATH dir to a nameless UIDJim Meyering
* tests/cp/preserve-gid: Simply chmod a+rx instead. That is safer, in case the nameless UID actually has an account, and might take advantage of root running a program in a directory under its control
2011-04-04tests: preserve-gid: remove useless use of "env"Jim Meyering
* tests/cp/preserve-gid: Remove useless use of "env".
2011-04-04tests: convert common root-build test failure to a "skip"Jim Meyering
* tests/mv/sticky-to-xpart: Skip rather than failing this test when run as root and the binaries are not accessible by "nobody".
2011-04-02maint: fix a comment typoJim Meyering
* tests/cp/fiemap-empty: Correct typo in comment. Add "FIXME".
2011-04-01copy: process empty extents more efficientlyPádraig Brady
* src/copy.c (extent_copy): Treat an allocated but empty extent much like a hole. I.E. don't read data we know is going to be NUL. Also we convert the empty extent to a hole only when SPARSE_ALWAYS so that the source and dest have the same allocation. This will be improved soon, when we use fallocate() to do the allocation. * tests/cp/fiemap-empty: A new test for efficiency and correctness of copying empty extents. * tests/Makefile.am: Reference the new test. * NEWS: Mention the change in behavior.
2011-04-01copy: link rather than copy symlinks, when --link usedPádraig Brady
This bug was introduced in commit ca9e212c, 2009-09-24, "cp, mv: use linkat to guarantee semantics", which inadvertently disabled the creation of hardlinks to symlinks. However rather than implementing the intention of that commit and relying on gnulib linkat emulation, we'll revert to the previous emulation as that maintains ownership and timestamps. * src/copy.c (copy_internal): Use our existing hardlink to symlink emulation when link() might dereference the symlink. Also ensure that we copy the timestamps of the original symlink when we use the emulation. * tests/cp/link-symlink: Add a test to ensure timestamps copied. * tests/Makefile.am: Reference the new test. * NEWS: Mention the fix. Reported by Ruediger Meier
2011-03-31tests: inotify-rotate: avoid race condition with overloaded diskJim Meyering
* tests/tail-2/inotify-rotate: Wait 50% longer for grep to succeed. Without this change, this test would fail consistently when using "make -j25 check" with F15 in a virtio- and spinning-rust-backed virtual machine.
2011-03-31copy: with fiemap copy, only sync when neededPádraig Brady
* src/extent-scan.h (struct extent_scan): Add the fm_flags member to pass to the fiemap scan. * src/extent-scan.c (extent_need_sync): A new function used to detect Linux kernels before 2.6.38. (extent_scan_init): Add FIEMAP_FLAG_SYNC when needed. * tests/cp/sparse-fiemap: Adjust comment. * NEWS: Mention the change in behavior. Indirectly suggested by Mike Frysinger
2011-03-28tests: avoid unwarranted failure in mock-simulated non-SELinux env.Mathieu Bridon
* tests/init.cfg (require_selinux_): Skip the test also when /proc/filesystems does not list selinuxfs. Add comments. * cfg.mk (exclude_file_name_regexp--sc_file_system): Exempt tests/init.cfg, with its use of /proc/filesystems. Based on the patch by Mathieu Bridon in http://debbugs.gnu.org/8359. More discussion in http://bugzilla.redhat.com/573111
2011-03-22tests: exercise tests new "==" operatorJim Meyering
* tests/misc/test: Exercise the new operator. * NEWS (Changes in behavior): Mention it.
2011-03-21tests: fix a bug in the cp/preserve-gid testJim Meyering
* tests/cp/preserve-gid: Ensure that every process under test uses the cp binary we've just built. Before this fix, with a restrictive umask or build-dir permissions, the UID-changing tests would end up using whatever cp happened to be available through $PATH Analysis by arbogast.cedric@gmail.com in http://debbugs.gnu.org/8292.
2011-03-19tests: fix the sparse-fiemap testPádraig Brady
* tests/filefrag-extent-compare: Merge adjacent extents in each list before processing, so we correctly account for split extents in either list. * tests/cp/sparse-fiemap: Remove the explicit syncing, which was only changing the way extents were arranged, and thus working around the extent comparison issue that was seen on ext4 loop back.