summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2008-05-06tests: save and restore TERM around use of TESTS_ENVIRONMENT,Jim Meyering
now that TESTS_ENVIRONMENT unsets it. * check.mk (am__check_pre): Save $TERM. (am__check_post): Restore saved value of TERM and export.
2008-05-06tests: hoist the sourcing of "lang-default"Jim Meyering
* tests/check.mk (TESTS_ENVIRONMENT): Source lang-default here, ... ... rather than in each of 100+ test scripts. * tests/chgrp/basic: * tests/chgrp/no-x: * tests/chmod/c-option: * tests/chmod/no-x: * tests/chmod/setgid: * tests/chmod/thru-dangling: * tests/chmod/umask-x: * tests/chmod/usage: * tests/chown/basic: * tests/chown/deref: * tests/chown/preserve-root: * tests/cp/abuse: * tests/cp/acl: * tests/cp/backup-is-src: * tests/cp/cp-a-selinux: * tests/cp/cp-i: * tests/cp/cp-mv-backup: * tests/cp/deref-slink: * tests/cp/fail-perm: * tests/cp/into-self: * tests/cp/link-preserve: * tests/cp/preserve-gid: * tests/cp/same-file: * tests/cp/slink-2-slink: * tests/cp/special-f: * tests/cp/symlink-slash: * tests/cp/thru-dangling: * tests/du/basic: * tests/du/hard-link: * tests/du/inacc-dest: * tests/du/long-sloop: * tests/du/no-x: * tests/install/basic-1: * tests/ln/hard-backup: * tests/ln/sf-1: * tests/ls/file-type: * tests/ls/infloop: * tests/ls/nameless-uid: * tests/ls/rt-1: * tests/ls/stat-failed: * tests/ls/symlink-slash: * tests/ls/x-option: * tests/misc/chcon: * tests/misc/chcon-fail: * tests/misc/csplit: * tests/misc/df-P: * tests/misc/groups-dash: * tests/misc/groups-version: * tests/misc/nohup: * tests/misc/printf-surprise: * tests/misc/runcon-no-reorder: * tests/misc/selinux: * tests/misc/split-a: * tests/misc/split-fail: * tests/misc/tac-continue: * tests/misc/wc-files0: * tests/mkdir/p-v: * tests/mkdir/selinux: * tests/mv/acl: * tests/mv/backup-dir: * tests/mv/backup-is-src: * tests/mv/childproof: * tests/mv/diag: * tests/mv/dir2dir: * tests/mv/dup-source: * tests/mv/force: * tests/mv/hard-link-1: * tests/mv/hard-verbose: * tests/mv/i-2: * tests/mv/i-3: * tests/mv/i-4: * tests/mv/i-5: * tests/mv/i-link-no: * tests/mv/into-self: * tests/mv/into-self-2: * tests/mv/into-self-3: * tests/mv/mv-special-1: * tests/mv/part-fail: * tests/mv/part-symlink: * tests/mv/partition-perm: * tests/mv/perm-1: * tests/mv/reply-no: * tests/mv/sticky-to-xpart: * tests/mv/update: * tests/rm/cycle: * tests/rm/dir-no-w: * tests/rm/dir-nonrecur: * tests/rm/fail-2eperm: * tests/rm/fail-eacces: * tests/rm/inaccessible: * tests/rm/interactive-always: * tests/rm/interactive-once: * tests/rm/isatty: * tests/rm/one-file-system: * tests/rm/r-1: * tests/rm/r-2: * tests/rm/rm1: * tests/rm/rm2: * tests/rm/rm3: * tests/rm/rm4: * tests/rm/rm5: * tests/rm/unread2: * tests/rm/v-slash: * tests/touch/fail-diag: * tests/touch/not-owner:
2008-05-06tests: hoist envvar-check so it is run for every testJim Meyering
I.e., also for Perl-based tests; not just the ones using test-lib.sh. * tests/check.mk (TESTS_ENVIRONMENT): Source envvar-check here, ... * tests/test-lib.sh: ...not here.
2008-05-06fix typo in comments: s/ouput/output/Jim Meyering
adjust spelling in that same comment: s/localisation/localization/
2008-05-06* tests/touch/Makefile.am: Remove now-unused file.Jim Meyering
2008-05-06tests: test split more thoroughlyJim Meyering
* tests/misc/split-a: Clean up. Catch more failures.
2008-05-06* tests/misc/wc: Remove an unused variable.Jim Meyering
2008-05-06tests: detect and check more uses of strcmpJim Meyering
* maint.mk (sc_prohibit_strcmp): Relax regexp to recognize other formatting styles.
2008-05-06avoid problems with sign-extended "char" operand to is* functionsJim Meyering
* src/cut.c (set_fields): Apply to_uchar to isblank operands. * src/uniq.c (find_field): Likewise. * src/seq.c (scan_arg): Likewise, for isspace. * tests/misc/uniq: New file. Test for the above, but only when isspace(0240). * tests/Makefile.am (TESTS): Add misc/uniq. * configure.ac: Use gt_LOCALE_FR. * tests/check.mk (TESTS_ENVIRONMENT): Propagate LOCALE_FR to scripts. * NEWS: Mention the bug fixes. Before this patch, on FreeBSD 6: $ printf 'x y z\nx \xa0 y z\n' > in $ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' . x.y.z x. .y.z With the patch: $ LC_ALL=fr_FR.UTF-8 uniq -f2 in|tr ' ' . x.y.z This also affected many other locales: for i in $(locale -a); do test $(LC_ALL=$i ./uniq -f1 in|wc -l) = $(LC_ALL=$i uniq -f1 in|wc -l) || echo $i ; done ... en_GB.ISO8859-1 en_GB.ISO8859-15 en_GB.UTF-8 en_IE.UTF-8 en_NZ.ISO8859-1 en_NZ.ISO8859-15 en_NZ.UTF-8 en_US.ISO8859-1 en_US.ISO8859-15 en_US.UTF-8 ...
2008-05-06base64: remove some unused/redundant getopt codeBo Borgerson
* src/base64.c (struct option long_option): Remove redundant help/version option items. (main): Remove unused 'q' from short options. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-05-06help2man: fix perl 5.10 problem properlyJim Meyering
* man/help2man: Do pull LC_ALL via "use POSIX". Instead, limit the importing of gettext-related symbols to just those two we'll use: gettext and textdomain.
2008-05-05help2man: avoid failure with Debian unstable's Perl 5.10.0Jim Meyering
Avoid failure that produced this diagnostic: Constant subroutine main::LC_ALL redefined at /.../Exporter.pm * man/help2man: Don't include LC_ALL in the "use POSIX" list, since Locale::gettext->import will get it.
2008-05-05base64 module: adjust API so it's compatible with gnulib'sBo Borgerson
* gl/lib/base64.c (base64_decode_ctx): If no context structure was passed in, treat newlines as garbage (this is the historical behavior). Formerly base64_decode. (base64_decode_alloc_ctx): Formerly base64_decode_alloc. * gl/lib/base64.h (base64_decode): Macro for four-argument calls. (base64_decode_alloc): Likewise. * src/base64.c (do_decode): Call base64_decode_ctx instead of base64_decode. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-05-05* tests/misc/tac: Set execute bit.Jim Meyering
2008-05-05tac: avoid segfault for e.g., "echo > x; tac -r x x"Jim Meyering
* src/tac.c (tac_seekable): Move local "regs" declaration out to file scope, so its values aren't clobbered between calls. Discovered by Cristian Cadar, Daniel Dunbar and Dawson Engler, reported in http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/13501 * NEWS: Mention the bug fix. * tests/Makefile.am (TESTS): Add misc/tac. * tests/misc/tac: New file. Test for the above.
2008-04-30tests: avoid a "make check-root" failure when mcstransd is runningJim Meyering
* tests/misc/chcon: Skip this test if mcstransd seems to be running.
2008-04-30tests: avoid spurious "make check-root" failureJim Meyering
* README (Running tests as root): Also set PATH in suggested "sudo" command. This avoids failure of at least tests/cp/cp-a-selinux when the default PATH does not contain /sbin. * tests/cp/cp-a-selinux: Don't redirect stderr to /dev/null. "mkfs" was failing due to /sbin not being in PATH.
2008-04-30Add Daniel Dunbar's lcov instructions to HACKINGBo Borgerson
* HACKING: New section `Finding things to do', points to TODO file and gives instructions on generating an html coverage report as provided by Daniel Dunbar. * TODO: Add item for improving test coverage. Point back to HACKING. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-04-29chcon, runcon: make --help print the bug-reporting addressJim Meyering
* src/chcon.c (usage): Use emit_bug_reporting_address. * src/runcon.c (usage): Likewise. * tests/misc/help-version: Don't exempt chcon and runcon. * NEWS: Mention this.
2008-04-28tests: don't hard-code coreutils list of tests/ SUBDIRS in bootstrapJim Meyering
* bootstrap: Extract the list from tests/Makefile.am, and die when it is empty -- it will be, eventually.
2008-04-28tests: remove references to tests/wc from bootstrapBo Borgerson
* bootstrap: Don't try to initialize anything in tests/wc. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-04-28tests: slightly relax sc_cast_of_argument_to_free syntax checkJim Meyering
* maint.mk (sc_cast_of_argument_to_free): Relax regexp slightly. (sc_no_have_config_h): Add a comment.
2008-04-28tests: don't chmod after a failed chdir in cleanupBo Borgerson
* tests/CuTmpdir.pm (chmod_tree): Don't chmod if chdir failed. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-04-28Only cleanup test dirs from the process that created them.Bo Borgerson
* tests/CuTmpdir.pm (import): Use closure around current PID to avoid cleanup races. Signed-off-by: Bo Borgerson <gigabo@gmail.com>
2008-04-27move wc tests from own subdir into a single scriptJim Meyering
* configure.ac (AC_CONFIG_FILES): Remove wc/Makefile from the list. * tests/Makefile.am (SUBDIRS): Remove wc from the list. (TESTS): Add misc/wc. * tests/misc/wc: New file, derived from tests/wc/Tests.pm. * tests/wc/Test.pm: Remove file.
2008-04-27tests: remove temporary log file upon catchable signalJim Meyering
* check.mk (am__check_pre): Add signal handler to remove $@-t.
2008-04-27tests: don't source envvar-check manually, test-lib.sh does itJim Meyering
* tests/cp/abuse: Remove ". $top_srcdir/tests/envvar-check". * tests/cp/parent-perm: Likewise. * tests/cp/special-f: Likewise. * tests/ls/proc-selinux-segfault: Likewise. * tests/misc/help-version: Likewise. * tests/mkdir/selinux: Likewise. * tests/mv/sticky-to-xpart: Likewise. * tests/touch/now-owned-by-other: Likewise. * tests/sample-test: Remove commented out suggestion.
2008-04-27tests: ensure at least one failure when $built_programs is emptyJim Meyering
Before, this test and others would pass with empty $built_programs. * tests/misc/help-version: Fail if built_programs is empty.
2008-04-27tests: improve perl-based tempdir handlingJim Meyering
Before, upon interrupt, directories would be left behind. * tests/CuTmpdir.pm: Remove temporary directory on interrupt.
2008-04-27tests: reorder some tests in the long listJim Meyering
* tests/Makefile.am (TESTS): Move some tests that use sleep "up" in the list so that they don't delay even a little the completion of "make check". Also run a chmod test early.
2008-04-27tests: put root-only (usually skipped) tests at the endJim Meyering
* tests/Makefile.am (TESTS): Don't list root-only tests explicitly. Instead, just use $(root_tests). * tests/check.mk (vc_exe_in_TESTS): Now that root_tests are separate, parse out the union of $(TESTS) and $(root_tests).
2008-04-27tests: move another file (expensive) into test-lib.shJim Meyering
* tests/expensive: Remove file. Move contents into ... * tests/test-lib.sh (expensive_): ...here. New function. * tests/du/fd-leak: Update caller to use the new function. * tests/mv/leak-fd: Likewise. * tests/rm/hash: Likewise. * tests/tail-2/big-4gb: Likewise. * tests/Makefile.am (EXTRA_DIST): Remove its name.
2008-04-27tests: cp/perm (usually not run) was failing on systems with SELinuxJim Meyering
* tests/cp/perm: Use stat to get the permission string, not ls. This test was run only when RUN_VERY_EXPENSIVE_TESTS=yes was set in the environment. It would fail on SELinux-enable systems because ls-generated permission strings would not match, e.g., "test _-rw-r--r--+ = _-rw-r--r--" would fail.
2008-04-27tweak HACKING adviceJim Meyering
2008-04-24tests: do define built_programsJim Meyering
* tests/check.mk (built_programs): Define here, where it's used. This definition was in now-removed tests/misc/Makefile.am.
2008-04-23tests: update commented-out examples in sample-test, tooJim Meyering
* tests/sample-test: Use $top_srcdir/tests/SCRIPT_NAME, not $top_srcdir/../SCRIPT_NAME here, too.
2008-04-23tests: don't fail in a non-English localeOndřej Vašík
* tests/chmod/thru-dangling: Source lang-default. * tests/cp/thru-dangling: Likewise. * tests/misc/printf-surprise: Likewise.
2008-04-23tests: remove now-unused Makefile.amJim Meyering
* tests/misc/Makefile.am: Remove file.
2008-04-23id: do not print SELinux context when invoked with a USERNAME argumentOndřej Vašík
* NEWS: Mention new behaviour. * src/id.c (main): Do not print SELinux context when user is specified. * tests/Makefile.am: Add the new test. * tests/misc/id-context: New file. Test for the fix. Problem reported by Ronny Buchmann in http://bugzilla.redhat.com/443485.
2008-04-23id: do print the AFS-specific nameless group ID (called a PAG)Jim Meyering
In 6.11, we mistakenly suppressed the printing of certain group IDs, thinking they were useless AFS-specific artifacts. This change reverts that, so now they are printed once again. http://thread.gmane.org/gmane.org.fsf.announce/867/focus=13345 This also reverts the bug-fix that applied solely to the new code used to avoid printing those IDs Revert "id bug fix: don't point to potentially clobbered static storage" This reverts commit f7d1c59c224f81a8bab5fa2afcaf815988f50467. Revert "Work around AFS bug: id and groups would print invalid group number." This reverts commit b7a836c0a3524cda8ef79c30c3fe7ea759ae4656. Revert "* src/c99-to-c89.diff: Accommodate a C99-ism in id.c." This reverts commit d44893c5dba4150b4ded9cf6aad316c1ef620c9f.
2008-04-22build: move a project-specific definition to cfg.mkJim Meyering
* cfg.mk (old_NEWS_hash): Define here, ... * maint.mk: ... not here. (update-NEWS-hash): Update comment. Suggestion from Eric Blake.
2008-04-22Accommodate building on OS/2 (www.ecomstation.com Ecs v2 rc4)Jim Meyering
* configure.ac: Filter out carriage returns in more places. Reported by Elbert Pol, details here: http://thread.gmane.org/gmane.org.fsf.announce/867/focus=13332
2008-04-22guard against inserting a NEWS entry into a block for a prior releaseJim Meyering
Without a guard like this, it is far too easy to apply a patch prepared against a preceding release, and not notice that a NEWS entry is inserted into the wrong block. * maint.mk (sc_immutable_NEWS): New rule. (update-NEWS-hash): New rule to update the hard-coded hash.
2008-04-22tests: ensure that all exec-$PERL lines are the sameJim Meyering
* maint.mk (sc_perl_coreutils_test): New rule.
2008-04-21tests: skip (don't fail) rm/one-file-system when mount --bind failsJim Meyering
* tests/rm/one-file-system: Reported by Allen Hewes.
2008-04-21tests: convert umask-check to a functionJim Meyering
* tests/test-lib.sh (working_umask_or_skip_): New function, from... * tests/umask-check: ...here. Remove file. * tests/Makefile.am (EXTRA_DIST): Remove umask-check. * tests/mkdir/perm: Use the function rather than sourcing the file. * tests/cp/cp-parents: Likewise. * tests/cp/parent-perm: Likewise. Bruno Haible reported that parent-perm was failing to run umask-check.
2008-04-21tests: adjust perl -I to use $top_srcdir/tests, not $srcdir/..Jim Meyering
2008-04-21tests: clean up root tests; adapt to new layoutJim Meyering
* tests/Makefile.am (root_tests): New list. (check-root): Add 'SUBDIRS='. (root-hint): Point to README. * Makefile.am (check-root): Add 'SUBDIRS=' here, too. * maint.mk (sc_root_tests): Adapt rule to new syntax used in tests/Makefile.am.
2008-04-21Revamp test-related Makefiles.Jim Meyering
One side-effect of this change is that "make check" now works even if you put "." early in your shell's search PATH (don't do that!). Remove all test-related Makefile.am files, except those generated by mk-script. Instead, tests/Makefile.am now lists not only the tests directly under tests/, but also those in tests/*/ that are not generated by mk-script, e.g., cp/abuse, cp/acl, mv/i-1, etc. A lot of these changes are like this: -. $srcdir/../lang-default +. $top_srcdir/tests/lang-default -. $srcdir/../test-lib.sh +. $top_srcdir/tests/test-lib.sh * configure.ac (AC_CONFIG_FILES): Remove corresponding Makefiles. * tests/check.mk (vc_exe_in_TESTS): Relax syntax requirements. * tests/rwx-to-mode: Remove file. Rewritten as... * tests/test-lib.sh (rwx_to_mode_): ...this new function. * tests/Makefile.am (EXTRA_DIST): Remove rwx-to-mode. (SUBDIRS): Remove each dir with a removed Makefile.am. (EXTRA_DIST): Add $(TESTS). (TESTS): Add over 300 entries.
2008-04-20* tests/misc/Makefile.am (built_programs): Remove. Unused.Jim Meyering