Commit graph

12209 commits

Author SHA1 Message Date
Samuel Tardieu
e56682893f uucore: fix style in tests
- `Path::new()` returns a `&Path` and does not need to be dereferenced
- Some types can be deduced from the context and are well visible
  already (`parse_size_u128()` or `from_bytes()`)
2024-01-05 10:14:27 +01:00
Daniel Hofstetter
2ba9501013
Merge pull request #5784 from sylvestre/cp-fail
Update a GNU test error check -  tests/cp/fail-perm.sh
2024-01-05 08:31:43 +01:00
Ikko Eltociear Ashimine
9dca071b69
Fix typo in signals.rs (#5781)
* Fix typo in signals.rs

occured -> occurred

* Remove "occurred" from spell-checker:ignore

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-01-05 07:30:23 +01:00
Dorian Péron
c58575edaa tests/ls: Add tests to ensure env var is used as a last resort 2024-01-05 02:10:33 +01:00
cre4ture
9b3cc5437c
head: head_backwards for non-seekable files like /proc/* or fifos (named pipes) (#5732)
* implement head_backwards for non-seekable files like /proc/* or pipes

Signed-off-by: Ulrich Hornung <hornunguli@gmx.de>
2024-01-05 00:25:59 +01:00
Sylvestre Ledru
932ea96cb6 Update a GNU test error check - tests/cp/fail-perm.sh 2024-01-05 00:03:12 +01:00
Sylvestre Ledru
be816027ae
Merge pull request #5782 from samueltardieu/issue-5777
fuzz: reset the exit code global variable after every test
2024-01-04 19:47:54 +01:00
Samuel Tardieu
c23dbd3166 fuzz: reset the exit code global variable after every test 2024-01-04 19:07:24 +01:00
Dorian Péron
6760d63539 ls: Fix clippy warning 2024-01-04 16:51:30 +01:00
Sylvestre Ledru
d07a2f0d86
Add new fuzzers: cut, sort, split and wc (#5760)
* fuzz: use thread to bypass the limitation of output

Closes: #5724

many thanks to @samueltardieu

* fuzz: enable seq as the stalled issue is fixed

* fuzz: add 4 more fuzzers

* fuzz: enable the 4 new fuzzers in the CI

* remove old import

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* remove comment

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* remove comment

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* add more flags

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* add space

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* add a comment about sort local

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* wrong copy/paste

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>

* fuzz: import "std::env"

---------

Co-authored-by: Daniel Hofstetter <daniel.hofstetter@42dh.com>
2024-01-04 13:40:47 +01:00
Daniel Hofstetter
b74953ab0e
Merge pull request #5779 from sylvestre/gnu-dl
gnu compare: try to use a local copy if the download failed
2024-01-04 08:19:58 +01:00
Sylvestre Ledru
217aa3bd9d gnu compare: try to use a local copy if the download failed 2024-01-03 20:42:25 +01:00
Dorian Péron
e30f191579 ls: Handle the use of QUOTING_STYLE variable 2024-01-03 18:37:51 +01:00
Sylvestre Ledru
78405e6a30
Merge pull request #5775 from cakebaker/du_ignore_duplicate_files_files0_from
du: ignore duplicate names with `--files0-from`
2024-01-03 16:49:40 +01:00
Daniel Hofstetter
f3833bb652
Merge pull request #5758 from sylvestre/fuzz-thread
fuzz: use thread to bypass the limitation of output
2024-01-03 14:47:52 +01:00
Daniel Hofstetter
244693f50e
Merge pull request #5776 from tdelmas/patch-1
META bug: moved to project mgmt
2024-01-03 11:38:53 +01:00
Tom
c9f796b694
META bug: moved to project mgmt
https://github.com/uutils/coreutils/issues/3336#issuecomment-1206292911
2024-01-03 11:24:01 +01:00
Daniel Hofstetter
442da9ac54
Merge pull request #5774 from lcheylus/bsd-scripts
Fix util shell scripts to be compatible with BSD
2024-01-03 10:45:19 +01:00
Daniel Hofstetter
e4fbc31714 du: ignore duplicate names with --files0-from 2024-01-03 09:39:16 +01:00
Daniel Hofstetter
38282b4df2
Merge pull request #5773 from sylvestre/require_root
remaining-gnu-error.py: shows when a test requires root
2024-01-03 08:02:54 +01:00
Laurent Cheylus
be58798078
DEVELOPMENT.md: on FreeBSD, install GNU coreutils package to build/run tests
Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-02 22:05:03 +01:00
Laurent Cheylus
0bc70e3ba1
CI: install GNU coreutils package for FreeBSD workflow
- util/show-utils.sh script is used by FreeBSD workflow => use realpath
    command from GNU coreutils instead of FreeBSD realpath.
  - install GNU coreutils (FreeBSD package coreutils) in style job

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-02 22:05:03 +01:00
Laurent Cheylus
13665da85e
run-gnu-test.sh: modify script to be compatible with BSD OS
- Use /usr/bin/env bash instead of /bin/sh to use OSTYPE
  - Define variables for GNU version of make, nproc, readlink and use them on BSD.

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-02 22:05:02 +01:00
Laurent Cheylus
aef204461c
util: modify scripts for code coverage to be compatible with BSD OS
- Use /usr/bin/env bash instead of /bin/sh to use OSTYPE
  - Use readlink from GNU coreutils on BSD OS in util/build-code_coverage.sh and
    util/show-code_coverage.sh scripts

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-02 22:05:02 +01:00
Laurent Cheylus
d450d5a463
show-utils.sh: modify script to be compatible with BSD OS
- Use /usr/bin/env bash instead of /bin/sh to define OSTYPE
  - Use GNU realpath on BSD OS (FreeBSD and OpenBSD)

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-02 22:05:02 +01:00
Laurent Cheylus
7aca1f932a
build-gnu.sh: modify script to be compatible with BSD OS
- Define variables for GNU version of make, nproc, readlink and sed and use them on BSD.
  - In specific cases (option -z not available on BSD and with command /c), use GNU sed instead of
    BSD sed.
  - For xargs, --no-run-if-empty option is a GNU extension. Replace it by -r to be compatible with
    FreeBSD and OpenBSD xargs command.

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-02 22:05:02 +01:00
Laurent Cheylus
6d3345cfec
util: use env to call bash in shell scripts
- For shell scripts using bash, use #!/usr/bin/env bash instead of #!/bin/bash.
    On some OS, bash is not the default shell and is not installed as /bin/bash

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-02 22:05:02 +01:00
Sylvestre Ledru
4a28b1674a remaining-gnu-error.py: shows when a test requires root 2024-01-02 20:33:21 +01:00
Sylvestre Ledru
8df064e1fa
Merge pull request #5772 from cakebaker/du_files0_from_zero_length_file_name
du: show error for nul names with `--files0-from`
2024-01-02 19:53:15 +01:00
Daniel Hofstetter
239e5426e6 du: show error for nul names with --files0-from 2024-01-02 16:06:41 +01:00
Daniel Hofstetter
9f257adf59
Merge pull request #5765 from sylvestre/handle-full
handle the error when stdout is full
2024-01-02 08:31:19 +01:00
Daniel Hofstetter
2a81c91f52
Merge pull request #5771 from sylvestre/tail-error
tail: transform FAIL into ERROR for tests/tail/inotify-rotate-resources.sh
2024-01-02 07:20:25 +01:00
Daniel Hofstetter
34c0861d96
Merge pull request #5770 from sylvestre/cp-leap-error
Workaround https://github.com/uutils/coreutils/issues/5766
2024-01-02 07:14:41 +01:00
Sylvestre Ledru
203600bb9c tail: transform FAIL into ERROR for tests/tail/inotify-rotate-resources.sh 2024-01-02 00:42:52 +01:00
Sylvestre Ledru
d640e690f4 Workaround https://github.com/uutils/coreutils/issues/5766
to transform an ERROR into FAIL
2024-01-02 00:13:20 +01:00
Sylvestre Ledru
2c73e978ba
Merge pull request #5769 from samueltardieu/is-ok-and
test: use clearer expression for CI testing
2024-01-01 22:45:37 +01:00
Samuel Tardieu
05d85618e3 test: use clearer expression for CI testing
`bool::is_ok_and()` is available in Rust 1.70.0 and above, which is compatible
with the current MSRV.
2024-01-01 21:04:13 +01:00
Sylvestre Ledru
97cb2b2de6
Merge pull request #5764 from cakebaker/mv_simplify_condition
mv: simplify condition
2024-01-01 17:45:34 +01:00
Sylvestre Ledru
f53f9b6496 handle the error when stdout is full
Avoid panic when using
seq 1 >/dev/full

Should move tests/csplit/csplit-io-err.sh from ERROR to SKIP
2024-01-01 17:00:10 +01:00
Daniel Hofstetter
01e12120c1 mv: simplify condition 2024-01-01 16:48:06 +01:00
Daniel Hofstetter
e2a90c4be9
Merge pull request #5763 from lcheylus/freebsd-docs
docs: fix URL for FreeBSD port
2024-01-01 16:40:09 +01:00
Laurent Cheylus
62b101a6c5
docs: fix URL for FreeBSD port
- FreeBSD port name is rust-coreutils, fix URL for repology.org

Signed-off-by: Laurent Cheylus <foxy@free.fr>
2024-01-01 15:56:15 +01:00
Daniel Hofstetter
7ddeba4b98 cp: show no "same file" error for --link a a 2024-01-01 14:30:27 +01:00
Sylvestre Ledru
08f51558bf fuzz: enable seq as the stalled issue is fixed 2024-01-01 13:27:01 +01:00
Sylvestre Ledru
cdd3492532 fuzz: use thread to bypass the limitation of output
Closes: #5724

many thanks to @samueltardieu
2024-01-01 13:26:56 +01:00
Sylvestre Ledru
cbf42189a2
Merge pull request #5757 from cakebaker/cp_show_same_file_error
cp: show error if source and destination are same file
2023-12-31 17:05:30 +01:00
Daniel Hofstetter
5673f32c63 cp: show error if source & dest are same file 2023-12-31 16:01:34 +01:00
Daniel Hofstetter
902a128ea8 cp: rename function
is_forbidden_copy_to_same_file -> is_forbidden_to_copy_to_same_file
2023-12-31 14:36:18 +01:00
Daniel Hofstetter
2c42623b6e cp: backup dest symlink linking to source 2023-12-31 14:09:08 +01:00
Daniel Hofstetter
89fd26c9db
Merge pull request #5756 from sylvestre/gnu-rebuilt
GNU: Improve the built
2023-12-31 14:00:05 +01:00