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