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