summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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.
2011-01-31tests: remove duplicate fiemap-perf testJim Meyering
* tests/cp/fiemap-perf: Copy block-comparing code from sparse-fiemap. * tests/cp/sparse-fiemap: The same test was here, alongside a much more involved test. Remove it, now that it is in its own file.
2011-01-30tests: cp/fiemap: exercise previously-failing partsJim Meyering
* tests/cp/fiemap-2: New test. * tests/Makefile.am (TESTS): Add it.
2011-01-30tests: ensure that FIEMAP-enabled cp copies a sparse file efficientlyJim Meyering
* tests/cp/fiemap-perf: New file. * tests/Makefile.am (TESTS): Add it.
2011-01-30build: distribute new test script, filefrag-extent-compareJim Meyering
* tests/Makefile.am (EXTRA_DIST): Add filefrag-extent-compare.
2011-01-30tests: accommodate varying filefrag -v "flags" outputJim Meyering
* tests/cp/sparse-fiemap: Accommodate values other than "eof" in the "flags" column of filefrag -v output
2011-01-30tests: exercise more of the new FIEMAP copying codeJim Meyering
* tests/cp/sparse-fiemap: Ensure that a file with many extents (more than fit in copy.c's internal buffer) is copied properly. Don't require root access if current partition is btrfs or xfs. Use init.sh, not test-lib.sh. * tests/filefrag-extent-compare: New file.
2011-01-30tests: add a new test for FIEMAP-copyJie Liu
* tests/cp/sparse-fiemap: Add a new test for FIEMAP-copy against a loopbacked ext4 partition. * tests/Makefile.am (sparse-fiemap): Reference the new test.
2011-01-29join: don't report disorder against an empty filePádraig Brady
This allows one to use join as a field extractor like: join -a1 -o 1.3,1.1 - /dev/null * src/join.c (join): Don't flag unpairable lines when one of the files is empty. * tests/misc/join: Add a new test for empty input, and adjust a previous test that was only checking against empty input. * doc/coreutils.texi (join invocation): Document the change. * NEWS: Likewise.
2011-01-29join: ensure --header skips the order check with empty filesPádraig Brady
* src/join.c: Skip the header even if one of the files is empty. * tests/misc/join: Add a test case. * NEWS: Mention the fix
2011-01-29join: add -o 'auto' to output a constant number of fields per linePádraig Brady
Lines with a different number of fields than the first line, will be truncated or padded. * src/join.c (prfields): A new function refactored from prjoin(), to output all but the join field. (prjoin): Don't swap line1 and line2 when line1 is blank so that the padding is applied to the right place. (main): Handle the -o 'auto' option. * tests/misc/join: Add 6 new cases to test the auto format. * NEWS: Mention the change in behavior. Suggestion from Assaf Gordon
2011-01-28tests: remove obsolete uses of "$$" in temporary file namesJim Meyering
Those were useful when tests might have been run in the same directory and in parallel. Now, each test is run in a newly- created empty directory. * tests/cp/backup-1: Remove obsolete uses of "$$". * tests/cp/same-file: Likewise. * tests/dd/misc: Likewise. * tests/mv/part-symlink: Likewise. * tests/mv/to-symlink: Likewise. * tests/touch/fail-diag: Likewise.
2011-01-26tests: don't hide all trace of the vc_exe_in_TESTS testJim Meyering
There was a non-negligible delay after running a single test. Now, you'll know why when you see this test's name. * tests/check.mk (vc_exe_in_TESTS): Don't @-hide commands. Use $(AM_V_GEN) instead.
2011-01-25tests: minor correctionAndreas Schwab
* tests/du/move-dir-while-traversing: Ignoring SIGTSTP is enough; don't also attempt to ignore SIGSTOP, it cannot be handled or ignored. Spotted by Andreas Schwab.
2011-01-25tests: avoid FP failure due to suspensionJim Meyering
* tests/du/move-dir-while-traversing: Prohibit suspension, to avoid false-positive failure.
2011-01-25tests: avoid rare FP failure in new du testJim Meyering
* tests/du/move-dir-while-traversing: Create an even larger tree to avoid a false-positive failure due to du terminating before the rename is triggered.
2011-01-18tests: avoid FP failure in new du testJim Meyering
* tests/du/move-dir-while-traversing: Create a larger tree to avoid a false-positive failure due to du terminating before the rename is triggered.
2011-01-17tests: add a test for today's uniq bugJim Meyering
* tests/misc/uniq-perf: New file. * tests/Makefile.am (TESTS): Add it.
2011-01-10du: don't abort when a subdir is renamed during traversalJim Meyering
* NEWS (Bug fixes): Mention it. * src/du.c (prev_level): Move declaration "up" to file-scope global. (du_files): Reset prev_level to 0 upon abnormal fts_read termination. Reported by Johathan Nieder in http://bugs.debian.org/609049 Also, improve a diagnostic. * tests/du/move-dir-while-traversing: Test for the above. * tests/Makefile.am (TESTS): Add it.
2011-01-01maint: update all copyright year number rangesJim Meyering
Run "make update-copyright".
2011-01-01build: update gnulib for version-etc copyright year updateJim Meyering
* tests/sample-test: Update copyright to 2011, to appease syntax-check.
2010-12-31maint: update to latest gnulib, for testsuite improvementEric Blake
* gnulib: Update to latest for init.sh fix. * bootstrap: Resync from gnulib. * tests/init.sh: Likewise.