ls --color: do not colorize files with multiple hard links by default
[platform/upstream/coreutils.git] / tests / Makefile.am
1 ## Process this file with automake to produce Makefile.in -*-Makefile-*-.
2
3 # Sort in traditional ASCII order, regardless of the current locale;
4 # otherwise we may get into trouble with distinct strings that the
5 # current locale considers to be equal.
6 ASSORT = LC_ALL=C sort
7
8 EXTRA_DIST =            \
9   Coreutils.pm          \
10   CuTmpdir.pm           \
11   README                \
12   check.mk              \
13   envvar-check          \
14   lang-default          \
15   other-fs-tmpdir       \
16   require-perl          \
17   sample-test           \
18   test-lib.sh           \
19   $(pr_data)
20
21 root_tests =                                    \
22   chown/basic                                   \
23   cp/cp-a-selinux                               \
24   cp/preserve-gid                               \
25   cp/special-bits                               \
26   cp/cp-mv-enotsup-xattr                        \
27   chroot/credentials                            \
28   dd/skip-seek-past-dev                         \
29   install/install-C-root                        \
30   ls/capability                                 \
31   ls/nameless-uid                               \
32   misc/chcon                                    \
33   misc/selinux                                  \
34   misc/truncate-owned-by-other                  \
35   mkdir/writable-under-readonly                 \
36   mv/sticky-to-xpart                            \
37   rm/fail-2eperm                                \
38   rm/no-give-up                                 \
39   rm/one-file-system                            \
40   tail-2/append-only                            \
41   touch/now-owned-by-other
42
43 .PHONY: check-root
44 check-root:
45         $(MAKE) check TESTS='$(root_tests)'
46
47 check-recursive: root-hint
48
49 # Advertise `check-root' target.
50 .PHONY: root-hint
51 root-hint:
52         @echo '***********************************************************'
53         @echo "NOTICE: Some tests may be run only as root."
54         @echo "  See the 'Running tests as root' section in README."
55         @echo '***********************************************************'
56
57 EXTRA_DIST += $(TESTS)
58
59 # Do not choose a name that is a shell keyword like 'if', or a
60 # commonly-used utility like 'cat' or 'test', as the name of a test.
61 # Otherwise, VPATH builds will fail on hosts like Solaris, since they
62 # will expand 'if test ...' to 'if .../test ...', and the '.../test'
63 # will execute the test script rather than the standard utility.
64
65 # Notes on the ordering of these tests:
66 # Place early in the list tests of the tools that
67 # are most commonly used in test scripts themselves.
68 # E.g., nearly every test script uses rm and chmod.
69 # help-version comes early because it's a basic sanity test.
70 # Put seq early, since lots of other tests use it.
71 # Put tests that sleep early, but not all together, so in parallel builds
72 # they share time with tests that burn CPU, not with others that sleep.
73 # Put head-elide-tail early, because it's long-running.
74
75 TESTS =                                         \
76   misc/help-version                             \
77   misc/invalid-opt                              \
78   rm/ext3-perf                                  \
79   rm/cycle                                      \
80   cp/link-heap                                  \
81   chmod/no-x                                    \
82   chgrp/basic                                   \
83   rm/dangling-symlink                           \
84   misc/ls-time                                  \
85   rm/deep-1                                     \
86   rm/deep-2                                     \
87   rm/dir-no-w                                   \
88   rm/dir-nonrecur                               \
89   rm/dot-rel                                    \
90   rm/isatty                                     \
91   rm/empty-inacc                                \
92   rm/empty-name                                 \
93   rm/f-1                                        \
94   rm/fail-eacces                                \
95   rm/fail-eperm                                 \
96   tail-2/assert                                 \
97   rm/hash                                       \
98   rm/i-1                                        \
99   rm/i-never                                    \
100   rm/i-no-r                                     \
101   tail-2/infloop-1                              \
102   rm/ignorable                                  \
103   rm/inaccessible                               \
104   rm/interactive-always                         \
105   rm/interactive-once                           \
106   rm/ir-1                                       \
107   rm/r-1                                        \
108   rm/r-2                                        \
109   rm/r-3                                        \
110   rm/r-4                                        \
111   rm/readdir-bug                                \
112   rm/rm1                                        \
113   touch/empty-file                              \
114   rm/rm2                                        \
115   rm/rm3                                        \
116   rm/rm4                                        \
117   rm/rm5                                        \
118   rm/sunos-1                                    \
119   rm/unread2                                    \
120   rm/unread3                                    \
121   rm/unreadable                                 \
122   rm/v-slash                                    \
123   chgrp/default-no-deref                        \
124   chgrp/deref                                   \
125   chgrp/no-x                                    \
126   chgrp/posix-H                                 \
127   chgrp/recurse                                 \
128   misc/ptx                                      \
129   misc/test                                     \
130   misc/seq                                      \
131   misc/seq-long-double                          \
132   misc/head                                     \
133   misc/head-elide-tail                          \
134   tail-2/tail-n0f                               \
135   misc/ls-misc                                  \
136   misc/date                                     \
137   misc/date-next-dow                            \
138   misc/ptx-overrun                              \
139   misc/xstrtol                                  \
140   misc/od                                       \
141   misc/mktemp                                   \
142   misc/arch                                     \
143   misc/pr                                       \
144   misc/join                                     \
145   pr/pr-tests                                   \
146   misc/df-P                                     \
147   misc/pwd-option                               \
148   misc/pwd-unreadable-parent                    \
149   misc/chcon-fail                               \
150   misc/cut                                      \
151   misc/wc                                       \
152   misc/wc-files0-from                           \
153   misc/wc-files0                                \
154   misc/cat-proc                                 \
155   misc/cat-buf                                  \
156   misc/base64                                   \
157   misc/basename                                 \
158   misc/close-stdout                             \
159   misc/comm                                     \
160   misc/csplit                                   \
161   misc/date-sec                                 \
162   misc/dircolors                                \
163   misc/df                                       \
164   misc/dirname                                  \
165   misc/expand                                   \
166   misc/expr                                     \
167   misc/factor                                   \
168   misc/false-status                             \
169   misc/fmt                                      \
170   misc/fmt-long-line                            \
171   misc/fold                                     \
172   misc/groups-dash                              \
173   misc/groups-version                           \
174   misc/head-c                                   \
175   misc/head-pos                                 \
176   misc/id-context                               \
177   misc/id-groups                                \
178   misc/md5sum                                   \
179   misc/md5sum-newline                           \
180   misc/mknod                                    \
181   misc/nice                                     \
182   misc/nl                                       \
183   misc/nohup                                    \
184   misc/od-N                                     \
185   misc/od-multiple-t                            \
186   misc/od-x8                                    \
187   misc/paste                                    \
188   misc/pathchk1                                 \
189   misc/printf                                   \
190   misc/printf-cov                               \
191   misc/printf-hex                               \
192   misc/printf-surprise                          \
193   misc/pwd-long                                 \
194   misc/readlink-fp-loop                         \
195   misc/runcon-no-reorder                        \
196   misc/sha1sum                                  \
197   misc/sha1sum-vec                              \
198   misc/sha224sum                                \
199   misc/sha256sum                                \
200   misc/sha384sum                                \
201   misc/sha512sum                                \
202   misc/shred-exact                              \
203   misc/shred-passes                             \
204   misc/shred-remove                             \
205   misc/shuf                                     \
206   misc/sort                                     \
207   misc/sort-compress                            \
208   misc/sort-continue                            \
209   misc/sort-files0-from                         \
210   misc/sort-merge                               \
211   misc/sort-merge-fdlimit                       \
212   misc/sort-rand                                \
213   misc/sort-version                             \
214   misc/split-a                                  \
215   misc/split-fail                               \
216   misc/split-l                                  \
217   misc/stat-fmt                                 \
218   misc/stat-printf                              \
219   misc/stty                                     \
220   misc/stty-invalid                             \
221   misc/stty-row-col                             \
222   misc/sum                                      \
223   misc/sum-sysv                                 \
224   misc/tac                                      \
225   misc/tac-continue                             \
226   misc/tail                                     \
227   misc/tee                                      \
228   misc/tee-dash                                 \
229   misc/test-diag                                \
230   misc/timeout                                  \
231   misc/timeout-parameters                       \
232   misc/tr                                       \
233   misc/truncate-dangling-symlink                \
234   misc/truncate-dir-fail                        \
235   misc/truncate-fail-diag                       \
236   misc/truncate-fifo                            \
237   misc/truncate-no-create-missing               \
238   misc/truncate-overflow                        \
239   misc/truncate-parameters                      \
240   misc/truncate-relative                        \
241   misc/tsort                                    \
242   misc/tty-eof                                  \
243   misc/unexpand                                 \
244   misc/uniq                                     \
245   misc/xattr                                    \
246   chmod/c-option                                \
247   chmod/equal-x                                 \
248   chmod/equals                                  \
249   chmod/inaccessible                            \
250   chmod/octal                                   \
251   chmod/setgid                                  \
252   chmod/silent                                  \
253   chmod/thru-dangling                           \
254   chmod/umask-x                                 \
255   chmod/usage                                   \
256   chown/deref                                   \
257   chown/preserve-root                           \
258   chown/separator                               \
259   cp/abuse                                      \
260   cp/acl                                        \
261   cp/backup-1                                   \
262   cp/backup-dir                                 \
263   cp/backup-is-src                              \
264   cp/cp-HL                                      \
265   cp/cp-deref                                   \
266   cp/cp-i                                       \
267   cp/cp-mv-backup                               \
268   cp/cp-parents                                 \
269   cp/deref-slink                                \
270   cp/dir-rm-dest                                \
271   cp/dir-slash                                  \
272   cp/dir-vs-file                                \
273   cp/existing-perm-race                         \
274   cp/fail-perm                                  \
275   cp/file-perm-race                             \
276   cp/into-self                                  \
277   cp/link                                       \
278   cp/link-no-deref                              \
279   cp/link-preserve                              \
280   cp/no-deref-link1                             \
281   cp/no-deref-link2                             \
282   cp/no-deref-link3                             \
283   cp/parent-perm                                \
284   cp/parent-perm-race                           \
285   cp/perm                                       \
286   cp/preserve-2                                 \
287   cp/proc-short-read                            \
288   cp/proc-zero-len                              \
289   cp/r-vs-symlink                               \
290   cp/same-file                                  \
291   cp/slink-2-slink                              \
292   cp/sparse                                     \
293   cp/special-f                                  \
294   cp/src-base-dot                               \
295   cp/symlink-slash                              \
296   cp/thru-dangling                              \
297   dd/misc                                       \
298   dd/not-rewound                                \
299   dd/reblock                                    \
300   dd/skip-seek                                  \
301   dd/skip-seek2                                 \
302   dd/skip-seek-past-file                        \
303   dd/unblock-sync                               \
304   df/total-verify                               \
305   du/2g                                         \
306   du/8gb                                        \
307   du/basic                                      \
308   du/deref                                      \
309   du/deref-args                                 \
310   du/exclude                                    \
311   du/fd-leak                                    \
312   du/files0-from                                \
313   du/hard-link                                  \
314   du/inacc-dest                                 \
315   du/inacc-dir                                  \
316   du/inaccessible-cwd                           \
317   du/long-from-unreadable                       \
318   du/long-sloop                                 \
319   du/no-deref                                   \
320   du/no-x                                       \
321   du/one-file-system                            \
322   du/restore-wd                                 \
323   du/slash                                      \
324   du/slink                                      \
325   du/trailing-slash                             \
326   du/two-args                                   \
327   install/basic-1                               \
328   install/create-leading                        \
329   install/d-slashdot                            \
330   install/install-C                             \
331   install/install-C-selinux                     \
332   install/strip-program                         \
333   install/trap                                  \
334   ln/backup-1                                   \
335   ln/hard-backup                                \
336   ln/misc                                       \
337   ln/sf-1                                       \
338   ln/target-1                                   \
339   ls/abmon-align                                \
340   ls/color-clear-to-eol                         \
341   ls/color-dtype-dir                            \
342   ls/dangle                                     \
343   ls/dired                                      \
344   ls/file-type                                  \
345   ls/follow-slink                               \
346   ls/infloop                                    \
347   ls/inode                                      \
348   ls/m-option                                   \
349   ls/multihardlink                              \
350   ls/no-arg                                     \
351   ls/no-cap                                     \
352   ls/proc-selinux-segfault                      \
353   ls/recursive                                  \
354   ls/rt-1                                       \
355   ls/stat-dtype                                 \
356   ls/stat-failed                                \
357   ls/stat-free-symlinks                         \
358   ls/stat-vs-dirent                             \
359   ls/symlink-slash                              \
360   ls/x-option                                   \
361   mkdir/p-1                                     \
362   mkdir/p-2                                     \
363   mkdir/p-3                                     \
364   mkdir/p-slashdot                              \
365   mkdir/p-thru-slink                            \
366   mkdir/p-v                                     \
367   mkdir/parents                                 \
368   mkdir/perm                                    \
369   mkdir/selinux                                 \
370   mkdir/special-1                               \
371   mkdir/t-slash                                 \
372   mv/acl                                        \
373   mv/atomic                                     \
374   mv/atomic2                                    \
375   mv/backup-dir                                 \
376   mv/backup-is-src                              \
377   mv/childproof                                 \
378   mv/diag                                       \
379   mv/dir-file                                   \
380   mv/dir2dir                                    \
381   mv/dup-source                                 \
382   mv/force                                      \
383   mv/hard-2                                     \
384   mv/hard-3                                     \
385   mv/hard-4                                     \
386   mv/hard-link-1                                \
387   mv/hard-verbose                               \
388   mv/i-1                                        \
389   mv/i-2                                        \
390   mv/i-3                                        \
391   mv/i-4                                        \
392   mv/i-5                                        \
393   mv/i-link-no                                  \
394   mv/into-self                                  \
395   mv/into-self-2                                \
396   mv/into-self-3                                \
397   mv/into-self-4                                \
398   mv/leak-fd                                    \
399   mv/mv-n                                       \
400   mv/mv-special-1                               \
401   mv/no-target-dir                              \
402   mv/part-fail                                  \
403   mv/part-hardlink                              \
404   mv/part-rename                                \
405   mv/part-symlink                               \
406   mv/partition-perm                             \
407   mv/perm-1                                     \
408   mv/to-symlink                                 \
409   mv/trailing-slash                             \
410   mv/update                                     \
411   readlink/can-e                                \
412   readlink/can-f                                \
413   readlink/can-m                                \
414   readlink/rl-1                                 \
415   rmdir/fail-perm                               \
416   rmdir/ignore                                  \
417   rmdir/t-slash                                 \
418   tail-2/assert-2                               \
419   tail-2/big-4gb                                \
420   tail-2/proc-ksyms                             \
421   tail-2/start-middle                           \
422   touch/dangling-symlink                        \
423   touch/dir-1                                   \
424   touch/fail-diag                               \
425   touch/fifo                                    \
426   touch/no-create-missing                       \
427   touch/no-rights                               \
428   touch/not-owner                               \
429   touch/obsolescent                             \
430   touch/read-only                               \
431   touch/relative                                \
432   $(root_tests)
433
434 pr_data =                                       \
435   pr/0F                                         \
436   pr/0FF                                        \
437   pr/0FFnt                                      \
438   pr/0FFt                                       \
439   pr/0FnFnt                                     \
440   pr/0FnFt                                      \
441   pr/0Fnt                                       \
442   pr/0Ft                                        \
443   pr/2-S_f-t_notab                              \
444   pr/2-Sf-t_notab                               \
445   pr/2f-t_notab                                 \
446   pr/2s_f-t_notab                               \
447   pr/2s_w60f-t_nota                             \
448   pr/2sf-t_notab                                \
449   pr/2sw60f-t_notab                             \
450   pr/2w60f-t_notab                              \
451   pr/3-0F                                       \
452   pr/3-5l24f-t                                  \
453   pr/3-FF                                       \
454   pr/3a2l17-FF                                  \
455   pr/3a3f-0F                                    \
456   pr/3a3l15-t                                   \
457   pr/3a3l15f-t                                  \
458   pr/3b2l17-FF                                  \
459   pr/3b3f-0F                                    \
460   pr/3b3f-0FF                                   \
461   pr/3b3f-FF                                    \
462   pr/3b3l15-t                                   \
463   pr/3b3l15f-t                                  \
464   pr/3f-0F                                      \
465   pr/3f-FF                                      \
466   pr/3l24-t                                     \
467   pr/3l24f-t                                    \
468   pr/3ml24-FF                                   \
469   pr/3ml24-t                                    \
470   pr/3ml24-t-FF                                 \
471   pr/3ml24f-t                                   \
472   pr/4-7l24-FF                                  \
473   pr/4l24-FF                                    \
474   pr/FF                                         \
475   pr/FFn                                        \
476   pr/FFtn                                       \
477   pr/FnFn                                       \
478   pr/Ja3l24f-lm                                 \
479   pr/Jb3l24f-lm                                 \
480   pr/Jml24f-lm-lo                               \
481   pr/W-72l24f-ll                                \
482   pr/W20l24f-ll                                 \
483   pr/W26l24f-ll                                 \
484   pr/W27l24f-ll                                 \
485   pr/W28l24f-ll                                 \
486   pr/W35Ja3l24f-lm                              \
487   pr/W35Jb3l24f-lm                              \
488   pr/W35Jml24f-lmlo                             \
489   pr/W35a3l24f-lm                               \
490   pr/W35b3l24f-lm                               \
491   pr/W35ml24f-lm-lo                             \
492   pr/W72Jl24f-ll                                \
493   pr/a2l15-FF                                   \
494   pr/a2l17-FF                                   \
495   pr/a3-0F                                      \
496   pr/a3f-0F                                     \
497   pr/a3f-0FF                                    \
498   pr/a3f-FF                                     \
499   pr/a3l15-t                                    \
500   pr/a3l15f-t                                   \
501   pr/a3l24f-lm                                  \
502   pr/b2l15-FF                                   \
503   pr/b2l17-FF                                   \
504   pr/b3-0F                                      \
505   pr/b3f-0F                                     \
506   pr/b3f-0FF                                    \
507   pr/b3f-FF                                     \
508   pr/b3l15-t                                    \
509   pr/b3l15f-t                                   \
510   pr/b3l24f-lm                                  \
511   pr/l24-FF                                     \
512   pr/l24-t                                      \
513   pr/l24f-t                                     \
514   pr/loli                                       \
515   pr/ml20-FF-t                                  \
516   pr/ml24-FF                                    \
517   pr/ml24-t                                     \
518   pr/ml24-t-FF                                  \
519   pr/ml24f-0F                                   \
520   pr/ml24f-lm-lo                                \
521   pr/ml24f-t                                    \
522   pr/ml24f-t-0F                                 \
523   pr/n+2-5l24f-0FF                              \
524   pr/n+2l24f-0FF                                \
525   pr/n+2l24f-bl                                 \
526   pr/n+3-7l24-FF                                \
527   pr/n+3l24f-0FF                                \
528   pr/n+3l24f-bl                                 \
529   pr/n+3ml20f-bl-FF                             \
530   pr/n+3ml24f-bl-tn                             \
531   pr/n+3ml24f-tn-bl                             \
532   pr/n+4-8a2l17-FF                              \
533   pr/n+4b2l17f-0FF                              \
534   pr/n+5-8b3l17f-FF                             \
535   pr/n+5a3l13f-0FF                              \
536   pr/n+6a2l17-FF                                \
537   pr/n+6b3l13f-FF                               \
538   pr/n+7l24-FF                                  \
539   pr/n+8l20-FF                                  \
540   pr/nJml24f-lmlmlo                             \
541   pr/nJml24f-lmlolm                             \
542   pr/nN1+3l24f-bl                               \
543   pr/nN15l24f-bl                                \
544   pr/nSml20-bl-FF                               \
545   pr/nSml20-t-t-FF                              \
546   pr/nSml20-t-tFFFF                             \
547   pr/nSml24-bl-FF                               \
548   pr/nSml24-t-t-FF                              \
549   pr/nSml24-t-tFFFF                             \
550   pr/nl24f-bl                                   \
551   pr/o3Jml24f-lm-lo                             \
552   pr/o3a3Sl24f-tn                               \
553   pr/o3a3Snl24f-tn                              \
554   pr/o3a3l24f-tn                                \
555   pr/o3b3Sl24f-tn                               \
556   pr/o3b3Snl24f-tn                              \
557   pr/o3b3l24f-tn                                \
558   pr/o3mSl24f-bl-tn                             \
559   pr/o3mSnl24fbltn                              \
560   pr/o3ml24f-bl-tn                              \
561   pr/t-0FF                                      \
562   pr/t-FF                                       \
563   pr/t-bl                                       \
564   pr/t-t                                        \
565   pr/tFFn                                       \
566   pr/tFFt                                       \
567   pr/tFFt-bl                                    \
568   pr/tFFt-ll                                    \
569   pr/tFFt-lm                                    \
570   pr/tFnFt                                      \
571   pr/t_notab                                    \
572   pr/t_tab                                      \
573   pr/t_tab_                                     \
574   pr/ta3-0FF                                    \
575   pr/ta3-FF                                     \
576   pr/tb3-0FF                                    \
577   pr/tb3-FF                                     \
578   pr/tn                                         \
579   pr/tn2e5o3-t_tab                              \
580   pr/tn2e8-t_tab                                \
581   pr/tn2e8o3-t_tab                              \
582   pr/tn_2e8-t_tab                               \
583   pr/tn_2e8S-t_tab                              \
584   pr/tne8-t_tab                                 \
585   pr/tne8o3-t_tab                               \
586   pr/tt-0FF                                     \
587   pr/tt-FF                                      \
588   pr/tt-bl                                      \
589   pr/tt-t                                       \
590   pr/tta3-0FF                                   \
591   pr/tta3-FF                                    \
592   pr/ttb3-0FF                                   \
593   pr/ttb3-FF                                    \
594   pr/w72l24f-ll
595
596 include $(srcdir)/check.mk