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