Commit graph

2123 commits

Author SHA1 Message Date
Sylvestre Ledru
97dd4824e5
Merge pull request #3976 from andrewbaptist/implement_suffix_start
Add support for starting suffix numbers
2022-10-07 21:07:07 +02:00
Sylvestre Ledru
97f3dfad54
Merge pull request #3965 from Joining7943/fix-windows-pipe
`tests/tail`: Fix tests to reflect changes from the refactoring #3905
2022-10-06 11:17:25 +02:00
Jeffrey Finkelstein
8bfd96fb59 cp: correct error message on copying dir to itself
Correct the error message produced when attempting to copy a directory
into itself with `cp`. Before this commit, the error message was

    $ cp -R d d
    cp: cannot copy a directory, 'd', into itself, 'd'

After this commit, the error message is

    $ cp -R d d
    cp: cannot copy a directory, 'd', into itself, 'd/d'
2022-10-05 21:37:30 -04:00
Sylvestre Ledru
490aa75553
Merge pull request #4001 from tertsdiepraam/tests-not-via-build-rs
tests: do not generate module structure in `build.rs`
2022-10-05 21:04:43 +02:00
Sylvestre Ledru
ae7c45d27a
Merge pull request #3988 from dmatos2012/add-date-format-ls
ls: add support for +FORMAT in timestyle
2022-10-05 18:41:15 +02:00
Andrew Baptist
49e1cc6c71 Add support for starting suffix numbers
This commit now allows split to pass split/numeric.sh
2022-10-05 09:52:20 -04:00
Pat Laster
493a2628d2
rm: Added descend messages for interactive mode Fixes #3817 (#3931)
Co-authored-by: Terts Diepraam <terts.diepraam@gmail.com>
2022-10-05 13:35:31 +02:00
Joining7943
1725151ef8 tests/tail: Fix tests to reflect changes from the refactoring #3905 2022-10-05 13:32:35 +02:00
Terts Diepraam
adf4bab03c tests: do not generate module structure in build.rs
Generating the tests to run in build.rs created problems for tooling. For example, cargo fmt, was ignoring the test_*.rs files and needed to be passed these files manually to be formatted. Now we simply use the feature mechanism to decide which tests to run.
2022-10-05 13:30:22 +02:00
David Matos
b8a5588b81 ls: add support for +FORMAT in timestyle 2022-10-05 13:29:19 +02:00
Sylvestre Ledru
858b2a5b99 disable the new tests 2022-10-04 17:24:06 +02:00
Sylvestre Ledru
3cda177d34 Disable test_preference_of_userspec on android 2022-10-04 17:17:01 +02:00
Sylvestre Ledru
8478570c04 Disable test_when_piped_input_then_no_broken_pipe by default
It is blocking the executions of the tests and I suspect it is breaking android
2022-10-04 17:17:01 +02:00
Terts Diepraam
25db814671
Merge pull request #4002 from sylvestre/cmd-test
test: add a bunch of operations
2022-10-04 12:00:00 +02:00
Sylvestre Ledru
33de6c89db test: allow parsing of bigger numbers
Fixes: tests/misc/test.pl
2022-10-03 20:25:45 +02:00
Sylvestre Ledru
f0b8b33dc1 test: add support for -ef, -nt & -ot 2022-10-03 20:25:42 +02:00
Emil Suleymanov
a7b637b1eb
cp: assume --reflink=always on no value (#3992)
* Set reflink to auto by default
2022-10-03 20:20:55 +02:00
Sylvestre Ledru
63203a0a68 test: add -N FILE exists and has been modified since it was last read
Upstream: tests/misc/test-N.sh
2022-10-03 00:59:39 -10:00
Terts Diepraam
4b517a361d
Merge pull request #3959 from Joining7943/tail-reactivate-presume-input-pipe
tail: Reactivate ---presume-input-pipe option
2022-09-28 00:09:18 +02:00
Terts Diepraam
a3ba02a791
Merge pull request #3971 from niyaznigmatullin/cp_H_option
cp: add `-H` option
2022-09-25 15:16:37 +02:00
Terts Diepraam
9ce600ffa8
Merge pull request #3904 from cakebaker/pr_use_clap_for_help_and_version
pr: use clap to handle help & version
2022-09-25 14:10:00 +02:00
Niyaz Nigmatullin
84a741fe91 cp: add -H option, add tests, fix test 2022-09-23 20:31:24 +03:00
jfinkels
dd0daa5e06
df: remove trailing spaces in rightmost column (#3882)
Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2022-09-22 08:37:20 +02:00
Jeffrey Finkelstein
60ca9a03bb mktemp: add message for directory not found
Add special handling in `mktemp` for when the directory that will
contain the temporary file is not found. This situation now produces
the message

    mktemp: failed to create file via template 'XXX': No such file or directory

to match the behavior of GNU mktemp.
2022-09-21 21:26:39 -04:00
Sylvestre Ledru
68ad9e4301
Merge pull request #3951 from jfinkels/mktemp-too-many-templates
mktemp: match GNU error message on too many args
2022-09-21 22:39:55 +02:00
Sylvestre Ledru
5a746a778f
Merge pull request #3938 from tertsdiepraam/dd-positional-args
`dd`: parse operands manually via positional args
2022-09-21 22:39:13 +02:00
Sylvestre Ledru
69b52b4a1b chroot: add a new test to verify that 'chroot / ls -al' works 2022-09-21 19:47:01 +02:00
Sylvestre Ledru
2e26e1d2bd chroot: implement --skip-chdir 2022-09-21 19:46:58 +02:00
Terts Diepraam
e377e4f046 dd: custom positional argument parsing 2022-09-21 18:41:12 +02:00
Joining7943
c32d61dcfb tests/tail: Add system tests for ---presume-input-pipe 2022-09-21 16:39:52 +02:00
Sylvestre Ledru
3654efe8e7 chroot: add more tests 2022-09-21 14:53:50 +02:00
Jeffrey Finkelstein
7b35749ea6 mktemp: match GNU error message on too many args
Update the usage message when too many template arguments are given on
the command line to match that of GNU mktemp:

    mktemp: too many templates
    Try 'mktemp --help' for more information.

This fixes the test case `too-many` in the GNU test suite file
`tests/misc/mktemp.pl`.
2022-09-21 10:02:56 +02:00
Sylvestre Ledru
a857002def
Merge pull request #3949 from niyaznigmatullin/cp-i_gnu_test
cp: fix `cp-i` GNU test
2022-09-18 22:06:12 +02:00
Terts Diepraam
8c839888e1
Merge pull request #3905 from Joining7943/refactor-tail
Refactor tail
2022-09-17 20:39:53 +02:00
Niyaz Nigmatullin
2ce999c959 cp: fix cp-i GNU test
`cp` in interactive mode used to write to stdout asking for
overwrite. GNU version writes to stderr.

Changed: write to stderr to make compatible with GNU.
2022-09-17 19:15:52 +03:00
Jeffrey Finkelstein
61345cbdc9 mktemp: respect TMPDIR environment variable
Change `mktemp` so that it respects the value of the `TMPDIR`
environment variable if no directory is otherwise specified in its
arguments. For example, before this commit

    $ TMPDIR=. mktemp
    /tmp/tmp.WDJ66MaS1T

After this commit,

    $ TMPDIR=. mktemp
    ./tmp.h96VZBhv8P

This matches the behavior of GNU `mktemp`.
2022-09-13 19:38:25 -04:00
Joining7943
951c51e740 tail: large refactoring and cleanup of the tail code base. See also #3905 for details 2022-09-13 22:54:36 +02:00
Sylvestre Ledru
78a9f6edf8
Merge pull request #3908 from tertsdiepraam/chroot-err-codes
`chroot`: set exit codes to 125, 126 or 127 for errors from chroot itself
2022-09-12 22:43:12 +02:00
Sylvestre Ledru
b44cf9cde9
Merge pull request #3910 from Joining7943/3895-fix-broken-pipe-error-in-utils
fix broken pipe error in tests/common/util
2022-09-12 22:42:36 +02:00
Niyaz Nigmatullin
8bd9427d0d tests/ls: added exit code to some test failures 2022-09-12 19:47:16 +03:00
Daniel Hofstetter
ebbf8ade1e pr: use clap to handle help & version 2022-09-12 15:28:08 +02:00
Terts Diepraam
51bd8a2ba8 chroot: set exit codes to 125, 126 or 127 for errors from chroot itself 2022-09-11 12:02:54 +02:00
Terts Diepraam
9177cb7b24 all: add tests for usage error exit code 2022-09-10 20:59:42 +02:00
Joining7943
795ab1fb7e tests/common/util: Fix #3895 broken pipe error when using pipep input in UCommand 2022-09-10 11:10:53 +02:00
Joining7943
e860eb899e tests/common/util: Add test which provokes the broken pipe error 2022-09-10 11:10:53 +02:00
Niyaz Nigmatullin
999db68042 pr: migrate from chrono crate to time
It seems that `chrono` is the reason of deadlock or UB in android
CI. Also `chrono` had some security issues and wasn't maintained for
two years until March 2022, so other unstabilities can happen. Plus
`chrono` uses old `time` dependency.
2022-09-09 21:59:08 +03:00
Niyaz Nigmatullin
0d6383dd19 test_cp: comment out bad syscall failing piece of code for Android 2022-09-09 16:12:05 +03:00
Joining7943
2658f8ae5b tail: improve performance of piped stdin
Rewrite handling of stdin when it is piped and read input in chunks.

Fixes https://github.com/uutils/coreutils/issues/3842
2022-09-09 13:51:37 +02:00
Sylvestre Ledru
a8d1d73465 fix a test on cp counting the number of fd:
The testsuite runs in parallel, we have pipe, sockets
opened by other tests.
So, we take in account the various fd to increase the limit
2022-09-07 21:26:03 +02:00
Jan Scheer
88d3aee71c tail: fix offset for stdin redirect if multiple input files 2022-09-05 10:09:04 +02:00