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