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