summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
AgeCommit message (Collapse)Author
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: 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-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-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: 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-03-01Don't skip the groups-version test.Jim Meyering
* tests/Makefile.am (built_programs): Remove unused definition. * src/Makefile.am (built_programs.list): Print a space-separated list of program names, not NL-separated, since all clients now expect a space-separated list.
2008-02-12* tests/Makefile.am (EXTRA_DIST): Remove strace.Jim Meyering
2008-02-09tests: factor out the perl-requiring code in many test scriptsJim Meyering
* tests/require-perl: New file. * tests/Makefile.am (EXTRA_DIST): Add require-perl. * tests/dd/skip-seek: Use it, and remove manual tests. * tests/du/files0-from: Likewise. * tests/ls/nameless-uid: Likewise. * tests/misc/base64: Likewise. * tests/misc/basename: Likewise. * tests/misc/cut: Likewise. * tests/misc/date: Likewise. * tests/misc/dircolors: Likewise. * tests/misc/dirname: Likewise. * tests/misc/expand: Likewise. * tests/misc/expr: Likewise. * tests/misc/factor: Likewise. * tests/misc/fmt: Likewise. * tests/misc/fold: Likewise. * tests/misc/head-elide-tail: Likewise. * tests/misc/ls-misc: Likewise. * tests/misc/md5sum: Likewise. * tests/misc/md5sum-newline: Likewise. * tests/misc/mktemp: Likewise. * tests/misc/od: Likewise. * tests/misc/paste-no-nl: Likewise. * tests/misc/pr: Likewise. * tests/misc/pwd-long: Likewise. * tests/misc/seq: Likewise. * tests/misc/sha1sum: Likewise. * tests/misc/sha1sum-vec: Likewise. * tests/misc/sha224sum: Likewise. * tests/misc/sha256sum: Likewise. * tests/misc/sha384sum: Likewise. * tests/misc/sha512sum: Likewise. * tests/misc/sort-merge: Likewise. * tests/misc/stat-printf: Likewise. * tests/misc/sum: Likewise. * tests/misc/sum-sysv: Likewise. * tests/misc/test-diag: Likewise. * tests/misc/tsort: Likewise. * tests/misc/tty-eof: Likewise. * tests/misc/unexpand: Likewise. * tests/misc/wc-files0-from: Likewise. * tests/misc/xstrtol: Likewise. * tests/mv/i-1: Likewise. * tests/rm/empty-name: Likewise. * tests/rm/fail-eperm: Likewise. * tests/rm/unreadable: Likewise. (EXTRA_DIST): *do* require require-perl as a stand-alone, 'source'able script.
2008-02-09tests: move the very-expensive file into test-lib.shJim Meyering
* tests/very-expensive: Remove file. * tests/test-lib.sh (very_expensive_): New function. * tests/Makefile.am (EXTRA_DIST): Remove very-expensive. * tests/cp/perm: Call the new function, rather than sourcing the file. * tests/tail-2/assert: Likewise. * tests/tail-2/assert-2: Likewise. * tests/du/2g: Likewise.
2008-02-09tests: start migrating sourced-file function-like tests into test-lib.sh.Jim Meyering
* tests/acl: Remove file. * tests/test-lib.sh (require_acl_): New function. * tests/cp/acl: Use require_acl_ instead. * tests/mv/acl: Likewise. * tests/Makefile.am (EXTRA_DIST): Remove acl.
2008-01-06touch: add a test for today's change.Jim Meyering
* tests/touch/now-owned-by-other: New script. Test today's change. * tests/touch/Makefile.am (TESTS): Add now-owned-by-other. * tests/Makefile.am (all_t): Add td, a new root-only test. (td): New target. * NEWS: Mention the improvement.
2007-11-24Test the new feature: cp -p preserves the GID whenever possible.Lasse Collin
* tests/cp/preserve-gid: New file. Test for today's change. * tests/cp/Makefile.am (TESTS): Add preserve-gid. * tests/Makefile.am (all_t): Add tc. (tc): New target.
2007-11-01Use mktemp, not mkdtemp, to create test directories.Jim Meyering
* tests/test-lib.sh: Use the mktemp binary we've just built, not the mkdtemp script. * tests/mkdtemp: Remove file. * tests/Makefile.am (EXTRA_DIST): Remove mkdtemp.
2007-10-27Clean up tests/Makefile.am.Jim Meyering
* tests/Makefile.am (EXTRA_DIST): Remove $(TESTS). No longer defined. (TESTS_ENVIRONMENT): Remove definition.
2007-10-21Reorder tests to run more basic ones earlier.Jim Meyering
* tests/misc/Makefile.am (TESTS): Reorder. * tests/Makefile.am (SUBDIRS): Reorder. Signed-off-by: Jim Meyering <meyering@redhat.com>
2007-10-09Move the help-version test into misc/.Jim Meyering
* tests/help-version: Move to... * tests/misc/help-version: ...here. Source test-lib.sh, as usual. Use $abs_top_builddir, rather than ".." and "../..".
2007-10-09Skip the chcon test on a system with no SELinux support.Jim Meyering
* tests/test-lib.sh (require_selinux_): New function. * tests/misc/chcon: Use it. * tests/misc/selinux: Use it here, too. * tests/cp/cp-a-selinux: and here. * tests/selinux: Remove file. * tests/Makefile.am (EXTRA_DIST): Remove selinux. Reported by Mike Frysinger and Bauke Jan Douma.
2007-10-05Make a failing cross-partition mv give a sensible diagnostic.Jim Meyering
A cross-partition move of a file in a sticky tmpdir and owned by another user would evoke an invalid diagnostic after copying it: mv: cannot remove `x': Operation not permitted Either of the following (mv.c, remove.c) changes would fix the bug by itself. I think it's slightly better to use both; the added cost is minimal: mv: an extra lstat-per-mv-cmdline-arg-that-goes-cross-partition, rm: an extra lstat-per-unlink-that-fails-w/EPERM. * src/remove.c (remove_entry): Also lstat the file upon EPERM. * src/mv.c (rm_option_init): Initialize root_dev_ino just as is done in rm, so that a cross-partition invoked remove.c:rm call works the same way as one invoked from the command-line use of "rm". That setting of root_dev_ino makes rm() do the equivalent of an additional lstat for each argument, which in turn gives rm enough information to issue the right diagnostic. * tests/mv/sticky-to-xpart (version): New file. Test for the above. * tests/mv/Makefile.am (TESTS): Add sticky-to-xpart. Arrange for "make check-root" to run the new root-only test. * tests/Makefile.am (tb): New target, to run the new root-only test. (all_t): Add tb. * src/c99-to-c89.diff: Adjust offsets.
2007-09-15Enable some previously omitted test scripts. Add a test cross-check.Jim Meyering
* tests/rm/Makefile.am (TESTS): Add empty-name and unreadable. * tests/rm/empty-name: Likewise. * tests/rm/unreadable: Reenable this test. Adjust for new rm. * tests/mkdir/Makefile.am: Add writable-under-readonly. * tests/mkdir/writable-under-readonly: Add some comments. This test is always skipped, for now. * tests/Makefile.am (ta): Hook up the new root-only script. * tests/tail-2/infloop-1: Make this test pass. * tests/tail-2/Makefile.am (TESTS): Add infloop-1. * tests/tail-2/fflush: Remove unused file. * tests/check.mk (vc_executable_is_in_TESTS): More portable. * tests/check.mk (check): Depend on the above. * build-aux/check.mk: Remove comment mentioning AUTHORS file.
2007-09-15Move the sole test in tests/ls-2/ to tests/misc/.Jim Meyering
* tests/ls-2/basic-1: Move this file to ... * tests/misc/ls-misc: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add ls-misc. * tests/Makefile.am (SUBDIRS): Remove ls-2. * tests/ls-2: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/ls-2/Makefile.
2007-09-15Move all tests from test/{od,sha1sum,shred,stty} to tests/misc/.Jim Meyering
Reflect these renamings: od/od-N misc/od-N od/x8 misc/od-x8 sha1sum/basic-1 misc/sha1sum sha1sum/sample-vec misc/sha1sum-vec shred/exact misc/shred-exact shred/remove misc/shred-remove stty/basic-1 misc/stty stty/invalid misc/stty-invalid stty/row-col-1 misc/stty-row-col * tests/misc/Makefile.am (TESTS): Add the new files. * tests/Makefile.am (SUBDIRS): Remove the dir names. * tests/od, tests/sha1sum, tests/shred, tests/stty: Remove the directories. * configure.ac (AC_CONFIG_FILES): Remove the corresponding Makefile names.
2007-09-15Move the two tests in tests/tee to tests/misc/.Jim Meyering
* tests/tee/basic: Move this file to ... * tests/misc/tee: ...here. Don't rely on $PROG in env. * tests/tee/dash: Move this file to ... * tests/misc/tee-dash: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add tee. * tests/Makefile.am (SUBDIRS): Remove tee. * tests/tee: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/tee/Makefile
2007-09-15Move the two tests in tests/sum/ to tests/misc/.Jim Meyering
* tests/sum/basic-1: Move this file to ... * tests/misc/sum: ...here. Don't rely on $PROG in env. * tests/sum/sysv: Move this file to ... * tests/misc/sum-sysv: ...here. Adapt it to use test-lib.sh. * tests/misc/Makefile.am (TESTS): Add sum and sum-sysv. * tests/Makefile.am (SUBDIRS): Remove sum. * tests/sum: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/sum/Makefile.
2007-09-15Move the sole test in tests/tsort/ to tests/misc/tsort.Jim Meyering
* tests/tsort/basic-1: Move this file to ... * tests/misc/tsort: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add tsort. * tests/Makefile.am (SUBDIRS): Remove tsort. * tests/tsort: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/tsort/Makefile.
2007-09-15Move the sole test in tests/unexpand to tests/misc/unexpand.Jim Meyering
* tests/unexpand/basic-1: Move this file to ... * tests/misc/unexpand: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add unexpand. * tests/Makefile.am (SUBDIRS): Remove unexpand. * tests/unexpand: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/unexpand/Makefile.
2007-09-15Move the sole test in tests/seq to tests/misc/seq.Jim Meyering
* tests/seq/basic: Move this file to ... * tests/misc/seq: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add seq. * tests/Makefile.am (SUBDIRS): Remove seq. * tests/seq: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/seq/Makefile
2007-09-15Move the two tests in tests/md5sum to tests/misc/md5sum.Jim Meyering
* tests/md5sum/basic-1: Move this file to ... * tests/misc/md5sum: ...here. Don't rely on $PROG in env. * tests/md5sum/newline-1: Move this file to ... * tests/misc/md5sum-newline: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add md5sum. * tests/Makefile.am (SUBDIRS): Remove md5sum. * tests/md5sum: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/md5sum/Makefile
2007-09-15Move the two tests in tests/fmt to tests/misc/fmt.Jim Meyering
* tests/fmt/basic: Move this file to ... * tests/misc/fmt: ...here. Don't rely on $PROG in env. * tests/fmt/long-line: Move this file to ... * tests/misc/fmt-long-line: ...here. * tests/misc/Makefile.am (TESTS): Add fmt. * tests/Makefile.am (SUBDIRS): Remove fmt. * tests/fmt: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/fmt/Makefile
2007-09-15Move the sole test in tests/factor to tests/misc/factor.Jim Meyering
* tests/factor/basic: Move this file to ... * tests/misc/factor: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add factor. * tests/Makefile.am (SUBDIRS): Remove factor. * tests/factor: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/factor/Makefile
2007-09-15Move the sole test in tests/expr to tests/misc/expr.Jim Meyering
* tests/expr/basic: Move this file to ... * tests/misc/expr: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add expr. * tests/Makefile.am (SUBDIRS): Remove expr. * tests/expr: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/expr/Makefile
2007-09-15Move the sole test in tests/dircolors to tests/misc/dircolors.Jim Meyering
* tests/dircolors/simple: Move this file to... * tests/misc/dircolors: ...here. Don't rely on $PROG in env. * tests/misc/Makefile.am (TESTS): Add dircolors. * tests/Makefile.am (SUBDIRS): Remove dircolors. * tests/dircolors: Remove the directory. * configure.ac (AC_CONFIG_FILES): Remove tests/dircolors/Makefile
2007-09-15Parallel "make check" support.Jim Meyering
* build-aux/check.mk: New file, from The Vaucanson Group. * .x-sc_GPL_version: New file, to allow "version 2 or later" in build-aux/check.mk. * Makefile.am (EXTRA_DIST): Add .x-sc_GPL_version. * tests/check.mk: New file. * tests/Makefile.am (EXTRA_DIST): Add check.mk, mkdtemp and test-lib.sh. Begin factoring "sample-test" out of test scripts. * tests/test-lib.sh: New file, to be sourced by all tests that were previously derived from the "sample-test" template. * tests/mkdtemp: New file. * tests/touch/dir-1: Use test-lib.sh. * tests/touch/empty-file: Likewise. * tests/touch/fail-diag: Likewise. * tests/touch/fifo: Likewise. * tests/touch/no-create-missing: Likewise. * tests/touch/no-rights: Likewise. Also, don't sleep. * tests/touch/not-owner: Likewise. * tests/touch/obsolescent: Likewise. * tests/touch/read-only: Likewise. * tests/touch/relative: Likewise. * tests/touch/Makefile.am: Include $(top_srcdir)/tests/check.mk, to get the parallel-"make check" bits. Move a slow test into tests/misc. * tests/check.mk: Wrapper. * tests/ls/time-1: Move this file to tests/misc/ls-time. * tests/misc/ls-time: New file. From tests/ls/time-1. * tests/ls/Makefile.am (TESTS): Remove time-1. * tests/misc/Makefile.am (TESTS): Add ls-time.
2007-08-18Run each Coreutils.pm-based test in its own subdirectory.Jim Meyering
* tests/CuTmpdir.pm: New file. * tests/Makefile.am (EXTRA_DIST): Add CuTmpdir.pm. * tests/misc/od, tests/misc/base64, tests/misc/basename: * tests/misc/cut, tests/misc/date, tests/misc/dirname: * tests/misc/expand, tests/misc/fold, tests/misc/head-elide-tail: * tests/misc/paste-no-nl, tests/misc/pr, tests/misc/sha224sum: * tests/misc/sha256sum, tests/misc/sha384sum, tests/misc/sha512sum: * tests/misc/sort-merge, tests/misc/stat-printf, tests/misc/test-diag: * tests/misc/wc-files0-from, tests/misc/xstrtol: * tests/dd/skip-seek, tests/dircolors/simple, tests/du/files0-from: * tests/expr/basic, tests/factor/basic, tests/fmt/basic: * tests/ls-2/tests, tests/md5sum/basic-1, tests/md5sum/newline-1: * tests/seq/basic, tests/sha1sum/basic-1, tests/sha1sum/sample-vec: * tests/sum/basic-1, tests/tsort/basic-1, tests/unexpand/basic-1: * tests/mv/i-1, tests/rm/empty-name, tests/rm/unreadable: Use it. * tests/misc/test-diag: Use "$ENV{abs_top_builddir}/src/test", not "../../src/test", so it works when run from a subdirectory. * tests/ls-2/tests: Create temp files and dirs from within the perl script, so that they're removed, when run from a subdirectory.
2007-07-15ls --color: Don't stat symlinks when neither ORPHAN nor MISSING attribute ↵Jim Meyering
has a color. * src/ls.c (main): Don't set check_symlink_color when C_EXEC is colored, unless ln=target (aka color_symlink_as_referent) is set. (gobble_file): Set f->linkok = true also when !check_symlink_color. http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/10608/focus=10927 Reported by Jeremy Maitin-Shepard. * tests/strace: New file, contents extracted from... * tests/mv/atomic: ...here. Source strace. * tests/ls/stat-free-symlinks: New file. Test for the above. Use strace to ensure that in this corner case, ls does not call stat. * tests/ls/Makefile.am (TESTS): Add stat-free-symlinks. * tests/Makefile.am (EXTRA_DIST): Add strace.
2007-07-10Skip "arch" test if it's not built.Jim Meyering
* tests/misc/Makefile.am (built_programs): Define. (TESTS_ENVIRONMENT): Add $(built_programs), for... * tests/misc/arch: ...this: skip the test if arch is not built. * src/Makefile.am (built_programs.list): New rule. * tests/Makefile.am (built_programs): Rename from all_programs. (TESTS_ENVIRONMENT): Use built_programs, not all_programs. * tests/help-version: Likewise. * NEWS: Mention that using --enable-no-install-program=X may cause "make check" to fail. Signed-off-by: Jim Meyering <jim@meyering.net>
2007-03-29Arrange for "make check-root" to run the new root-only test.Jim Meyering
* tests/Makefile.am (t9): New target, to run tests/cp/cp-a-selinux. (all_t): Add t9. Use a directory on a loopback device mounted with -o context=... * tests/cp/cp-a-selinux: Since this test now runs mount and umount, it is a root-only one.
2007-03-29* tests/cp/cp-a-selinux: New file. Test for the bug reported inJim Meyering
* tests/cp/Makefile.am (TESTS): Add cp-a-selinux. * tests/selinux: New file. * tests/Makefile.am (EXTRA_DIST): Add selinux. * tests/misc/selinux: Source the new script, rather than open coding it. Change how "cp -a" and "cp --preserve=context" work with SELinux. Now, cp -a attempts to preserve context, but failure to do so does not change cp's exit status. However "cp --preserve=context" is similar, but failure *does* cause cp to exit with nonzero status. * src/copy.h (struct cp_options) [require_preserve_context]: New member. * src/copy.c (copy_reg, copy_internal): Implement the above. * src/mv.c (cp_option_init): Initialize the new member. * src/install.c (cp_option_init): Likewise. * src/cp.c (cp_option_init): Likewise. (decode_preserve_arg): Set it or reset it. FIXME: add an on-writable-NFS-only test
2007-03-29ls: Add support for SELinux and a slightly modified -Z option.Jim Meyering
I started with the patches from Red Hat. The entries below tell how the code evolved. * src/ls.c (print_long_format, print_file_name_and_frills): When there is no security context (due to getfilecon/lgetfilecon failing with e.g. ENOTSUP), print it as "?", not "". * src/ls.c (print_file_name_and_frills): Make -Z work without -l. (length_of_file_name_and_frills): Likewise. * src/ls.c: Remove the --lcontext and --scontext options. Change the way -Z, --context work so that it no longer implies -l. Thus, -Z -l will work like -lcontext and -Z without -l will work like --scontext. Adjust tests to reflect new 'ls -l' syntax -- affects only systems with SELinux when operating on a file with no ACL. These tests assumed that everything before the first space on each line is the 10-byte mode string. But there may also be a "+" in the 11th column, just before the space. However, note that this is not new. The same thing would have happened even without the change below, when listing a file with an ACL. * tests/chmod/equals, tests/cp/cp-parents, tests/cp/fail-perm: * tests/cp/link-preserve, tests/install/basic-1, tests/misc/mknod: * tests/mkdir/parents, tests/mkdir/special-1, tests/mv/partition-perm: Don't make compilation depend on USE_ACL. An SELinux security context counts as an "alternate access control method", so ls must output a "+" for each file with a security context. * src/ls.c [struct fileinfo] (have_acl): Declare unconditionally. (FILE_HAS_ACL): Remove macro definition. Use f->have_acl directly. (gobble_file): Record whether a file has a security context, and update the condition used to determine whether to print the "+". (gobble_file): Call getfilecon/lgetfilecon also when format == long_format, so that we get the "+". * src/ls.c (gobble_file): Add a comment explaining why (with a security context option) ls doesn't exit nonzero due to e.g., getfilecon failing with errno == ENOTSUP. * src/ls.c (gobble_file): Ignore failure of getfilecon if it's due to ENOTSUP. * src/ls.c (gobble_file): Factor out three small blocks using getfilecon and lgetfilecon. Don't ignore return value from getfilecon and lgetfilecon. * src/ls.c (print_long_format): Don't use ?: (empty 2nd arg with C ternary operator). (print_scontext_format): Likewise. (print_scontext): Declare to be "bool", not int. Adjust uses. * src/Makefile.am (dir_LDADD, ls_LDADD, vdir_LDADD): Add $(LIB_SELINUX). * tests/misc/chcon: New file. * tests/misc/chcon-fail: New file. * tests/Makefile.am (check-root): Run new, root-only misc/chcon test. * tests/misc/Makefile.am (TESTS): Add chcon and chcon-fail. * tests/misc/Makefile.am (TESTS): Add selinux. * tests/misc/selinux: New file. * tests/help-version: Skip chcon.
2007-01-13Put CU_TEST_NAME in the environment for each test run by "make check".Jim Meyering
* Transform all Makefile.am files so that when running "make check", CU_TEST_NAME is set to the name of the test. This is so that when I run valgrind-enabled (--log-file-qualifier=CU_TEST_NAME) "make check" on the entire package it is more convenient to map a leak or error found in a valgrind log file back to the offending test. Use this command: (echo tests/Makefile.am.in; find tests -name Makefile.am) \ |xargs perl -pi -e '/^(\s*)PATH=...VG_PATH_PREFIX/ and ' \ -e 'print $1,q|CU_TEST_NAME=`basename $(abs_srcdir)`,$$tst |,"\\\n"'
2006-11-21Arrange for "make check-root" to run the new root-only test.Jim Meyering
* tests/Makefile.am (t7): New target, to run tests/ls/nameless-uid. (all_t): Add t7.
2006-10-25new feature: rm accepts new option: --one-file-systemJim Meyering
Suggested by Steve McIntyre in <http://bugs.debian.org/392925>. * src/remove.h (struct rm_options) [one_file_system]: New member. * src/rm.c (rm_option_init): Initialize it. (usage): Document the option. * src/mv.c (rm_option_init): Likewise. * src/remove.c (remove_dir): With --one-file-system and --recursive, for each directory command line argument, do not affect a file system different from that of the starting directory. And give a diagnostic. * src/rm.c (ONE_FILE_SYSTEM): New enum. (main): Handle new option. * tests/rm/one-file-system: Test the above. * tests/rm/Makefile.am (TESTS): Add one-file-system. * tests/Makefile.am (check-root): Add the rm/one-file-system test to the list. (EXTRA_DIST): Add other-fs-tmpdir. * tests/mv/setup: Removed. Renamed to... * tests/other-fs-tmpdir: ...this new file. * tests/mv/Makefile.am (EXTRA_DIST): Remove setup. * tests/mv/acl: Reflect renaming: use ../other-fs-tmpdir. * tests/mv/backup-is-src: Likewise. * tests/mv/hard-link-1: Likewise. * tests/mv/leak-fd: Likewise. * tests/mv/mv-special-1: Likewise. * tests/mv/part-fail: Likewise. * tests/mv/part-hardlink: Likewise. * tests/mv/part-rename: Likewise. * tests/mv/part-symlink: Likewise. * tests/mv/partition-perm: Likewise. * tests/mv/to-symlink: Likewise. * tests/mv/into-self-2: Likewise. [doc/ChangeLog] * coreutils.texi (rm invocation): Describe --one-file-system.
2006-10-24Don't let a failure in one test stop "make -k".Jim Meyering
* tests/Makefile.am (t1 t2 t3 t4 t5): New targets. (check-root): Depend on them, rather than executing the five commands in a single rule. Reported by Greg Schafer.
2006-08-19* tests/Makefile.am (EXTRA_DIST): Add sparse-file.Jim Meyering
2006-07-03* tests/Makefile.am, tests/*/Makefile.am: (TESTS_ENVIRONMENT):Jim Meyering
Add $VG_PATH_PREFIX as a prefix to $PATH
2006-07-03* tests/envvar-check (vars): Add CDPATH and POSIXLY_CORRECT.Jim Meyering
* tests/Makefile.am (evar-check): Remove rule. (EXTRA_DIST): Remove .env-warn. * tests/.env-warn: Remove file. No longer used. Suggestion from Eric Blake.
2006-03-26(SUBDIRS): Remove basename.Jim Meyering
2006-01-24(check-root): Add tail-2/append-onlyJim Meyering