summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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.
2011-03-13touch: update to latest gnulib to fix Solaris 10 touch segfaultJim Meyering
* gnulib: Update to latest, to address http://debbugs.gnu.org/8230. When built on Solaris 9 and run on Solaris 10, touch would segfault. Reported by Ben Walton. * bootstrap: Update from gnulib. * tests/init.sh: Likewise. * NEWS (Bug fixes): Mention this.
2011-03-05maint: fix dd nocache test to be independent of current stdinPádraig Brady
* tests/dd/nocache: Don't assume stdin is a pipe
2011-03-05dd: add a flag to discard cached dataPádraig Brady
* src/dd.c (FFS_MASK): A new macro (Find First Set) refactored from the following enum as it's now used twice. (usage): Mention the new 'nocache' flag. (cache_round): A new function to help ignore requests to drop cache, that are less than page_size. (invalidate_cache): A new function to call posix_fadvise() with the appropriate offset and length. Note we don't use fdadvise() so we can detect errors when count=0. (dd_copy): Call invalidate_cache() for the portions read. (iwrite): Likewise for the portions written. (main): Call invalidate_cache for page_size slop or for full file when count=0. * cfg.mk (sc_dd_O_FLAGS): Adjust to pass. * doc/coreutils.texi (dd invocation): Describe the 'nocache' flag, and give some examples of how it can be used. * tests/dd/nocache: A new test. * tests/Makefile.am: Reference the new test. * NEWS: Mention the new feature.
2011-03-03du: don't infloop for --files0-from=DIRJim Meyering
* src/du.c (main): Fail on AI_ERR_READ error, rather than merely diagnosing and continuing. Based on a patch by Stefan Vargyas. Also move the handling of AI_ERR_EOF into the case stmt. Do not report ferror/fclose(stdin) failure when we've already diagnosed e.g., failure to read the DIR, above. Bug introduced by 2008-11-24 commit 031e2fb5, "du: read and process --files0-from= input a name at a time,". * src/wc.c: Handle read failure as with du: do not exit immediately, but rather go on to print any total and to clean-up. As above, move the handling of AI_ERR_EOF into the case stmt. * tests/du/files0-from-dir: New file, to test both du and wc. * tests/Makefile.am (TESTS): Add it. * NEWS (Bug fixes): Mention it.
2011-02-25tests: without filefrag, only skip part of sparse-fiemapPádraig Brady
* tests/cp/sparse-fiemap: Move the PERL check to the top, since we don't test anything without it. In the loop, don't use skip_test_ as it exits the test completely.
2011-02-19maint: replace spaces with tab in tests/Makefile.amGilles Espinasse
* tests/Makefile.am: Replace spaces with tabs for consistency
2011-02-18tests: correct racy sparse-to-pipe testGilles Espinasse
* tests/cp/sparse-to-pipe: Wait for backgrounded "cat" to complete before comparing the results.
2011-02-15tests: support more file systems in the cp fiemap testsPádraig Brady
* tests/cp/sparse-fiemap: Check for fiemap support against a file rather than a directory to enable tests on BTRFS for example. Explicity disable the test on ext3 or file systems where we can't determine the type. * tests/cp/fiemap-perf: Likewise. Also disable the test on older BTRFS (like in Fedora 14), where extents are returned for holes. * tests/init.cfg: Comment that BTRFS only supports fiemap for regular files.
2011-02-10tests: fix bug in preceding check.mk changeJim Meyering
* tests/check.mk (.built-programs): Run cd'd submake in a subshell so the redirected output ends up in the current directory, not ../src.
2011-02-10tests: print "python missing:..." diagnostic where more will see itJim Meyering
* tests/init.cfg (fiemap_capable_): Print with warn_, so that the diagnostic shows up alongside the corresponding SKIP message.
2011-02-10tests: avoid gross inefficiency in "make test"Jim Meyering
Do not run a sub-make to set up the environment for each and every test script. Instead, run it just once and store the result in a file. * tests/check.mk (built_programs): Remove definition. (.built-programs): New rule to create the temporary file. (CLEANFILES): Arrange to remove it. (TESTS_ENVIRONMENT): Simply cat .built-programs, rather than running the sub-make. * .gitignore: Ignore it.
2011-02-08test: improve the cp fiemap testsPádraig Brady
* tests/cp/fiemap-2: Enable the fiemap check for files, which will enable the test for files on ext3. * tests/cp/fiemap-perf: Comment why we're not enabling for ext3. * tests/cp/sparse-fiemap: Ditto. Also sync the files before doing a fiemap which was needed for ext4 loop back at least. Add a comment that FIEMAP_FLAG_SYNC is ineffective, thus requiring the explicit syncs. * tests/fiemap-capable: A new python script to determine if a specified path supports fiemap. * tests/init.cfg (fiemap_capable_): Use the new python script. * tests/Makefile.am (EXTRA_DIST): Include the new python script.
2011-02-07cut: don't segfault for large unbounded rangeJim Meyering
* src/cut.c (set_fields): When computing the maximum range endpoint, take into consideration the start of any unbounded range, like "999-". * NEWS (Bug fixes): Mention it. * tests/misc/cut (big-unbounded-b,c,f): Add tests. Reported by Paul Marinescu in http://debbugs.gnu.org/7993 The bug was introduced on 2004-12-04 via commit 7380cf79.
2011-02-04tests: skip mv/i-3 on FreeBSD to avoid spurious failureJim Meyering
* tests/mv/i-3: Skip when uname -s reports FreeBSD.
2011-02-03sort: fix --debug key highlighting when key start after key endPádraig Brady
This case was overlooked in commit bdde34f9, 2010-08-05, "sort: tune and refactor --debug code, and fix minor underlining bug" * src/sort.c (debug_key): Don't adjust the key end when it's before the key start. * tests/misc/sort-debug-keys: Add a test case.
2011-02-02tests: correct part of fiemap-perfJim Meyering
* tests/cp/fiemap-perf: Correct erroneous added test. Since nonexistent names were used, the final test ended up being "test =", which would always "succeed".
2011-01-31tests: exercise a rarely-used corner of copy.cJim Meyering
* tests/cp/sparse-to-pipe: New test. * tests/Makefile.am (TESTS): Add it.
2011-01-31tests: gfs2 also supports FIEMAPJim Meyering
* tests/init.cfg (fiemap_capable_): Add gfs2. Clarify comment.
2011-01-31tests: factor fiemap-related predicate into init.cfgJim Meyering
* tests/init.cfg (fiemap_capable_): New function. * tests/cp/fiemap-perf: Use it. * tests/cp/sparse-fiemap: Likewise. * tests/cp/fiemap-2: Likewise.
2011-01-31maint: update copyright year lists in new filesJim Meyering
* src/extent-scan.h: Update copyright year list. * src/extent-scan.c: Likewise. * tests/cp/sparse-fiemap: Likewise.
2011-01-31tests: modernize sparse-fiemap testJim Meyering
* tests/cp/sparse-fiemap: Use print_ver_, not open-coded VERBOSE test.