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