summaryrefslogtreecommitdiff
path: root/tests
AgeCommit message (Collapse)Author
2008-12-03tests: ensure that chmod, chgrp and chown honor --silentJim Meyering
* tests/chmod/silent: New file, to test all three programs. * tests/Makefile.am (TESTS): Add chmod/silent. * NEWS (Bug fixes): Mention this. The bug was introduced in 96a5d2ce6a53d96cb667af78f13e56fadcdb91e6.
2008-12-01cp, mv: remove 3-year-deprecated+warned-about --reply optionJim Meyering
* src/cp.c (reply_args, reply_vals): Remove globals. [REPLY_OPTION]: Remove enum. (long_opts) ["reply"]: Remove initializer. (main): Remove case stmt. * src/mv.c: Likewise. Don't include "argmatch.h". No longer used. * NEWS (Changes in behavior): Mention this. * tests/Makefile.am (TESTS): Remove mv/reply-no. * tests/mv/reply-no: Remove file. * tests/mv/i-link-no: Update, now that --reply= is gone.
2008-12-01tests: dd/reblock: Reduce chance of timing related failuresPádraig Brady
* tests/dd/reblock: Change the IPC mechanism to the dd process under test, from pipes to fifos. Also change the delay between data writes to 0.2s for both tests. This should increase the chance that the dd process will read the data chunks separately.
2008-11-30tests: df: skip total-verify if df failsJim Meyering
* tests/df/total-verify: Skip the test if df fails.
2008-11-30tests: start long-running cp/link-heap earlierJim Meyering
* tests/Makefile.am (TESTS): Move cp/link-heap nearer the start of the list, so that its termination doesn't delay a parallel "make check".
2008-11-30tests: avoid failure of cp/link-heap on some systemsJim Meyering
* tests/cp/link-heap: Raise virtual memory limit from 10,000 to 14,000, to avoid failure on Debian/unstable (libc6 2.7-16).
2008-11-30tests: dd/reblock: avoid occasional failureJim Meyering
* tests/dd/reblock: Sleep longer to avoid a race condition. Reported by Bob Proulx.
2008-11-22tests: dd: add a test for the required behaviorJim Meyering
* tests/dd/reblock: New file. Test for the required functionality. Based on an example and discussion from this thread: http://lists.gnu.org/archive/html/bug-coreutils/2008-11/msg00153.html * tests/Makefile.am (TESTS): Add dd/reblock.
2008-11-20cp: use far less memory in some casesJim Meyering
cp --link was "remembering" many name,dev,inode triples unnecessarily. cp was doing the same, even without --link, for every directory in the source hierarchy, while it can do its job with entries merely for the command-line arguments. Prompted by a report from Patrick Shoenfeld. Details <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/15081>. * src/copy.c (copy_internal): Refrain from remembering name,dev,inode for most files, when invoked via cp --link. Record an infloop-avoidance triple for each directory specified on the command line, not for each directory in the source tree. Don't record a dir-triple when x->hard_link is set. * NEWS (Buf fixes): Mention it. * tests/cp/link-heap: New file. Test for cp's lowered memory usage. * tests/Makefile.am (TESTS): Add link-heap.
2008-11-20tests: add a test of cp --preserve=linksJim Meyering
* tests/cp/link-preserve: Add a case and comments.
2008-11-16tests: remove debug code that would try to write into /t/k-envJim Meyering
* tests/ls/no-cap: Remove debugging "tee".
2008-11-16tests: change misc/printf-surprise so that it doesn't segfault anymoreJim Meyering
* tests/misc/printf-surprise: Disable MALLOC_PERTURB_, so that "make check" no longer provokes a segfault from printf(1). Before, that would be detected as a known problem and cause the test to be skipped. Adjust the test so that a segfault once again results in test failure.
2008-11-12tests: remove df/totalJim Meyering
* tests/df/total: Remove file. * tests/Makefile.am (TESTS): Remove df/total. It is subsumed by df/total-verify.
2008-11-12* tests/df/total-verify [VERBOSE]: Run df --version, not ls --version.Ondřej Vašík
2008-11-12avoid spurious test failure when df always failsJim Meyering
* tests/df/total-verify: Skip upon _df_ failure, not tee failure. Reported by Ondřej Vašík. Details in <http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/15028>.
2008-10-28ls: --color now highlights hard linked files, tooKamil Dudka
* src/ls.c (print_color_indicator): Colorize hard linked files. * src/dircolors.c: Add color for hard link. * src/dircolors.hin: Add color for hard link. * tests/ls/hardlink: Test for ls - colorize hard linked files. * tests/Makefile.am (TESTS): Add ls/hardlink. * NEWS: Mention the change.
2008-10-28tests: ls/stat-failed: don't discard stderr.Jim Meyering
* tests/ls/stat-failed: Let stderr be recorded, to ease debugging.
2008-10-26tests: seq: check for today's extended long double fixJim Meyering
* tests/misc/seq-long-double: New file. Test for today's bug fix. * tests/check.mk (TESTS_ENVIRONMENT): Export CC definition. * tests/Makefile.am (TESTS): Add misc/seq-long-double. * NEWS (Bug fixes): Mention it.
2008-10-26seq: improve quality of format-checking codePaul Eggert
* src/seq.c (validate_format): Remove. Migrate its checks into... (long_double_format): Report an error and exit if an error is found, instead of returning NULL. All callers changed. Use a more-consistent format for diagnostics. * tests/misc/seq: Adjust to the more-consistent format for diagnostics.
2008-10-25tests: df/total: don't fail for an inaccessible mount pointJim Meyering
* tests/df/total: Ignore nonzero exit status from df.
2008-10-25seq: revert Solaris 8 work-around that caused x86 regressionPaul Eggert
* src/seq.c: Don't include <math.h>, <float.h>. (abs_rel_diff): Remove. (print_numbers): Test for equality, not for an epsilonish value. This reverts 4827dd27b0c655a685947aaa01426a5ecba179f3, aka v6.10-185-g4827dd2, which broke 'seq' on the x86; for example, it causes "seq 9223372036854775807 9223372036854775808" to incorrectly output 3 numbers instead of 2. It's better to punish obsolescent hosts that have incorrectly-working floating-point than to punish correctly-working hosts. * tests/misc/seq: Use 0.9000000000000, rather than 0.90000000000000000000, to avoid tickling a bug in Solaris 8 strtold, which converts "0.9" and "0.9000000000000" correctly, but incorrectly converts "0.90000000000000000000" to a smaller value.
2008-10-23ls: use '.' (not +) as SELinux-only alt. access flag in ls -l outputJim Meyering
* src/ls.c (gobble_file) [long_format]: Map SELinux-only to '.', any other nonempty combination of MAC and ACL to '+', and all else to the usual ' '. Suggested by Michael Stone. * tests/misc/selinux: Adapt: expect '.', not '+'. * doc/coreutils.texi (What information is listed): Document this. * NEWS (Changes in behavior): Mention it.
2008-10-21tests: test today's ls-vs-capability fixJim Meyering
Test for this fix: f3f1ccfd871ee395e7fafc051c1b7dedb39fdfc9. * tests/Makefile.am (TESTS): Add ls/no-cap. * tests/ls/no-cap: New file.
2008-10-15tests: add option processing tests for 'expr'Pádraig Brady
* tests/misc/expr: Add tests for various combinations of options where the first part of the expression could be confused with an option.
2008-10-15expr: remove --bignum and --no-bignum optionsPaul Eggert
* doc/coreutils.texi (expr invocation): Remove the --bignum and --no-bignum options. They weren't really needed, and they broke longstanding (albeit nonportable) scripts. * src/expr.c: Don't include <assert.h>. Include "inttostr.h", "long-options.h", "verify.h". Check at compile-time that size_t fits in unsigned long int, as the code assumes this in several places. (HAVE_GMP): Define to 0 if not defined, for convenience. (mpz_t, mpz_clear, mpz_init_set_ui, mpz_init_set_str, mpz_add): (mpz_sub, mpz_mul, mpz_tdiv_q, mpz_tdiv_r, mpz_get_str, mpz_sgn): (mpz_fits_ulong_p, mpz_get_ui, mpz_out_str): Supply substitutes when !HAVE_GMP, which work well enough for expr's purposes. (mp_integer): Remove. All integers are gmp, if gmp is available. (struct valinfo): Remove 'z' member; no longer needed. The 'i' member is always of type mpz_t. (enum arithmetic_mode, MP_NEVER, MP_ALWAYS, MP_AUTO, mode): Remove; no longer needed. (usage): Remove documentation of --bignum and --no-bignum. (integer_overflow): Abort if error misbehaves, to pacify GCC. Restore old message on arithmetic overflow, to be conservative. (die): Omit exit_status parameter; not needed (is always EXPR_FAILURE). (string_too_long, USE_BIGNUM, NO_USE_BIGNUM, long_options): Remove; no longer needed. (main): Don't use getopt_long; this breaks old nonportable scripts. (int_value): Arg is unsigned, in case we have strings whose length exceeds LONG_MAX (!). (int_value, freev, printv, null, tostring, toarith): (eval6, eval4, eval3): Always use mpz_ functions, to simplify the code. (substr_value): Remove; no longer needed. (getsize): Simplify the API: one arg rather than 3. Don't assume unsigned long int fits in size_t. (promote, domult, dodivide, doadd): Remove; no longer needed. * tests/misc/expr: Don't use --bignum to test for bignum support. Instead, use big numbers to test this.
2008-10-12tests: df: avoid test failure when using mawkJim Meyering
* tests/df/total-awk: Rewrite to use $PERL, not $AWK. mawk can't even count above 2^31. Reported by Ed Avis. http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14792/focus=14802 * tests/df/total-verify: Rename from total-awk. * tests/Makefile.am (TESTS): Reflect renaming.
2008-10-04tests: fix the install/strip-program testJim Meyering
* tests/install/strip-program: Use $PREFERABLY_POSIX_SHELL, not POSIX_SHELL. The latter may be empty, and would fail on OpenBSD 3.9. * tests/check.mk (TESTS_ENVIRONMENT): Propagate PREFERABLY_POSIX_SHELL to tests.
2008-10-03ls and sort: use filevercmp instead of strverscmpKamil Dudka
* src/ls.c (cmp_version): Use filevercmp instead of strverscmp. * src/sort.c (usage): Remove mna reference to strverscmp(3). (compare_version): Use filevercmp instead of strverscmp. * bootstrap.conf: Add filevercmp to list of gnulib modules. * tests/misc/sort-version: Remove conflicting string and enhance test. * NEWS: Mention the change.
2008-10-02tests: skip a root-only test when configured without libcapJim Meyering
* tests/ls/capability: Test for HAVE_CAP definition in config.h.
2008-10-01tests: use our new timeout programJim Meyering
* tests/rm/ext3-perf: Also, record set-up duration and FS type.
2008-09-29fix make variable quotation errorRalf Wildenhues
* tests/check.mk (TESTS_ENVIRONMENT): Quote shell variable $tmp__, fix expansion.
2008-09-27rm -r: avoid O(n^2) performance for a directory with very many entriesJim Meyering
This enhancement works around a problem that is specific to at least ext3 and ext4 file systems. With them, it would take hours to remove a two-million-entry directory. RAM-backed file systems (tmpfs) are not affected, since there is no seek penalty. * remove.c (rm_malloc, rm_free, compare_ino): New functions. (dirent_count, preprocess_dir): New function. [struct readdir_data]: New struct. (remove_cwd_entries): Call preprocess_dir. * tests/rm/ext3-perf: New file. Test for the performance fix. * NEWS: mention the new feature
2008-09-26seq -0.1 0.1 2: print final number when locale's decimal point is ","Jim Meyering
* src/seq.c (print_numbers): Use strtold, not c_strtold to convert from just-formatted-using-asprintf string back to double, since asprintf may have used something other than "." as the decimal point. Reported by lsof@nodata.co.uk as <http://bugzilla.redhat.com/463556>. Thanks to Ondřej Vašík for discovering that the bug was locale-related. $ LC_ALL=cs_CZ.UTF-8 seq -0.1 0.1 2|grep 2.0 [Exit 1] $ seq -0.1 0.1 2|grep 2.0 2.0 * tests/check.mk (TESTS_ENVIRONMENT): Add LOCALE_FR_UTF8, for... * tests/misc/seq [locale-dec-pt]: New test for the above. * NEWS (bug fix): Mention it.
2008-09-10fix minor shell issues in test suiteRalf Wildenhues
* tests/misc/help-version: Fix bad quoting. * tests/cp/same-file: Fix unportable shell quoting. * tests/mv/part-symlink: Likewise.
2008-09-10tests: don't use "local" in bourne shell scriptsJim Meyering
* tests/test-lib.sh (remove_tmp_, skip_if_mcstransd_is_running_): Avoid failure on Solaris 11, since their /bin/sh passes the tests in posix-shell.m4, yet does not support "local" (which is not POSIX).
2008-09-10tests: use "Exit $fail", not (exit $fail); exit $failJim Meyering
* tests/test-lib.sh (Exit): New function by Ralf Wildenhues in automake http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=20594c08f63 * tests/**: Convert all uses: This restrictive change converted the vast majority: git grep -l '^(exit \$fail); exit \$fail$' \ | xargs perl -pi -e 's/'^\(exit \$fail\); exit \$fail$/Exit \$fail/' And this did the rest, plus a few undesirable ones, so I manually backed out the changes to ChangeLog-* and build-aux/check.mk: git grep -l -E '\(exit [^)]+\); exit ' \ | xargs perl -pi -e 's/\(exit (.+?)\); exit \1/Exit $1/'
2008-09-08tests: move input-tty into a test-lib.sh functionJim Meyering
* tests/test-lib.sh (require_controlling_input_terminal_): New function, from * tests/input-tty: ...here. Remove file. * tests/Makefile.am (EXTRA_DIST): Remove input-tty. * tests/mv/i-3: Use the function, not the file. * tests/misc/stty: Likewise. * tests/misc/stty-row-col: Likewise. * tests/misc/stty-invalid: Likewise.
2008-09-07tests: work around Solaris 11 bugJim Meyering
* tests/misc/printf-surprise: Accept bogus prefix on stderr output.
2008-09-07tests: don't let rounding-to-1KB blocks provoke a failureJim Meyering
* tests/df/total-awk: Use df's --block-size=512 option.
2008-09-07tests: don't fail due to built-in sleep from Solaris 11's /bin/shJim Meyering
* tests/misc/help-version (id_args): Invoke via env to ensure we run the just-built version of sleep.
2008-09-06install: new option: --strip-program,Kamil Dudka
...to specify the program used to strip binaries * src/install.c (main): Handle new option --strip-program. (strip): Use strip program from global variable strip_program. (usage): Mention new option --strip-program in --help. * tests/tests/strip-program: Test case for new option --strip-program. * tests/Makefile.am: Add new test case to test set. * doc/coreutils.texi: Mention new option --strip-program. * NEWS: Mention the change. * TODO: Remove completed task.
2008-09-03df: new option: --total to print grand totalsKamil Dudka
* src/df.c (add_uint_with_neg_flag): New function to add two integral values with separate negation flag. (show_dev): New parameter force_fsu to display numbers directly. Collect summary statistics on each printed device. (usage): Mention new option --total in --help. (main): Initialize summary on program start. Handle new option --total. * tests/df/total: Dummy test case for new --total option. * tests/df/total-awk: Better test case for new --total option (requires awk). * doc/coreutils.texi: Mention new parameter --total. * NEWS: Mention the change. * TODO: Removed completed task.
2008-08-15adjustJim Meyering
2008-08-15sort: new option, --sort=version, for version number orderingBruce Korb
* src/sort.c [struct keyfield] (version): New member. (usage): Describe --version-sort. (sort_options): Add 'V'. (long_options): Add "version-sort". (CHECK_TABLE, _ct_, SORT_TABLE, _st_): Define new macros. (check_args, sort_args, sort_types): Use these new macros in declarations. (ARGMATCH_VERIFY): Remove use. No longer needed. (compare_version): New function. (key_compare): Add a case. (check_ordering_compatibility): Handle new type. (main): Likewise. Reformat two expressions for readability. * tests/misc/sort-version: new test file * tests/Makefile.am: add it to the list * doc/coreutils.texi (sort invocation): Document it. * NEWS: Mention the new feature.
2008-08-14set envvars via "env" to avoid spurious set -x output from bad shellsJim Meyering
* tests/dd/misc: Set LC_ALL=C via env. * tests/cp/thru-dangling: Set POSIXLY_CORRECT via env. This is necessary at least on AIX 5.3. Reported by Jeph Cowan and Ralf Wildenhues. Details here: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14235/focus=14257
2008-08-14mktemp, sort, tac: don't use undefined after mkstemp failureJim Meyering
When mkstemp fails, the template buffer may have undefined contents, so we must not print it. * src/sort.c (create_temp_file): Use temp_dir, not "file" when diagnosing failed mkstemp, because "file" may be undefined. * tests/misc/sort-merge: Adjust for new expected output. Jeph Cowan and Ralf Wildenhues reported the test failure: http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14235/focus=14257 * src/tac.c (copy_to_temp): Don't use template buffer after failed mkstemp call, since its contents may be undefined. * tests/misc/tac (pipe-bad-tmpdir): New test for the above. * src/mktemp.c (main): Save a copy of the template string, solely for use in case mkstemp fails. * tests/misc/mktemp (pipe-bad-tmpdir): New test for the above.
2008-08-10sort: don't print uninitialized in diagnosticJim Meyering
* src/sort.c (specify_nmerge): Do use uinttostr value. Provoke with e.g., sort -m --batch-size=18446744073709551617 Omit quotes around known-numeric value in diagnostic. * tests/misc/sort-merge [nmerge-big]: Tighten ERR_SUBST regexp to require a numeric value in that diagnostic, so this particular failure cannot reappear.
2008-08-09* tests/misc/expr: Add tests of the new GMP-based code.Jim Meyering
2008-08-01ls: --color now highlights files with capabilities, tooKamil Dudka
* src/ls.c: [HAVE_CAP] Include <sys/capability.h>. (has_capability): New function for capability detection. (print_color_indicator): Colorize file with capability. * m4/jm-macro.m4: New configure option: --disable-libcap. Check for libcap usability. * src/Makefile.am (dir_LDADD, ls_LDADD, ...): Append $(LIB_CAP). * src/dircolors.c: Update color lists. * src/dircolors.hin: Mention new CAPABILITY color attribute. * tests/ls/capability: Test for ls - colorize file with capability. * tests/Makefile.am (root_tests): Add ls/capability. * NEWS: Mention the change.
2008-07-27shuf: honor --zero-terminated option even with --input-range=LO-HIJim Meyering
* src/shuf.c (write_permuted_output): Add EOLBYTE parameter and use it rather than hard-coding "\n". (main): Adjust sole caller. * tests/misc/shuf: Add a test to exercise this bug fix. * NEWS: Mention it.