summaryrefslogtreecommitdiff
path: root/tests/Makefile.am
AgeCommit message (Collapse)Author
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
2006-01-13(SUBDIRS): Add comments discouraging theJim Meyering
addition of new directories under tests/.
2005-11-24(EXTRA_DIST): Add acl to the list.Jim Meyering
2005-11-04(EXTRA_DIST): Add very-expensive.Jim Meyering
2005-08-13(SUBDIRS): Remove date.Jim Meyering
2005-06-22(EXTRA_DIST): Add umask-check.Paul Eggert
2005-04-20(EXTRA_DIST): Add Coreutils.pm and remove Fetish.pm.Paul Eggert
2005-04-05(SUBDIRS): Add tee.Jim Meyering
2005-01-30(.PHONY): Add check-root and root-hint.Jim Meyering
2005-01-04(check-root): Update.Jim Meyering
2004-07-06(SUBDIRS): Add readlink.Jim Meyering
2004-05-13 Don't assume that "make -C" works; Solaris "make" doesn't have -C.Jim Meyering
* src/Makefile.am (all_programs.list): New rule, copied from man/Makefile.am and tests/Makefile.am, except that we use the system tr rather than ./tr and we don't use tr -s. * tests/Makefile.am (all_programs): Use it.
2004-01-08(TESTS_ENVIRONMENT): Remove `/vg' (prerelease testJim Meyering
remnant) from PATH component. That would cause tests in this directory not to run the just-built binaries, but rather whatever happened to be in one's PATH. Reported by Christian Krackowizer.
2003-12-20(root-hint): Tweak wording.Jim Meyering
2003-11-20(TESTS_ENVIRONMENT): Add $PACKAGE_BUGREPORT.Jim Meyering
2003-09-10(programs): Use ../src/tr -s ' ' '\n' in placeJim Meyering
of `fmt -1'. Using the just-built tr is a little cleaner. Christian Krackowizer reported that HPUX 10.20 doesn't have fmt.
2003-08-15(ASSORT): New var.Jim Meyering
(all_programs): Use it.
2003-08-01(TESTS_ENVIRONMENT): Set PATH so thatJim Meyering
the tests in help-version will use the just-built binaries.
2003-07-29(all_programs): Makefile is in ../src, not $(srcdir)/../src.Jim Meyering
2003-07-16(all_programs): Define.Jim Meyering
(TESTS_ENVIRONMENT): Use it.
2003-03-08(evar-check): Check for POSIXLY_CORRECT not as aJim Meyering
shell variable, but only in the environment. With /bin/sh->bash, the shell variable is set to `y', and that would cause a spurious warning.
2003-03-08(check-root): Remove touch/fifo.Jim Meyering
It doesn't appear to have to be run as root.
2003-03-04(check-root): Add fail-2eperm.Jim Meyering
2003-02-20Rename phony target envvar-check to evar-checkJim Meyering
so as not to conflict with the distributed file by the same name.
2002-07-02(EXTRA_DIST): Merge.Jim Meyering
2002-07-01whoops.Jim Meyering
2002-07-01mergeJim Meyering