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 \
|
|
|
|
|
check.mk \
|
|
|
|
|
envvar-check \
|
2010-05-10 11:29:27 +02:00
|
|
|
init.sh \
|
2007-08-16 16:28:11 +02:00
|
|
|
lang-default \
|
|
|
|
|
other-fs-tmpdir \
|
2007-12-06 14:21:51 +01:00
|
|
|
require-perl \
|
2007-08-16 16:28:11 +02:00
|
|
|
sample-test \
|
2008-05-10 11:38:07 +02:00
|
|
|
test-lib.sh \
|
|
|
|
|
$(pr_data)
|
2002-07-01 09:24:34 +00:00
|
|
|
|
2008-04-18 15:51:18 +02:00
|
|
|
root_tests = \
|
|
|
|
|
chown/basic \
|
|
|
|
|
cp/cp-a-selinux \
|
|
|
|
|
cp/preserve-gid \
|
|
|
|
|
cp/special-bits \
|
2009-04-27 17:20:23 +02:00
|
|
|
cp/cp-mv-enotsup-xattr \
|
2010-04-16 08:39:11 +01:00
|
|
|
cp/capability \
|
2008-11-20 10:28:31 +00:00
|
|
|
dd/skip-seek-past-dev \
|
2009-02-17 13:16:54 +01:00
|
|
|
install/install-C-root \
|
2008-08-01 19:33:45 +02:00
|
|
|
ls/capability \
|
2008-04-18 15:51:18 +02:00
|
|
|
ls/nameless-uid \
|
|
|
|
|
misc/chcon \
|
2009-10-23 08:12:29 -06:00
|
|
|
misc/chroot-credentials \
|
2008-05-05 15:17:42 +02:00
|
|
|
misc/selinux \
|
2008-03-28 22:55:31 +00:00
|
|
|
misc/truncate-owned-by-other \
|
2008-04-18 15:51:18 +02:00
|
|
|
mkdir/writable-under-readonly \
|
|
|
|
|
mv/sticky-to-xpart \
|
|
|
|
|
rm/fail-2eperm \
|
|
|
|
|
rm/no-give-up \
|
|
|
|
|
rm/one-file-system \
|
2009-11-03 14:30:56 +01:00
|
|
|
rm/read-only \
|
2008-04-18 15:51:18 +02:00
|
|
|
tail-2/append-only \
|
|
|
|
|
touch/now-owned-by-other
|
2006-10-24 08:43:58 +02:00
|
|
|
|
2008-04-18 15:51:18 +02:00
|
|
|
.PHONY: check-root
|
|
|
|
|
check-root:
|
2008-05-10 11:57:22 +02:00
|
|
|
$(MAKE) check TESTS='$(root_tests)'
|
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."
|
2008-04-18 15:51:18 +02:00
|
|
|
@echo " See the 'Running tests as root' section in README."
|
2003-12-20 11:32:32 +00:00
|
|
|
@echo '***********************************************************'
|
2008-04-17 23:34:45 +02:00
|
|
|
|
|
|
|
|
EXTRA_DIST += $(TESTS)
|
|
|
|
|
|
|
|
|
|
# Do not choose a name that is a shell keyword like 'if', or a
|
|
|
|
|
# commonly-used utility like 'cat' or 'test', as the name of a test.
|
|
|
|
|
# Otherwise, VPATH builds will fail on hosts like Solaris, since they
|
|
|
|
|
# will expand 'if test ...' to 'if .../test ...', and the '.../test'
|
|
|
|
|
# will execute the test script rather than the standard utility.
|
|
|
|
|
|
2008-04-25 09:36:54 +02:00
|
|
|
# Notes on the ordering of these tests:
|
2008-05-10 11:57:22 +02:00
|
|
|
# Place early in the list tests of the tools that
|
|
|
|
|
# are most commonly used in test scripts themselves.
|
|
|
|
|
# E.g., nearly every test script uses rm and chmod.
|
2008-04-17 23:34:45 +02:00
|
|
|
# help-version comes early because it's a basic sanity test.
|
|
|
|
|
# Put seq early, since lots of other tests use it.
|
2008-04-25 09:36:54 +02:00
|
|
|
# Put tests that sleep early, but not all together, so in parallel builds
|
|
|
|
|
# they share time with tests that burn CPU, not with others that sleep.
|
2008-04-17 23:34:45 +02:00
|
|
|
# Put head-elide-tail early, because it's long-running.
|
|
|
|
|
|
|
|
|
|
TESTS = \
|
|
|
|
|
misc/help-version \
|
2009-10-23 11:01:25 -06:00
|
|
|
tail-2/inotify-race \
|
2008-05-12 14:43:23 +02:00
|
|
|
misc/invalid-opt \
|
2008-09-22 22:42:12 +02:00
|
|
|
rm/ext3-perf \
|
2008-04-17 23:34:45 +02:00
|
|
|
rm/cycle \
|
2008-11-28 21:32:39 +01:00
|
|
|
cp/link-heap \
|
2009-12-28 15:42:10 +01:00
|
|
|
tail-2/inotify-hash-abuse \
|
2009-12-29 13:47:10 +01:00
|
|
|
tail-2/inotify-hash-abuse2 \
|
2009-12-29 16:37:04 +01:00
|
|
|
tail-2/F-vs-rename \
|
2009-11-15 09:25:29 +01:00
|
|
|
tail-2/inotify-rotate \
|
2008-04-25 09:36:54 +02:00
|
|
|
chmod/no-x \
|
|
|
|
|
chgrp/basic \
|
2008-04-17 23:34:45 +02:00
|
|
|
rm/dangling-symlink \
|
2008-04-25 09:36:54 +02:00
|
|
|
misc/ls-time \
|
2008-04-17 23:34:45 +02:00
|
|
|
rm/deep-1 \
|
|
|
|
|
rm/deep-2 \
|
|
|
|
|
rm/dir-no-w \
|
|
|
|
|
rm/dir-nonrecur \
|
|
|
|
|
rm/dot-rel \
|
2008-04-25 09:36:54 +02:00
|
|
|
rm/isatty \
|
2008-04-17 23:34:45 +02:00
|
|
|
rm/empty-inacc \
|
|
|
|
|
rm/empty-name \
|
|
|
|
|
rm/f-1 \
|
|
|
|
|
rm/fail-eacces \
|
|
|
|
|
rm/fail-eperm \
|
2008-04-25 09:36:54 +02:00
|
|
|
tail-2/assert \
|
2008-04-17 23:34:45 +02:00
|
|
|
rm/hash \
|
|
|
|
|
rm/i-1 \
|
|
|
|
|
rm/i-never \
|
|
|
|
|
rm/i-no-r \
|
2008-04-25 09:36:54 +02:00
|
|
|
tail-2/infloop-1 \
|
2008-04-17 23:34:45 +02:00
|
|
|
rm/ignorable \
|
|
|
|
|
rm/inaccessible \
|
|
|
|
|
rm/interactive-always \
|
|
|
|
|
rm/interactive-once \
|
|
|
|
|
rm/ir-1 \
|
2009-12-18 12:26:04 +00:00
|
|
|
rm/one-file-system2 \
|
2008-04-17 23:34:45 +02:00
|
|
|
rm/r-1 \
|
|
|
|
|
rm/r-2 \
|
|
|
|
|
rm/r-3 \
|
|
|
|
|
rm/r-4 \
|
|
|
|
|
rm/readdir-bug \
|
|
|
|
|
rm/rm1 \
|
2008-04-25 09:36:54 +02:00
|
|
|
touch/empty-file \
|
2008-04-17 23:34:45 +02:00
|
|
|
rm/rm2 \
|
|
|
|
|
rm/rm3 \
|
|
|
|
|
rm/rm4 \
|
|
|
|
|
rm/rm5 \
|
|
|
|
|
rm/sunos-1 \
|
|
|
|
|
rm/unread2 \
|
|
|
|
|
rm/unread3 \
|
|
|
|
|
rm/unreadable \
|
|
|
|
|
rm/v-slash \
|
|
|
|
|
chgrp/default-no-deref \
|
|
|
|
|
chgrp/deref \
|
|
|
|
|
chgrp/no-x \
|
|
|
|
|
chgrp/posix-H \
|
|
|
|
|
chgrp/recurse \
|
2009-10-23 11:01:25 -06:00
|
|
|
misc/env \
|
2008-07-15 08:30:38 +02:00
|
|
|
misc/ptx \
|
2008-05-08 01:23:32 +02:00
|
|
|
misc/test \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/seq \
|
2008-11-28 21:32:39 +01:00
|
|
|
misc/seq-long-double \
|
2008-05-04 11:38:31 +02:00
|
|
|
misc/head \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/head-elide-tail \
|
2008-04-25 09:36:54 +02:00
|
|
|
tail-2/tail-n0f \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/ls-misc \
|
|
|
|
|
misc/date \
|
2009-05-03 06:21:48 +02:00
|
|
|
misc/date-next-dow \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/ptx-overrun \
|
|
|
|
|
misc/xstrtol \
|
2009-06-02 08:28:23 +02:00
|
|
|
tail-2/pid \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/od \
|
|
|
|
|
misc/mktemp \
|
|
|
|
|
misc/arch \
|
|
|
|
|
misc/pr \
|
2008-05-10 12:11:52 +02:00
|
|
|
misc/join \
|
2008-05-10 11:38:07 +02:00
|
|
|
pr/pr-tests \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/df-P \
|
2009-03-23 14:48:19 -06:00
|
|
|
misc/pwd-option \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/pwd-unreadable-parent \
|
|
|
|
|
misc/chcon-fail \
|
|
|
|
|
misc/cut \
|
2008-04-26 23:40:03 +02:00
|
|
|
misc/wc \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/wc-files0-from \
|
|
|
|
|
misc/wc-files0 \
|
2009-12-22 07:36:12 +00:00
|
|
|
misc/wc-parallel \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/cat-proc \
|
2009-03-11 11:39:33 +00:00
|
|
|
misc/cat-buf \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/base64 \
|
|
|
|
|
misc/basename \
|
|
|
|
|
misc/close-stdout \
|
2009-10-23 11:01:25 -06:00
|
|
|
misc/chroot-fail \
|
2008-04-20 21:24:16 -04:00
|
|
|
misc/comm \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/csplit \
|
|
|
|
|
misc/date-sec \
|
|
|
|
|
misc/dircolors \
|
|
|
|
|
misc/df \
|
|
|
|
|
misc/dirname \
|
2009-10-27 06:36:40 -06:00
|
|
|
misc/env-null \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/expand \
|
|
|
|
|
misc/expr \
|
|
|
|
|
misc/factor \
|
|
|
|
|
misc/false-status \
|
|
|
|
|
misc/fmt \
|
|
|
|
|
misc/fmt-long-line \
|
|
|
|
|
misc/fold \
|
|
|
|
|
misc/groups-dash \
|
|
|
|
|
misc/groups-version \
|
|
|
|
|
misc/head-c \
|
|
|
|
|
misc/head-pos \
|
2008-04-23 12:38:54 +02:00
|
|
|
misc/id-context \
|
2009-04-08 10:43:15 +01:00
|
|
|
misc/id-groups \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/md5sum \
|
|
|
|
|
misc/md5sum-newline \
|
2009-10-20 19:19:58 +01:00
|
|
|
misc/md5sum-parallel \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/mknod \
|
|
|
|
|
misc/nice \
|
2009-10-23 11:01:25 -06:00
|
|
|
misc/nice-fail \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/nl \
|
|
|
|
|
misc/nohup \
|
2009-10-31 18:59:50 +01:00
|
|
|
misc/nproc-avail \
|
|
|
|
|
misc/nproc-positive \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/od-N \
|
2008-06-11 09:14:26 -06:00
|
|
|
misc/od-multiple-t \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/od-x8 \
|
|
|
|
|
misc/paste \
|
|
|
|
|
misc/pathchk1 \
|
2009-10-26 22:21:22 -06:00
|
|
|
misc/printenv \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/printf \
|
2008-05-12 00:27:37 +02:00
|
|
|
misc/printf-cov \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/printf-hex \
|
|
|
|
|
misc/printf-surprise \
|
|
|
|
|
misc/pwd-long \
|
|
|
|
|
misc/readlink-fp-loop \
|
|
|
|
|
misc/runcon-no-reorder \
|
|
|
|
|
misc/sha1sum \
|
|
|
|
|
misc/sha1sum-vec \
|
|
|
|
|
misc/sha224sum \
|
|
|
|
|
misc/sha256sum \
|
|
|
|
|
misc/sha384sum \
|
|
|
|
|
misc/sha512sum \
|
|
|
|
|
misc/shred-exact \
|
2009-01-26 02:19:13 +00:00
|
|
|
misc/shred-passes \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/shred-remove \
|
|
|
|
|
misc/shuf \
|
2008-05-09 08:04:59 +02:00
|
|
|
misc/sort \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/sort-compress \
|
sort: handle fd exhaustion better when merging
This is an alternative to my 9 March patch labeled "Silently lower
nmerge; don't (sometimes incorrectly) range-check"
<http://lists.gnu.org/archive/html/bug-coreutils/2009-03/msg00070.html>.
It differs by not using 'dup' to probe for extra file descriptors;
instead, it simply calls 'open' (and 'pipe') to open files and pipes,
until one of these calls fails due to file descriptor exhaustion; it
then backs off by 1, does a merge with the files that it has opened,
and then retries with the (now-smaller) number of files.
This patch requires quite a few more changes to the source code than
the earlier patch, but it is in some sense "better" because it doesn't
need to call "dup" ahead of time in order to decide whether "open" or
"pipe" will fail. Also, it's more robust in the case where "open" or
"pipe" fails with errno==EMFILE because some system-wide limit is
exhausted.
* src/sort.c (create_temp_file): New arg SURVIVE_FD_EXHAUSTION.
(stream_open): New function, containing guts of xfopen.
(xfopen): Use it.
(pipe_fork): Set errno on failure.
(maybe_create_temp): New function, containing guts of create_temp.
(create_temp): Use it.
(open_temp): Distinguish failures due to file descriptor exhaustion
from other failures, and on fd exhaustion return a notice to caller
rather than dying. Don't test execlp's return value; when it returns,
it *always* returns -1.
(open_input_files): New function.
(mergefps): New arg FPS. It's now the caller's responsibility to open
the input and output files. All callers changed.
(mergefiles): New function.
(avoid_trashing_input, merge): Handle the case where a single merge
can't merge as much as we wanted due to file descriptor exhaustion, by
merging as much as we can and then retrying.
* tests/Makefile.am (TESTS): Add misc/sort-continue.
* tests/misc/sort-continue: New file.
* THANKS: Add Glen Lenker and Matt Pham who coauthored this patch.
2009-03-13 15:48:30 -07:00
|
|
|
misc/sort-continue \
|
2010-02-23 08:43:04 +00:00
|
|
|
misc/sort-debug-keys \
|
2010-05-11 18:46:21 +01:00
|
|
|
misc/sort-debug-warn \
|
2008-04-03 18:42:57 -04:00
|
|
|
misc/sort-files0-from \
|
2010-04-28 23:54:33 +01:00
|
|
|
misc/sort-float \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/sort-merge \
|
2009-03-09 14:56:13 -07:00
|
|
|
misc/sort-merge-fdlimit \
|
2010-02-26 15:33:16 +00:00
|
|
|
misc/sort-month \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/sort-rand \
|
2008-08-14 06:24:59 -07:00
|
|
|
misc/sort-version \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/split-a \
|
|
|
|
|
misc/split-fail \
|
|
|
|
|
misc/split-l \
|
|
|
|
|
misc/stat-fmt \
|
2009-09-15 23:07:18 +02:00
|
|
|
misc/stat-hyphen \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/stat-printf \
|
2009-10-08 08:53:56 -06:00
|
|
|
misc/stat-slash \
|
2008-12-17 11:30:03 +00:00
|
|
|
misc/stdbuf \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/stty \
|
|
|
|
|
misc/stty-invalid \
|
|
|
|
|
misc/stty-row-col \
|
2009-10-23 11:01:25 -06:00
|
|
|
misc/su-fail \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/sum \
|
|
|
|
|
misc/sum-sysv \
|
2008-05-05 00:07:08 +02:00
|
|
|
misc/tac \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/tac-continue \
|
2008-05-10 10:11:45 +02:00
|
|
|
misc/tail \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/tee \
|
|
|
|
|
misc/tee-dash \
|
|
|
|
|
misc/test-diag \
|
2008-03-28 11:05:55 +00:00
|
|
|
misc/timeout \
|
|
|
|
|
misc/timeout-parameters \
|
2008-05-06 10:12:42 +02:00
|
|
|
misc/tr \
|
2008-03-28 22:55:31 +00:00
|
|
|
misc/truncate-dangling-symlink \
|
|
|
|
|
misc/truncate-dir-fail \
|
|
|
|
|
misc/truncate-fail-diag \
|
|
|
|
|
misc/truncate-fifo \
|
|
|
|
|
misc/truncate-no-create-missing \
|
|
|
|
|
misc/truncate-overflow \
|
|
|
|
|
misc/truncate-parameters \
|
|
|
|
|
misc/truncate-relative \
|
2008-04-17 23:34:45 +02:00
|
|
|
misc/tsort \
|
|
|
|
|
misc/tty-eof \
|
|
|
|
|
misc/unexpand \
|
2008-04-26 09:28:48 +02:00
|
|
|
misc/uniq \
|
2009-01-23 12:17:53 +01:00
|
|
|
misc/xattr \
|
2009-06-02 08:28:23 +02:00
|
|
|
tail-2/wait \
|
2008-04-17 23:34:45 +02:00
|
|
|
chmod/c-option \
|
|
|
|
|
chmod/equal-x \
|
|
|
|
|
chmod/equals \
|
|
|
|
|
chmod/inaccessible \
|
|
|
|
|
chmod/octal \
|
|
|
|
|
chmod/setgid \
|
2008-11-29 10:47:12 +01:00
|
|
|
chmod/silent \
|
2008-04-17 23:34:45 +02:00
|
|
|
chmod/thru-dangling \
|
|
|
|
|
chmod/umask-x \
|
|
|
|
|
chmod/usage \
|
|
|
|
|
chown/deref \
|
|
|
|
|
chown/preserve-root \
|
|
|
|
|
chown/separator \
|
|
|
|
|
cp/abuse \
|
|
|
|
|
cp/acl \
|
|
|
|
|
cp/backup-1 \
|
|
|
|
|
cp/backup-dir \
|
|
|
|
|
cp/backup-is-src \
|
|
|
|
|
cp/cp-HL \
|
|
|
|
|
cp/cp-deref \
|
|
|
|
|
cp/cp-i \
|
|
|
|
|
cp/cp-mv-backup \
|
|
|
|
|
cp/cp-parents \
|
|
|
|
|
cp/deref-slink \
|
|
|
|
|
cp/dir-rm-dest \
|
|
|
|
|
cp/dir-slash \
|
|
|
|
|
cp/dir-vs-file \
|
|
|
|
|
cp/existing-perm-race \
|
|
|
|
|
cp/fail-perm \
|
|
|
|
|
cp/file-perm-race \
|
|
|
|
|
cp/into-self \
|
|
|
|
|
cp/link \
|
|
|
|
|
cp/link-no-deref \
|
|
|
|
|
cp/link-preserve \
|
|
|
|
|
cp/no-deref-link1 \
|
|
|
|
|
cp/no-deref-link2 \
|
|
|
|
|
cp/no-deref-link3 \
|
|
|
|
|
cp/parent-perm \
|
|
|
|
|
cp/parent-perm-race \
|
|
|
|
|
cp/perm \
|
|
|
|
|
cp/preserve-2 \
|
2009-07-27 17:08:02 +02:00
|
|
|
cp/preserve-slink-time \
|
2009-04-17 18:44:18 +02:00
|
|
|
cp/proc-short-read \
|
2008-04-17 23:34:45 +02:00
|
|
|
cp/proc-zero-len \
|
|
|
|
|
cp/r-vs-symlink \
|
2009-08-26 00:32:43 +01:00
|
|
|
cp/reflink-auto \
|
2009-08-29 00:45:15 +01:00
|
|
|
cp/reflink-perm \
|
2008-04-17 23:34:45 +02:00
|
|
|
cp/same-file \
|
|
|
|
|
cp/slink-2-slink \
|
|
|
|
|
cp/sparse \
|
|
|
|
|
cp/special-f \
|
|
|
|
|
cp/src-base-dot \
|
|
|
|
|
cp/symlink-slash \
|
|
|
|
|
cp/thru-dangling \
|
2009-09-03 19:36:34 +02:00
|
|
|
df/unreadable \
|
2009-08-04 19:54:58 +02:00
|
|
|
dd/direct \
|
2008-04-17 23:34:45 +02:00
|
|
|
dd/misc \
|
|
|
|
|
dd/not-rewound \
|
2008-11-21 23:12:17 +01:00
|
|
|
dd/reblock \
|
2008-04-17 23:34:45 +02:00
|
|
|
dd/skip-seek \
|
|
|
|
|
dd/skip-seek2 \
|
2008-11-20 10:28:31 +00:00
|
|
|
dd/skip-seek-past-file \
|
2009-08-28 10:59:16 -06:00
|
|
|
dd/stderr \
|
2009-09-09 16:48:02 +02:00
|
|
|
dd/unblock \
|
2008-04-17 23:34:45 +02:00
|
|
|
dd/unblock-sync \
|
2008-10-12 10:40:22 +02:00
|
|
|
df/total-verify \
|
2008-04-17 23:34:45 +02:00
|
|
|
du/2g \
|
|
|
|
|
du/8gb \
|
|
|
|
|
du/basic \
|
|
|
|
|
du/deref \
|
|
|
|
|
du/deref-args \
|
|
|
|
|
du/exclude \
|
|
|
|
|
du/fd-leak \
|
|
|
|
|
du/files0-from \
|
|
|
|
|
du/hard-link \
|
|
|
|
|
du/inacc-dest \
|
|
|
|
|
du/inacc-dir \
|
|
|
|
|
du/inaccessible-cwd \
|
|
|
|
|
du/long-from-unreadable \
|
|
|
|
|
du/long-sloop \
|
|
|
|
|
du/no-deref \
|
|
|
|
|
du/no-x \
|
|
|
|
|
du/one-file-system \
|
|
|
|
|
du/restore-wd \
|
|
|
|
|
du/slash \
|
|
|
|
|
du/slink \
|
|
|
|
|
du/trailing-slash \
|
|
|
|
|
du/two-args \
|
2009-09-11 16:30:27 +02:00
|
|
|
id/no-context \
|
2008-04-17 23:34:45 +02:00
|
|
|
install/basic-1 \
|
|
|
|
|
install/create-leading \
|
|
|
|
|
install/d-slashdot \
|
2009-02-17 13:16:54 +01:00
|
|
|
install/install-C \
|
|
|
|
|
install/install-C-selinux \
|
2008-09-05 13:12:06 +02:00
|
|
|
install/strip-program \
|
2008-04-17 23:34:45 +02:00
|
|
|
install/trap \
|
|
|
|
|
ln/backup-1 \
|
|
|
|
|
ln/hard-backup \
|
2009-09-24 11:57:11 -06:00
|
|
|
ln/hard-to-sym \
|
2008-04-17 23:34:45 +02:00
|
|
|
ln/misc \
|
|
|
|
|
ln/sf-1 \
|
2009-09-10 17:51:44 +02:00
|
|
|
ln/slash-decorated-nonexistent-dest \
|
2008-04-17 23:34:45 +02:00
|
|
|
ln/target-1 \
|
2009-03-24 14:29:21 +00:00
|
|
|
ls/abmon-align \
|
2008-12-31 19:17:31 +01:00
|
|
|
ls/color-clear-to-eol \
|
2008-04-17 23:34:45 +02:00
|
|
|
ls/color-dtype-dir \
|
2010-02-16 22:48:00 +00:00
|
|
|
ls/color-norm \
|
2008-04-17 23:34:45 +02:00
|
|
|
ls/dangle \
|
|
|
|
|
ls/dired \
|
|
|
|
|
ls/file-type \
|
|
|
|
|
ls/follow-slink \
|
|
|
|
|
ls/infloop \
|
|
|
|
|
ls/inode \
|
|
|
|
|
ls/m-option \
|
2009-06-10 19:44:43 +02:00
|
|
|
ls/multihardlink \
|
2008-04-17 23:34:45 +02:00
|
|
|
ls/no-arg \
|
2008-10-21 13:09:13 +02:00
|
|
|
ls/no-cap \
|
2008-04-17 23:34:45 +02:00
|
|
|
ls/proc-selinux-segfault \
|
ls -i: print consistent inode numbers also for mount points
On most unix- and linux-based kernels, ls -i DIR_CONTAINING_MOUNT_POINT
would print the wrong inode number for any entry that is a mount point.
It would do that by relying on readdir's dirent.d_ino values, while
most readdir implementations return the inode number of the underlying,
inaccessible directory. Thus, it is not consistent with what you'd
get when applying stat to the same entry. This bug led to surprising
results like "ls -i" and "ls -i --color" printing different numbers (ls
must usually "stat" a file to colorize its name). This change makes it
so that on offending systems, ls must stat non-command-line-arguments
for which otherwise it would be able to use "for free" dirent.d_ino
values. Regardless of this change, ls is already required to stat every
command-line argument. Note: versions of GNU ls prior to coreutils-6.0
did not perform the invalid optimization, and hence always printed
correct inode numbers. Thus, for the sake of correctness, ls -i is
forgoing the readdir optimization, for any kernel (including linux!)
with POSIX-nonconforming readdir. Note that currently, only Cygwin has
been agile enough to conform.
* src/ls.c (RELIABLE_D_INO): Define.
(print_dir): Use it.
For plenty of discussion, see this long thread:
http://thread.gmane.org/gmane.comp.gnu.coreutils.bugs/14020
This bug was introduced by the 2006-02-26 commit, 33eb3efe:
"In ls, avoid calling stat for --inode (-i), when possible."
* tests/ls/readdir-mountpoint-inode: New test.
* tests/Makefile.am (TESTS): Add it.
* tests/ls/stat-vs-dirent: Don't suppress failure of this test,
now that ls -i is fixed. Though note that it doesn't test well,
since it compares only the always-stat'd command-line arguments.
* NEWS (Bug fixes): Mention it.
2008-07-02 18:01:43 +02:00
|
|
|
ls/readdir-mountpoint-inode \
|
2008-04-17 23:34:45 +02:00
|
|
|
ls/recursive \
|
|
|
|
|
ls/rt-1 \
|
|
|
|
|
ls/stat-dtype \
|
|
|
|
|
ls/stat-failed \
|
|
|
|
|
ls/stat-free-symlinks \
|
|
|
|
|
ls/stat-vs-dirent \
|
|
|
|
|
ls/symlink-slash \
|
|
|
|
|
ls/x-option \
|
|
|
|
|
mkdir/p-1 \
|
|
|
|
|
mkdir/p-2 \
|
|
|
|
|
mkdir/p-3 \
|
|
|
|
|
mkdir/p-slashdot \
|
|
|
|
|
mkdir/p-thru-slink \
|
|
|
|
|
mkdir/p-v \
|
|
|
|
|
mkdir/parents \
|
|
|
|
|
mkdir/perm \
|
|
|
|
|
mkdir/selinux \
|
|
|
|
|
mkdir/special-1 \
|
|
|
|
|
mkdir/t-slash \
|
|
|
|
|
mv/acl \
|
|
|
|
|
mv/atomic \
|
|
|
|
|
mv/atomic2 \
|
|
|
|
|
mv/backup-dir \
|
|
|
|
|
mv/backup-is-src \
|
|
|
|
|
mv/childproof \
|
|
|
|
|
mv/diag \
|
|
|
|
|
mv/dir-file \
|
|
|
|
|
mv/dir2dir \
|
|
|
|
|
mv/dup-source \
|
|
|
|
|
mv/force \
|
|
|
|
|
mv/hard-2 \
|
|
|
|
|
mv/hard-3 \
|
|
|
|
|
mv/hard-4 \
|
|
|
|
|
mv/hard-link-1 \
|
|
|
|
|
mv/hard-verbose \
|
|
|
|
|
mv/i-1 \
|
|
|
|
|
mv/i-2 \
|
|
|
|
|
mv/i-3 \
|
|
|
|
|
mv/i-4 \
|
|
|
|
|
mv/i-5 \
|
|
|
|
|
mv/i-link-no \
|
|
|
|
|
mv/into-self \
|
|
|
|
|
mv/into-self-2 \
|
|
|
|
|
mv/into-self-3 \
|
|
|
|
|
mv/into-self-4 \
|
|
|
|
|
mv/leak-fd \
|
2009-01-13 18:35:00 +01:00
|
|
|
mv/mv-n \
|
2008-04-17 23:34:45 +02:00
|
|
|
mv/mv-special-1 \
|
|
|
|
|
mv/no-target-dir \
|
|
|
|
|
mv/part-fail \
|
|
|
|
|
mv/part-hardlink \
|
|
|
|
|
mv/part-rename \
|
|
|
|
|
mv/part-symlink \
|
|
|
|
|
mv/partition-perm \
|
|
|
|
|
mv/perm-1 \
|
|
|
|
|
mv/to-symlink \
|
|
|
|
|
mv/trailing-slash \
|
|
|
|
|
mv/update \
|
|
|
|
|
readlink/can-e \
|
|
|
|
|
readlink/can-f \
|
|
|
|
|
readlink/can-m \
|
|
|
|
|
readlink/rl-1 \
|
|
|
|
|
rmdir/fail-perm \
|
|
|
|
|
rmdir/ignore \
|
|
|
|
|
rmdir/t-slash \
|
|
|
|
|
tail-2/assert-2 \
|
|
|
|
|
tail-2/big-4gb \
|
2009-09-06 09:39:31 +02:00
|
|
|
tail-2/flush-initial \
|
2009-09-07 08:37:08 +02:00
|
|
|
tail-2/follow-stdin \
|
2009-09-07 22:10:10 +02:00
|
|
|
tail-2/pipe-f \
|
|
|
|
|
tail-2/pipe-f2 \
|
2008-04-17 23:34:45 +02:00
|
|
|
tail-2/proc-ksyms \
|
|
|
|
|
tail-2/start-middle \
|
2009-09-12 14:00:32 +02:00
|
|
|
touch/60-seconds \
|
2008-04-17 23:34:45 +02:00
|
|
|
touch/dangling-symlink \
|
|
|
|
|
touch/dir-1 \
|
|
|
|
|
touch/fail-diag \
|
|
|
|
|
touch/fifo \
|
|
|
|
|
touch/no-create-missing \
|
2009-10-17 07:55:05 -06:00
|
|
|
touch/no-dereference \
|
2008-04-17 23:34:45 +02:00
|
|
|
touch/no-rights \
|
|
|
|
|
touch/not-owner \
|
|
|
|
|
touch/obsolescent \
|
|
|
|
|
touch/read-only \
|
2008-04-24 12:58:24 +02:00
|
|
|
touch/relative \
|
2009-10-21 06:23:28 -06:00
|
|
|
touch/trailing-slash \
|
2008-04-24 12:58:24 +02:00
|
|
|
$(root_tests)
|
2008-04-17 23:34:45 +02:00
|
|
|
|
2008-05-10 11:38:07 +02:00
|
|
|
pr_data = \
|
|
|
|
|
pr/0F \
|
|
|
|
|
pr/0FF \
|
|
|
|
|
pr/0FFnt \
|
|
|
|
|
pr/0FFt \
|
|
|
|
|
pr/0FnFnt \
|
|
|
|
|
pr/0FnFt \
|
|
|
|
|
pr/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