summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
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.
2010-12-30split: fix the suffix length calculationPádraig Brady
* src/split.c (set_suffix_length): Only auto-calculate the suffix length when the number of files is specified. * tests/misc/split-a: Add a case to trigger the bug, and exercise the suffix length auto-calculation. * NEWS: Mention the fix. Reported by Dmitry V. Levin and Sergey Vlasov at https://bugzilla.altlinux.org/show_bug.cgi?id=24841
2010-12-28coreutils: keep lines within 80-column limitsPaul Eggert
* cfg.mk (LINE_LEN_MAX, FILTER_LONG_LINES): New macros. (sc_long_lines): New rule. * HACKING: Use shorter URLs to the same material. * doc/Makefile.am, doc/coreutils.texi, m4/boottime.m4: * man/help2man, man/stdbuf.x, src/Makefile.am, src/cat.c, src/copy.c: * src/cp.c, src/dd.c, src/df.c, src/du.c, src/groups.c, src/install.c: * src/ls.c, src/md5sum.c, src/mv.c, src/od.c, src/pinky.c, src/ptx.c: * src/readlink.c, src/remove.c, src/rmdir.c, src/setuidgid.c: * src/sort.c, src/tail.c, src/touch.c, tests/Coreutils.pm: * tests/cp/existing-perm-race, tests/cp/perm, tests/cp/preserve-gid: * tests/du/2g, tests/du/long-from-unreadable, tests/init.sh: * tests/install/basic-1, tests/ls/nameless-uid: * tests/ls/readdir-mountpoint-inode, tests/misc/chroot-credentials: * tests/misc/cut, tests/misc/date, tests/misc/join, tests/misc/md5sum: * tests/misc/sha1sum, tests/misc/sha224sum, tests/misc/sort: * tests/misc/sort-continue, tests/misc/sort-files0-from: * tests/misc/sort-rand, tests/misc/stdbuf, tests/misc/tr: * tests/misc/uniq, tests/mv/atomic, tests/mv/part-fail: * tests/mv/part-symlink, tests/mv/sticky-to-xpart, tests/pr/pr-tests: * tests/rm/fail-2eperm, tests/rm/interactive-always: Reformat to fit within 80 columns. * doc/Makefile.am (BAD_POSIX_PERL): New macro. * doc/coreutils.texi: Reword slightly, to make menus and index lines shorter. * src/md5sum.c: Redo --help output so that it fits within 79 columns, since that's a bit more portable and all the other --help strings fit in 79 columns.
2010-12-22maint: correct test-related commentsJim Meyering
* tests/mv/i-3: Adjust comment to match just-changed code. Spotted by Pádraig Brady. * tests/init.cfg (retry_delay_): Correct spelling of function name in usage example.
2010-12-22tests: mv/i-3: avoid false-positive failure on a slow/busy systemJim Meyering
* tests/mv/i-3: Quadruple the timeout duration. Without this, I saw an expired timeout on a heavily-loaded system.
2010-12-21tests: avoid new false-positive failure on at least FreeBSD 8.1Jim Meyering
* tests/mv/trailing-slash: Accommodate different diagnostic on FreeBSD 8.1.
2010-12-18tests: sync init.sh from gnulibPaul Eggert
* tests/init.sh (setup_): Initialize fail=0 before invoking mktempd_. Ensure that IFS is defined initially. (mktempd_): Remove fail=0 initialization; no longer needed.
2010-12-19cp: ensure backups are created when -T specifiedPádraig Brady
* src/cp.c (do_copy): When -T is specified, initialize the NEW_DST and SB variables, which are checked when running: cp -T --force --backup file file * tests/cp/backup-1: Add the -T case
2010-12-19sort: use at most 8 threads by defaultPádraig Brady
* src/sort.c (main): If --parallel isn't specified, restrict the number of threads to 8 by default. If the --parallel option is specified, then allow any number of threads to be set, independent of the number of processors on the system. * doc/coreutils.texi (sort invocation): Document the changes to determining the number of threads to use. Mention the memory overhead when using multiple threads. * tests/misc/sort-spinlock-abuse: Allow single core systems that support pthreads. * tests/misc/sort-stale-thread-mem: Likewise. * tests/misc/sort-unique-segv: Likewise. * NEWS: Mention the change in behaviour.
2010-12-18tests: avoid spurious du/bigtime failureJim Meyering
* tests/du/bigtime: Map nonzero block count to 0. Reported by Assaf Gordon. * THANKS: Update.
2010-12-17tests: set fail=0 by defaultPaul Eggert
* tests/init.sh (setup_): Set fail=0. This was the intent as per <http://lists.gnu.org/archive/html/bug-coreutils/2010-12/msg00058.html> but the assignment in mktempd_ is ineffective, since mktempd_ is used inside `` and its assignments are in a subshell.