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