2002-07-01 09:24:34 +00:00
|
|
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-.
|
|
|
|
|
|
2003-08-15 06:53:38 +00:00
|
|
|
# Sort in traditional ASCII order, regardless of the current locale;
|
|
|
|
|
# otherwise we may get into trouble with distinct strings that the
|
|
|
|
|
# current locale considers to be equal.
|
|
|
|
|
ASSORT = LC_ALL=C sort
|
|
|
|
|
|
2007-08-16 16:28:11 +02:00
|
|
|
EXTRA_DIST = \
|
|
|
|
|
Coreutils.pm \
|
|
|
|
|
CuTmpdir.pm \
|
|
|
|
|
Makefile.am.in \
|
|
|
|
|
README \
|
|
|
|
|
check.mk \
|
|
|
|
|
envvar-check \
|
|
|
|
|
expensive \
|
|
|
|
|
group-names \
|
|
|
|
|
input-tty \
|
|
|
|
|
lang-default \
|
|
|
|
|
mk-script \
|
|
|
|
|
other-fs-tmpdir \
|
2007-12-06 14:21:51 +01:00
|
|
|
require-perl \
|
2007-08-16 16:28:11 +02:00
|
|
|
rwx-to-mode \
|
|
|
|
|
sample-test \
|
|
|
|
|
setgid-check \
|
|
|
|
|
sparse-file \
|
|
|
|
|
test-lib.sh \
|
2007-11-30 23:22:21 +01:00
|
|
|
umask-check
|
2002-07-01 09:24:34 +00:00
|
|
|
|
2007-10-21 12:44:32 +02:00
|
|
|
# Regarding ordering in SUBDIRS, place early in the list the tools that
|
|
|
|
|
# are most commonly used in test scripts. Every test script uses rm
|
|
|
|
|
# and chmod, so they have to be very early.
|
|
|
|
|
# Ordering within misc/ should handle the rest.
|
|
|
|
|
|
2006-01-13 13:55:49 +00:00
|
|
|
## N O T E :: Please do not add new tests/ directories.
|
2006-10-24 08:43:58 +02:00
|
|
|
## There are too many already. Put new tests in misc/.
|
2002-07-01 09:24:34 +00:00
|
|
|
SUBDIRS = \
|
2007-10-21 12:44:32 +02:00
|
|
|
rm \
|
|
|
|
|
chmod \
|
|
|
|
|
misc \
|
|
|
|
|
chgrp chown cp cut dd du head \
|
|
|
|
|
install join ln ls mkdir mv pr readlink rmdir \
|
2007-09-11 23:30:49 +02:00
|
|
|
sort tac tail tail-2 test touch tr \
|
2007-09-10 21:29:46 +02:00
|
|
|
uniq wc
|
2006-01-13 13:55:49 +00:00
|
|
|
## N O T E :: Please do not add new directories.
|
2002-07-01 09:24:34 +00:00
|
|
|
|
2008-01-06 12:38:18 +01:00
|
|
|
all_t = t1 t2 t3 t4 t5 t6 t7 t8 t9 ta tb tc td
|
2006-10-25 00:01:33 +02:00
|
|
|
.PHONY: check-root $(all_t)
|
|
|
|
|
check-root: $(all_t)
|
2006-10-24 08:43:58 +02:00
|
|
|
|
|
|
|
|
t1:
|
2002-07-01 09:24:34 +00:00
|
|
|
cd chown && $(MAKE) check TESTS=basic
|
2006-10-24 08:43:58 +02:00
|
|
|
t2:
|
2002-07-01 09:24:34 +00:00
|
|
|
cd cp && $(MAKE) check TESTS=special-bits
|
2006-10-24 08:43:58 +02:00
|
|
|
t3:
|
2005-01-04 09:41:14 +00:00
|
|
|
cd rm && $(MAKE) check TESTS=no-give-up
|
2006-10-24 08:43:58 +02:00
|
|
|
t4:
|
2003-03-04 19:50:23 +00:00
|
|
|
cd rm && $(MAKE) check TESTS=fail-2eperm
|
2006-10-24 08:43:58 +02:00
|
|
|
t5:
|
2006-01-24 22:54:49 +00:00
|
|
|
cd tail-2 && $(MAKE) check TESTS=append-only
|
2006-10-25 00:01:33 +02:00
|
|
|
t6:
|
|
|
|
|
cd rm && $(MAKE) check TESTS=one-file-system
|
2006-11-21 00:37:03 +01:00
|
|
|
t7:
|
|
|
|
|
cd ls && $(MAKE) check TESTS=nameless-uid
|
ls: Add support for SELinux and a slightly modified -Z option.
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-05 18:23:54 +01:00
|
|
|
t8:
|
|
|
|
|
cd misc && $(MAKE) check TESTS=chcon
|
2007-02-12 19:35:25 +01:00
|
|
|
t9:
|
|
|
|
|
cd cp && $(MAKE) check TESTS=cp-a-selinux
|
2007-09-13 12:13:35 +02:00
|
|
|
ta:
|
|
|
|
|
cd mkdir && $(MAKE) check TESTS=writable-under-readonly
|
2007-10-05 10:55:26 +02:00
|
|
|
tb:
|
|
|
|
|
cd mv && $(MAKE) check TESTS=sticky-to-xpart
|
2007-11-23 13:51:10 +01:00
|
|
|
tc:
|
|
|
|
|
cd cp && $(MAKE) check TESTS=preserve-gid
|
2008-01-06 12:38:18 +01:00
|
|
|
td:
|
|
|
|
|
cd touch && $(MAKE) check TESTS=now-owned-by-other
|
2002-07-01 09:24:34 +00:00
|
|
|
|
2006-07-03 08:37:50 +00:00
|
|
|
check-recursive: root-hint
|
2002-07-01 09:24:34 +00:00
|
|
|
|
|
|
|
|
# Advertise `check-root' target.
|
2005-01-30 14:28:36 +00:00
|
|
|
.PHONY: root-hint
|
2002-07-01 09:24:34 +00:00
|
|
|
root-hint:
|
2003-12-20 11:32:32 +00:00
|
|
|
@echo '***********************************************************'
|
|
|
|
|
@echo "NOTICE: Some tests may be run only as root."
|
|
|
|
|
@echo " Do \`make check-root' as \`root' to run these tests."
|
|
|
|
|
@echo '***********************************************************'
|