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