tail: ignore -f for piped-stdin, as POSIX requires
[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   tail-2/pid                                    \
141   misc/od                                       \
142   misc/mktemp                                   \
143   misc/arch                                     \
144   misc/pr                                       \
145   misc/join                                     \
146   pr/pr-tests                                   \
147   misc/df-P                                     \
148   misc/pwd-option                               \
149   misc/pwd-unreadable-parent                    \
150   misc/chcon-fail                               \
151   misc/cut                                      \
152   misc/wc                                       \
153   misc/wc-files0-from                           \
154   misc/wc-files0                                \
155   misc/cat-proc                                 \
156   misc/cat-buf                                  \
157   misc/base64                                   \
158   misc/basename                                 \
159   misc/close-stdout                             \
160   misc/comm                                     \
161   misc/csplit                                   \
162   misc/date-sec                                 \
163   misc/dircolors                                \
164   misc/df                                       \
165   misc/dirname                                  \
166   misc/expand                                   \
167   misc/expr                                     \
168   misc/factor                                   \
169   misc/false-status                             \
170   misc/fmt                                      \
171   misc/fmt-long-line                            \
172   misc/fold                                     \
173   misc/groups-dash                              \
174   misc/groups-version                           \
175   misc/head-c                                   \
176   misc/head-pos                                 \
177   misc/id-context                               \
178   misc/id-groups                                \
179   misc/md5sum                                   \
180   misc/md5sum-newline                           \
181   misc/mknod                                    \
182   misc/nice                                     \
183   misc/nl                                       \
184   misc/nohup                                    \
185   misc/od-N                                     \
186   misc/od-multiple-t                            \
187   misc/od-x8                                    \
188   misc/paste                                    \
189   misc/pathchk1                                 \
190   misc/printf                                   \
191   misc/printf-cov                               \
192   misc/printf-hex                               \
193   misc/printf-surprise                          \
194   misc/pwd-long                                 \
195   misc/readlink-fp-loop                         \
196   misc/runcon-no-reorder                        \
197   misc/sha1sum                                  \
198   misc/sha1sum-vec                              \
199   misc/sha224sum                                \
200   misc/sha256sum                                \
201   misc/sha384sum                                \
202   misc/sha512sum                                \
203   misc/shred-exact                              \
204   misc/shred-passes                             \
205   misc/shred-remove                             \
206   misc/shuf                                     \
207   misc/sort                                     \
208   misc/sort-compress                            \
209   misc/sort-continue                            \
210   misc/sort-files0-from                         \
211   misc/sort-merge                               \
212   misc/sort-merge-fdlimit                       \
213   misc/sort-rand                                \
214   misc/sort-version                             \
215   misc/split-a                                  \
216   misc/split-fail                               \
217   misc/split-l                                  \
218   misc/stat-fmt                                 \
219   misc/stat-printf                              \
220   misc/stdbuf                                   \
221   misc/stty                                     \
222   misc/stty-invalid                             \
223   misc/stty-row-col                             \
224   misc/sum                                      \
225   misc/sum-sysv                                 \
226   misc/tac                                      \
227   misc/tac-continue                             \
228   misc/tail                                     \
229   misc/tee                                      \
230   misc/tee-dash                                 \
231   misc/test-diag                                \
232   misc/timeout                                  \
233   misc/timeout-parameters                       \
234   misc/tr                                       \
235   misc/truncate-dangling-symlink                \
236   misc/truncate-dir-fail                        \
237   misc/truncate-fail-diag                       \
238   misc/truncate-fifo                            \
239   misc/truncate-no-create-missing               \
240   misc/truncate-overflow                        \
241   misc/truncate-parameters                      \
242   misc/truncate-relative                        \
243   misc/tsort                                    \
244   misc/tty-eof                                  \
245   misc/unexpand                                 \
246   misc/uniq                                     \
247   misc/xattr                                    \
248   tail-2/wait                                   \
249   chmod/c-option                                \
250   chmod/equal-x                                 \
251   chmod/equals                                  \
252   chmod/inaccessible                            \
253   chmod/octal                                   \
254   chmod/setgid                                  \
255   chmod/silent                                  \
256   chmod/thru-dangling                           \
257   chmod/umask-x                                 \
258   chmod/usage                                   \
259   chown/deref                                   \
260   chown/preserve-root                           \
261   chown/separator                               \
262   cp/abuse                                      \
263   cp/acl                                        \
264   cp/backup-1                                   \
265   cp/backup-dir                                 \
266   cp/backup-is-src                              \
267   cp/cp-HL                                      \
268   cp/cp-deref                                   \
269   cp/cp-i                                       \
270   cp/cp-mv-backup                               \
271   cp/cp-parents                                 \
272   cp/deref-slink                                \
273   cp/dir-rm-dest                                \
274   cp/dir-slash                                  \
275   cp/dir-vs-file                                \
276   cp/existing-perm-race                         \
277   cp/fail-perm                                  \
278   cp/file-perm-race                             \
279   cp/into-self                                  \
280   cp/link                                       \
281   cp/link-no-deref                              \
282   cp/link-preserve                              \
283   cp/no-deref-link1                             \
284   cp/no-deref-link2                             \
285   cp/no-deref-link3                             \
286   cp/parent-perm                                \
287   cp/parent-perm-race                           \
288   cp/perm                                       \
289   cp/preserve-2                                 \
290   cp/preserve-slink-time                        \
291   cp/proc-short-read                            \
292   cp/proc-zero-len                              \
293   cp/r-vs-symlink                               \
294   cp/reflink-auto                               \
295   cp/reflink-perm                               \
296   cp/same-file                                  \
297   cp/slink-2-slink                              \
298   cp/sparse                                     \
299   cp/special-f                                  \
300   cp/src-base-dot                               \
301   cp/symlink-slash                              \
302   cp/thru-dangling                              \
303   df/unreadable                                 \
304   dd/direct                                     \
305   dd/misc                                       \
306   dd/not-rewound                                \
307   dd/reblock                                    \
308   dd/skip-seek                                  \
309   dd/skip-seek2                                 \
310   dd/skip-seek-past-file                        \
311   dd/stderr                                     \
312   dd/unblock-sync                               \
313   df/total-verify                               \
314   du/2g                                         \
315   du/8gb                                        \
316   du/basic                                      \
317   du/deref                                      \
318   du/deref-args                                 \
319   du/exclude                                    \
320   du/fd-leak                                    \
321   du/files0-from                                \
322   du/hard-link                                  \
323   du/inacc-dest                                 \
324   du/inacc-dir                                  \
325   du/inaccessible-cwd                           \
326   du/long-from-unreadable                       \
327   du/long-sloop                                 \
328   du/no-deref                                   \
329   du/no-x                                       \
330   du/one-file-system                            \
331   du/restore-wd                                 \
332   du/slash                                      \
333   du/slink                                      \
334   du/trailing-slash                             \
335   du/two-args                                   \
336   install/basic-1                               \
337   install/create-leading                        \
338   install/d-slashdot                            \
339   install/install-C                             \
340   install/install-C-selinux                     \
341   install/strip-program                         \
342   install/trap                                  \
343   ln/backup-1                                   \
344   ln/hard-backup                                \
345   ln/misc                                       \
346   ln/sf-1                                       \
347   ln/target-1                                   \
348   ls/abmon-align                                \
349   ls/color-clear-to-eol                         \
350   ls/color-dtype-dir                            \
351   ls/dangle                                     \
352   ls/dired                                      \
353   ls/file-type                                  \
354   ls/follow-slink                               \
355   ls/infloop                                    \
356   ls/inode                                      \
357   ls/m-option                                   \
358   ls/multihardlink                              \
359   ls/no-arg                                     \
360   ls/no-cap                                     \
361   ls/proc-selinux-segfault                      \
362   ls/readdir-mountpoint-inode                   \
363   ls/recursive                                  \
364   ls/rt-1                                       \
365   ls/stat-dtype                                 \
366   ls/stat-failed                                \
367   ls/stat-free-symlinks                         \
368   ls/stat-vs-dirent                             \
369   ls/symlink-slash                              \
370   ls/x-option                                   \
371   mkdir/p-1                                     \
372   mkdir/p-2                                     \
373   mkdir/p-3                                     \
374   mkdir/p-slashdot                              \
375   mkdir/p-thru-slink                            \
376   mkdir/p-v                                     \
377   mkdir/parents                                 \
378   mkdir/perm                                    \
379   mkdir/selinux                                 \
380   mkdir/special-1                               \
381   mkdir/t-slash                                 \
382   mv/acl                                        \
383   mv/atomic                                     \
384   mv/atomic2                                    \
385   mv/backup-dir                                 \
386   mv/backup-is-src                              \
387   mv/childproof                                 \
388   mv/diag                                       \
389   mv/dir-file                                   \
390   mv/dir2dir                                    \
391   mv/dup-source                                 \
392   mv/force                                      \
393   mv/hard-2                                     \
394   mv/hard-3                                     \
395   mv/hard-4                                     \
396   mv/hard-link-1                                \
397   mv/hard-verbose                               \
398   mv/i-1                                        \
399   mv/i-2                                        \
400   mv/i-3                                        \
401   mv/i-4                                        \
402   mv/i-5                                        \
403   mv/i-link-no                                  \
404   mv/into-self                                  \
405   mv/into-self-2                                \
406   mv/into-self-3                                \
407   mv/into-self-4                                \
408   mv/leak-fd                                    \
409   mv/mv-n                                       \
410   mv/mv-special-1                               \
411   mv/no-target-dir                              \
412   mv/part-fail                                  \
413   mv/part-hardlink                              \
414   mv/part-rename                                \
415   mv/part-symlink                               \
416   mv/partition-perm                             \
417   mv/perm-1                                     \
418   mv/to-symlink                                 \
419   mv/trailing-slash                             \
420   mv/update                                     \
421   readlink/can-e                                \
422   readlink/can-f                                \
423   readlink/can-m                                \
424   readlink/rl-1                                 \
425   rmdir/fail-perm                               \
426   rmdir/ignore                                  \
427   rmdir/t-slash                                 \
428   tail-2/assert-2                               \
429   tail-2/big-4gb                                \
430   tail-2/flush-initial                          \
431   tail-2/follow-stdin                           \
432   tail-2/pipe-f                                 \
433   tail-2/pipe-f2                                \
434   tail-2/proc-ksyms                             \
435   tail-2/start-middle                           \
436   touch/dangling-symlink                        \
437   touch/dir-1                                   \
438   touch/fail-diag                               \
439   touch/fifo                                    \
440   touch/no-create-missing                       \
441   touch/no-rights                               \
442   touch/not-owner                               \
443   touch/obsolescent                             \
444   touch/read-only                               \
445   touch/relative                                \
446   $(root_tests)
447
448 pr_data =                                       \
449   pr/0F                                         \
450   pr/0FF                                        \
451   pr/0FFnt                                      \
452   pr/0FFt                                       \
453   pr/0FnFnt                                     \
454   pr/0FnFt                                      \
455   pr/0Fnt                                       \
456   pr/0Ft                                        \
457   pr/2-S_f-t_notab                              \
458   pr/2-Sf-t_notab                               \
459   pr/2f-t_notab                                 \
460   pr/2s_f-t_notab                               \
461   pr/2s_w60f-t_nota                             \
462   pr/2sf-t_notab                                \
463   pr/2sw60f-t_notab                             \
464   pr/2w60f-t_notab                              \
465   pr/3-0F                                       \
466   pr/3-5l24f-t                                  \
467   pr/3-FF                                       \
468   pr/3a2l17-FF                                  \
469   pr/3a3f-0F                                    \
470   pr/3a3l15-t                                   \
471   pr/3a3l15f-t                                  \
472   pr/3b2l17-FF                                  \
473   pr/3b3f-0F                                    \
474   pr/3b3f-0FF                                   \
475   pr/3b3f-FF                                    \
476   pr/3b3l15-t                                   \
477   pr/3b3l15f-t                                  \
478   pr/3f-0F                                      \
479   pr/3f-FF                                      \
480   pr/3l24-t                                     \
481   pr/3l24f-t                                    \
482   pr/3ml24-FF                                   \
483   pr/3ml24-t                                    \
484   pr/3ml24-t-FF                                 \
485   pr/3ml24f-t                                   \
486   pr/4-7l24-FF                                  \
487   pr/4l24-FF                                    \
488   pr/FF                                         \
489   pr/FFn                                        \
490   pr/FFtn                                       \
491   pr/FnFn                                       \
492   pr/Ja3l24f-lm                                 \
493   pr/Jb3l24f-lm                                 \
494   pr/Jml24f-lm-lo                               \
495   pr/W-72l24f-ll                                \
496   pr/W20l24f-ll                                 \
497   pr/W26l24f-ll                                 \
498   pr/W27l24f-ll                                 \
499   pr/W28l24f-ll                                 \
500   pr/W35Ja3l24f-lm                              \
501   pr/W35Jb3l24f-lm                              \
502   pr/W35Jml24f-lmlo                             \
503   pr/W35a3l24f-lm                               \
504   pr/W35b3l24f-lm                               \
505   pr/W35ml24f-lm-lo                             \
506   pr/W72Jl24f-ll                                \
507   pr/a2l15-FF                                   \
508   pr/a2l17-FF                                   \
509   pr/a3-0F                                      \
510   pr/a3f-0F                                     \
511   pr/a3f-0FF                                    \
512   pr/a3f-FF                                     \
513   pr/a3l15-t                                    \
514   pr/a3l15f-t                                   \
515   pr/a3l24f-lm                                  \
516   pr/b2l15-FF                                   \
517   pr/b2l17-FF                                   \
518   pr/b3-0F                                      \
519   pr/b3f-0F                                     \
520   pr/b3f-0FF                                    \
521   pr/b3f-FF                                     \
522   pr/b3l15-t                                    \
523   pr/b3l15f-t                                   \
524   pr/b3l24f-lm                                  \
525   pr/l24-FF                                     \
526   pr/l24-t                                      \
527   pr/l24f-t                                     \
528   pr/loli                                       \
529   pr/ml20-FF-t                                  \
530   pr/ml24-FF                                    \
531   pr/ml24-t                                     \
532   pr/ml24-t-FF                                  \
533   pr/ml24f-0F                                   \
534   pr/ml24f-lm-lo                                \
535   pr/ml24f-t                                    \
536   pr/ml24f-t-0F                                 \
537   pr/n+2-5l24f-0FF                              \
538   pr/n+2l24f-0FF                                \
539   pr/n+2l24f-bl                                 \
540   pr/n+3-7l24-FF                                \
541   pr/n+3l24f-0FF                                \
542   pr/n+3l24f-bl                                 \
543   pr/n+3ml20f-bl-FF                             \
544   pr/n+3ml24f-bl-tn                             \
545   pr/n+3ml24f-tn-bl                             \
546   pr/n+4-8a2l17-FF                              \
547   pr/n+4b2l17f-0FF                              \
548   pr/n+5-8b3l17f-FF                             \
549   pr/n+5a3l13f-0FF                              \
550   pr/n+6a2l17-FF                                \
551   pr/n+6b3l13f-FF                               \
552   pr/n+7l24-FF                                  \
553   pr/n+8l20-FF                                  \
554   pr/nJml24f-lmlmlo                             \
555   pr/nJml24f-lmlolm                             \
556   pr/nN1+3l24f-bl                               \
557   pr/nN15l24f-bl                                \
558   pr/nSml20-bl-FF                               \
559   pr/nSml20-t-t-FF                              \
560   pr/nSml20-t-tFFFF                             \
561   pr/nSml24-bl-FF                               \
562   pr/nSml24-t-t-FF                              \
563   pr/nSml24-t-tFFFF                             \
564   pr/nl24f-bl                                   \
565   pr/o3Jml24f-lm-lo                             \
566   pr/o3a3Sl24f-tn                               \
567   pr/o3a3Snl24f-tn                              \
568   pr/o3a3l24f-tn                                \
569   pr/o3b3Sl24f-tn                               \
570   pr/o3b3Snl24f-tn                              \
571   pr/o3b3l24f-tn                                \
572   pr/o3mSl24f-bl-tn                             \
573   pr/o3mSnl24fbltn                              \
574   pr/o3ml24f-bl-tn                              \
575   pr/t-0FF                                      \
576   pr/t-FF                                       \
577   pr/t-bl                                       \
578   pr/t-t                                        \
579   pr/tFFn                                       \
580   pr/tFFt                                       \
581   pr/tFFt-bl                                    \
582   pr/tFFt-ll                                    \
583   pr/tFFt-lm                                    \
584   pr/tFnFt                                      \
585   pr/t_notab                                    \
586   pr/t_tab                                      \
587   pr/t_tab_                                     \
588   pr/ta3-0FF                                    \
589   pr/ta3-FF                                     \
590   pr/tb3-0FF                                    \
591   pr/tb3-FF                                     \
592   pr/tn                                         \
593   pr/tn2e5o3-t_tab                              \
594   pr/tn2e8-t_tab                                \
595   pr/tn2e8o3-t_tab                              \
596   pr/tn_2e8-t_tab                               \
597   pr/tn_2e8S-t_tab                              \
598   pr/tne8-t_tab                                 \
599   pr/tne8o3-t_tab                               \
600   pr/tt-0FF                                     \
601   pr/tt-FF                                      \
602   pr/tt-bl                                      \
603   pr/tt-t                                       \
604   pr/tta3-0FF                                   \
605   pr/tta3-FF                                    \
606   pr/ttb3-0FF                                   \
607   pr/ttb3-FF                                    \
608   pr/w72l24f-ll
609
610 include $(srcdir)/check.mk