tail: use inotify if it is available
[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/stty                                     \
221   misc/stty-invalid                             \
222   misc/stty-row-col                             \
223   misc/sum                                      \
224   misc/sum-sysv                                 \
225   misc/tac                                      \
226   misc/tac-continue                             \
227   misc/tail                                     \
228   misc/tee                                      \
229   misc/tee-dash                                 \
230   misc/test-diag                                \
231   misc/timeout                                  \
232   misc/timeout-parameters                       \
233   misc/tr                                       \
234   misc/truncate-dangling-symlink                \
235   misc/truncate-dir-fail                        \
236   misc/truncate-fail-diag                       \
237   misc/truncate-fifo                            \
238   misc/truncate-no-create-missing               \
239   misc/truncate-overflow                        \
240   misc/truncate-parameters                      \
241   misc/truncate-relative                        \
242   misc/tsort                                    \
243   misc/tty-eof                                  \
244   misc/unexpand                                 \
245   misc/uniq                                     \
246   misc/xattr                                    \
247   tail-2/wait                                   \
248   chmod/c-option                                \
249   chmod/equal-x                                 \
250   chmod/equals                                  \
251   chmod/inaccessible                            \
252   chmod/octal                                   \
253   chmod/setgid                                  \
254   chmod/silent                                  \
255   chmod/thru-dangling                           \
256   chmod/umask-x                                 \
257   chmod/usage                                   \
258   chown/deref                                   \
259   chown/preserve-root                           \
260   chown/separator                               \
261   cp/abuse                                      \
262   cp/acl                                        \
263   cp/backup-1                                   \
264   cp/backup-dir                                 \
265   cp/backup-is-src                              \
266   cp/cp-HL                                      \
267   cp/cp-deref                                   \
268   cp/cp-i                                       \
269   cp/cp-mv-backup                               \
270   cp/cp-parents                                 \
271   cp/deref-slink                                \
272   cp/dir-rm-dest                                \
273   cp/dir-slash                                  \
274   cp/dir-vs-file                                \
275   cp/existing-perm-race                         \
276   cp/fail-perm                                  \
277   cp/file-perm-race                             \
278   cp/into-self                                  \
279   cp/link                                       \
280   cp/link-no-deref                              \
281   cp/link-preserve                              \
282   cp/no-deref-link1                             \
283   cp/no-deref-link2                             \
284   cp/no-deref-link3                             \
285   cp/parent-perm                                \
286   cp/parent-perm-race                           \
287   cp/perm                                       \
288   cp/preserve-2                                 \
289   cp/proc-short-read                            \
290   cp/proc-zero-len                              \
291   cp/r-vs-symlink                               \
292   cp/same-file                                  \
293   cp/slink-2-slink                              \
294   cp/sparse                                     \
295   cp/special-f                                  \
296   cp/src-base-dot                               \
297   cp/symlink-slash                              \
298   cp/thru-dangling                              \
299   dd/misc                                       \
300   dd/not-rewound                                \
301   dd/reblock                                    \
302   dd/skip-seek                                  \
303   dd/skip-seek2                                 \
304   dd/skip-seek-past-file                        \
305   dd/unblock-sync                               \
306   df/total-verify                               \
307   du/2g                                         \
308   du/8gb                                        \
309   du/basic                                      \
310   du/deref                                      \
311   du/deref-args                                 \
312   du/exclude                                    \
313   du/fd-leak                                    \
314   du/files0-from                                \
315   du/hard-link                                  \
316   du/inacc-dest                                 \
317   du/inacc-dir                                  \
318   du/inaccessible-cwd                           \
319   du/long-from-unreadable                       \
320   du/long-sloop                                 \
321   du/no-deref                                   \
322   du/no-x                                       \
323   du/one-file-system                            \
324   du/restore-wd                                 \
325   du/slash                                      \
326   du/slink                                      \
327   du/trailing-slash                             \
328   du/two-args                                   \
329   install/basic-1                               \
330   install/create-leading                        \
331   install/d-slashdot                            \
332   install/install-C                             \
333   install/install-C-selinux                     \
334   install/strip-program                         \
335   install/trap                                  \
336   ln/backup-1                                   \
337   ln/hard-backup                                \
338   ln/misc                                       \
339   ln/sf-1                                       \
340   ln/target-1                                   \
341   ls/abmon-align                                \
342   ls/color-clear-to-eol                         \
343   ls/color-dtype-dir                            \
344   ls/dangle                                     \
345   ls/dired                                      \
346   ls/file-type                                  \
347   ls/follow-slink                               \
348   ls/infloop                                    \
349   ls/inode                                      \
350   ls/m-option                                   \
351   ls/multihardlink                              \
352   ls/no-arg                                     \
353   ls/no-cap                                     \
354   ls/proc-selinux-segfault                      \
355   ls/recursive                                  \
356   ls/rt-1                                       \
357   ls/stat-dtype                                 \
358   ls/stat-failed                                \
359   ls/stat-free-symlinks                         \
360   ls/stat-vs-dirent                             \
361   ls/symlink-slash                              \
362   ls/x-option                                   \
363   mkdir/p-1                                     \
364   mkdir/p-2                                     \
365   mkdir/p-3                                     \
366   mkdir/p-slashdot                              \
367   mkdir/p-thru-slink                            \
368   mkdir/p-v                                     \
369   mkdir/parents                                 \
370   mkdir/perm                                    \
371   mkdir/selinux                                 \
372   mkdir/special-1                               \
373   mkdir/t-slash                                 \
374   mv/acl                                        \
375   mv/atomic                                     \
376   mv/atomic2                                    \
377   mv/backup-dir                                 \
378   mv/backup-is-src                              \
379   mv/childproof                                 \
380   mv/diag                                       \
381   mv/dir-file                                   \
382   mv/dir2dir                                    \
383   mv/dup-source                                 \
384   mv/force                                      \
385   mv/hard-2                                     \
386   mv/hard-3                                     \
387   mv/hard-4                                     \
388   mv/hard-link-1                                \
389   mv/hard-verbose                               \
390   mv/i-1                                        \
391   mv/i-2                                        \
392   mv/i-3                                        \
393   mv/i-4                                        \
394   mv/i-5                                        \
395   mv/i-link-no                                  \
396   mv/into-self                                  \
397   mv/into-self-2                                \
398   mv/into-self-3                                \
399   mv/into-self-4                                \
400   mv/leak-fd                                    \
401   mv/mv-n                                       \
402   mv/mv-special-1                               \
403   mv/no-target-dir                              \
404   mv/part-fail                                  \
405   mv/part-hardlink                              \
406   mv/part-rename                                \
407   mv/part-symlink                               \
408   mv/partition-perm                             \
409   mv/perm-1                                     \
410   mv/to-symlink                                 \
411   mv/trailing-slash                             \
412   mv/update                                     \
413   readlink/can-e                                \
414   readlink/can-f                                \
415   readlink/can-m                                \
416   readlink/rl-1                                 \
417   rmdir/fail-perm                               \
418   rmdir/ignore                                  \
419   rmdir/t-slash                                 \
420   tail-2/assert-2                               \
421   tail-2/big-4gb                                \
422   tail-2/proc-ksyms                             \
423   tail-2/start-middle                           \
424   touch/dangling-symlink                        \
425   touch/dir-1                                   \
426   touch/fail-diag                               \
427   touch/fifo                                    \
428   touch/no-create-missing                       \
429   touch/no-rights                               \
430   touch/not-owner                               \
431   touch/obsolescent                             \
432   touch/read-only                               \
433   touch/relative                                \
434   $(root_tests)
435
436 pr_data =                                       \
437   pr/0F                                         \
438   pr/0FF                                        \
439   pr/0FFnt                                      \
440   pr/0FFt                                       \
441   pr/0FnFnt                                     \
442   pr/0FnFt                                      \
443   pr/0Fnt                                       \
444   pr/0Ft                                        \
445   pr/2-S_f-t_notab                              \
446   pr/2-Sf-t_notab                               \
447   pr/2f-t_notab                                 \
448   pr/2s_f-t_notab                               \
449   pr/2s_w60f-t_nota                             \
450   pr/2sf-t_notab                                \
451   pr/2sw60f-t_notab                             \
452   pr/2w60f-t_notab                              \
453   pr/3-0F                                       \
454   pr/3-5l24f-t                                  \
455   pr/3-FF                                       \
456   pr/3a2l17-FF                                  \
457   pr/3a3f-0F                                    \
458   pr/3a3l15-t                                   \
459   pr/3a3l15f-t                                  \
460   pr/3b2l17-FF                                  \
461   pr/3b3f-0F                                    \
462   pr/3b3f-0FF                                   \
463   pr/3b3f-FF                                    \
464   pr/3b3l15-t                                   \
465   pr/3b3l15f-t                                  \
466   pr/3f-0F                                      \
467   pr/3f-FF                                      \
468   pr/3l24-t                                     \
469   pr/3l24f-t                                    \
470   pr/3ml24-FF                                   \
471   pr/3ml24-t                                    \
472   pr/3ml24-t-FF                                 \
473   pr/3ml24f-t                                   \
474   pr/4-7l24-FF                                  \
475   pr/4l24-FF                                    \
476   pr/FF                                         \
477   pr/FFn                                        \
478   pr/FFtn                                       \
479   pr/FnFn                                       \
480   pr/Ja3l24f-lm                                 \
481   pr/Jb3l24f-lm                                 \
482   pr/Jml24f-lm-lo                               \
483   pr/W-72l24f-ll                                \
484   pr/W20l24f-ll                                 \
485   pr/W26l24f-ll                                 \
486   pr/W27l24f-ll                                 \
487   pr/W28l24f-ll                                 \
488   pr/W35Ja3l24f-lm                              \
489   pr/W35Jb3l24f-lm                              \
490   pr/W35Jml24f-lmlo                             \
491   pr/W35a3l24f-lm                               \
492   pr/W35b3l24f-lm                               \
493   pr/W35ml24f-lm-lo                             \
494   pr/W72Jl24f-ll                                \
495   pr/a2l15-FF                                   \
496   pr/a2l17-FF                                   \
497   pr/a3-0F                                      \
498   pr/a3f-0F                                     \
499   pr/a3f-0FF                                    \
500   pr/a3f-FF                                     \
501   pr/a3l15-t                                    \
502   pr/a3l15f-t                                   \
503   pr/a3l24f-lm                                  \
504   pr/b2l15-FF                                   \
505   pr/b2l17-FF                                   \
506   pr/b3-0F                                      \
507   pr/b3f-0F                                     \
508   pr/b3f-0FF                                    \
509   pr/b3f-FF                                     \
510   pr/b3l15-t                                    \
511   pr/b3l15f-t                                   \
512   pr/b3l24f-lm                                  \
513   pr/l24-FF                                     \
514   pr/l24-t                                      \
515   pr/l24f-t                                     \
516   pr/loli                                       \
517   pr/ml20-FF-t                                  \
518   pr/ml24-FF                                    \
519   pr/ml24-t                                     \
520   pr/ml24-t-FF                                  \
521   pr/ml24f-0F                                   \
522   pr/ml24f-lm-lo                                \
523   pr/ml24f-t                                    \
524   pr/ml24f-t-0F                                 \
525   pr/n+2-5l24f-0FF                              \
526   pr/n+2l24f-0FF                                \
527   pr/n+2l24f-bl                                 \
528   pr/n+3-7l24-FF                                \
529   pr/n+3l24f-0FF                                \
530   pr/n+3l24f-bl                                 \
531   pr/n+3ml20f-bl-FF                             \
532   pr/n+3ml24f-bl-tn                             \
533   pr/n+3ml24f-tn-bl                             \
534   pr/n+4-8a2l17-FF                              \
535   pr/n+4b2l17f-0FF                              \
536   pr/n+5-8b3l17f-FF                             \
537   pr/n+5a3l13f-0FF                              \
538   pr/n+6a2l17-FF                                \
539   pr/n+6b3l13f-FF                               \
540   pr/n+7l24-FF                                  \
541   pr/n+8l20-FF                                  \
542   pr/nJml24f-lmlmlo                             \
543   pr/nJml24f-lmlolm                             \
544   pr/nN1+3l24f-bl                               \
545   pr/nN15l24f-bl                                \
546   pr/nSml20-bl-FF                               \
547   pr/nSml20-t-t-FF                              \
548   pr/nSml20-t-tFFFF                             \
549   pr/nSml24-bl-FF                               \
550   pr/nSml24-t-t-FF                              \
551   pr/nSml24-t-tFFFF                             \
552   pr/nl24f-bl                                   \
553   pr/o3Jml24f-lm-lo                             \
554   pr/o3a3Sl24f-tn                               \
555   pr/o3a3Snl24f-tn                              \
556   pr/o3a3l24f-tn                                \
557   pr/o3b3Sl24f-tn                               \
558   pr/o3b3Snl24f-tn                              \
559   pr/o3b3l24f-tn                                \
560   pr/o3mSl24f-bl-tn                             \
561   pr/o3mSnl24fbltn                              \
562   pr/o3ml24f-bl-tn                              \
563   pr/t-0FF                                      \
564   pr/t-FF                                       \
565   pr/t-bl                                       \
566   pr/t-t                                        \
567   pr/tFFn                                       \
568   pr/tFFt                                       \
569   pr/tFFt-bl                                    \
570   pr/tFFt-ll                                    \
571   pr/tFFt-lm                                    \
572   pr/tFnFt                                      \
573   pr/t_notab                                    \
574   pr/t_tab                                      \
575   pr/t_tab_                                     \
576   pr/ta3-0FF                                    \
577   pr/ta3-FF                                     \
578   pr/tb3-0FF                                    \
579   pr/tb3-FF                                     \
580   pr/tn                                         \
581   pr/tn2e5o3-t_tab                              \
582   pr/tn2e8-t_tab                                \
583   pr/tn2e8o3-t_tab                              \
584   pr/tn_2e8-t_tab                               \
585   pr/tn_2e8S-t_tab                              \
586   pr/tne8-t_tab                                 \
587   pr/tne8o3-t_tab                               \
588   pr/tt-0FF                                     \
589   pr/tt-FF                                      \
590   pr/tt-bl                                      \
591   pr/tt-t                                       \
592   pr/tta3-0FF                                   \
593   pr/tta3-FF                                    \
594   pr/ttb3-0FF                                   \
595   pr/ttb3-FF                                    \
596   pr/w72l24f-ll
597
598 include $(srcdir)/check.mk