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