Will Shuttleworth
61bd11a551
stty: set control characters ( #7931 )
...
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (push) Waiting to run
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
* reworked arg processing. control character mappings are correctly grouped now, ie 'stty erase ^H'
* stty: setting control chars to undefined (disabling them) is implemented
* setting control chars
* stty: can now set control chars. need to improve checks on valid mappings
* stty: matches GNU in what control character mappings are allowed
* stty: run rustfmt and remove extra comments
* stty: setting control char code review fixes
* stty: fix rustfmt errors
* stty: more small edits after review
* stty: refactor set control char changes for better testing
* stty: fix ci error
* stty: fix issues from code review
2025-06-05 11:38:51 +02:00
Daniel Hofstetter
ccc6233fba
Merge pull request #8054 from sylvestre/locale3
...
l10n: convert the md files to fluent
2025-06-05 09:39:42 +02:00
Sylvestre Ledru
d9f0868a45
l10n: Adjust a test, I don't think we need to full path with 'usage'
2025-06-04 19:24:03 +02:00
ALBIN BABU VARGHESE
a7a493a604
mv: moving dangling symlinks into directories ( #8064 )
...
CICD / Style/cargo-deny (push) Waiting to run
CICD / Build/nightly (push) Blocked by required conditions
CICD / Style/deps (push) Waiting to run
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Build (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (push) Waiting to run
Android / Test builds (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
* Fix linting and style issues
* Change condition to not fail for dangling symlinks
The function `move_files_into_dir` had a condition that failed when a
dangling symlink was moved into a folder, which resulted in a file
or directory doesn't exist error
* Added a test case
2025-06-04 17:25:53 +02:00
Daniel Hofstetter
3904d5b614
uptime: move imports into test function
...
to simplify the cfg handling
2025-06-03 16:12:52 +02:00
Dylan Ullrich
862565cd1a
Merge pull request #8047 from eldyl/feat/add_wezterm_to_terms
...
Feat/add wezterm to terms
2025-06-03 07:54:05 +02:00
Sylvestre Ledru
b5d4b0ee1d
Merge pull request #7972 from Ecordonnier/eco/stdbuf-regression-test
...
CICD / Build (push) Blocked by required conditions
CICD / Style/cargo-deny (push) Waiting to run
CICD / Style/deps (push) Waiting to run
CICD / Test all features separately (push) Blocked by required conditions
CICD / Documentation/warnings (push) Waiting to run
CICD / MinRustV (push) Waiting to run
CICD / Dependencies (push) Waiting to run
CICD / Build/Makefile (push) Blocked by required conditions
CICD / Build/stable (push) Blocked by required conditions
CICD / Build/nightly (push) Blocked by required conditions
CICD / Binary sizes (push) Blocked by required conditions
CICD / Tests/BusyBox test suite (push) Blocked by required conditions
CICD / Tests/Toybox test suite (push) Blocked by required conditions
CICD / Code Coverage (push) Waiting to run
CICD / Separate Builds (push) Waiting to run
CICD / Build/SELinux (push) Blocked by required conditions
GnuTests / Run GNU tests (push) Waiting to run
Android / Test builds (push) Waiting to run
Code Quality / Style/Python (push) Waiting to run
Code Quality / Style/format (push) Waiting to run
Code Quality / Style/toml (push) Waiting to run
Code Quality / Style/lint (push) Waiting to run
Code Quality / Style/spelling (push) Waiting to run
FreeBSD / Style and Lint (push) Waiting to run
FreeBSD / Tests (push) Waiting to run
stdbuf: fix cross-compilation
2025-06-02 13:26:38 +02:00
Charlie-Zheng
b2893db5a4
sort: Implement the last changes to make sort-files0-from pass ( #8011 )
2025-06-02 11:14:49 +02:00
Etienne Cordonnier
35634b46a0
stdbuf: fix cross-compilation
...
Summary:
Partial fix for https://github.com/uutils/coreutils/issues/6591
The current code declare libstdbuf as a build-dependency of stdbuf as a
workaround to enforce that libstdbuf is compiled before stdbuf. This breaks
cross-compilation, because build-dependencies were compiled for the host
architecture, and not for the target architecture.
The reason this workaround is necessary is that bindeps is available only in nightly at the moment:
https://rust-lang.github.io/rfcs/3028-cargo-binary-dependencies.html
This commit replaces the "build-dependency" workaround with another workaround:
calling cargo manually to build libstdbuf in the build.rs of stdbuf, in order to ensure that libstdbuf is built before stdbuf.
Changes:
- Removed cpp/cpp_build dependencies:
The cpp, cpp_build, and related dependencies were removed because they made cross-compilation in a build.rs file very complex, since you need
to pass proper CXX env variables for cross-compilation, whereas cross-compiling rust code using cargo is quite simple.
Provided Rust implementations for getting stdin, stdout, and stderr pointers.
Switched from C++/cpp macro-based initialization to using the Rust ctor crate for library initialization.
- Remove "feat_require_crate_cpp" which is not needed any more, since stdbuf was the only utility using the cpp crate.
Tests:
This commit fixes e.g. this test:
cross test --target aarch64-unknown-linux-gnu --features stdbuf test_stdbuf::test_libstdbuf_preload -- --nocapture
- The "i686" build of stdbuf was also broken (stdbuf 32 bits, but libstdbuf 64 bits) and test_stdbuf::test_libstdbuf_preload of the i686 builds in github CI serves as regression
test for this issue, no need to add a cross-rs test for aarch64.
- The x86_64 musl build of stdbuf was also broken and was passing tests in CI only because it was compiled with the wrong libc (glibc instead of musl)
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-06-02 10:55:57 +02:00
Etienne Cordonnier
2e8b6fabcc
stdbuf: add test_libstdbuf_preload
...
This test verifies that libstdbuf correctly gets preloaded, and that there are no architecture mismatch errors.
At the moment the test passes when compiled normally, but fails when compiled with cross-rs, due to https://github.com/uutils/coreutils/issues/6591
This passes:
```
cargo test --features stdbuf test_stdbuf::test_libstdbuf_preload -- --nocapture
```
This fails:
```
cross test --target aarch64-unknown-linux-gnu --features stdbuf test_stdbuf::test_libstdbuf_preload -- --nocapture
```
Signed-off-by: Etienne Cordonnier <ecordonnier@snap.com>
2025-06-02 10:52:32 +02:00
Daniel Hofstetter
546e50846e
cp: rewrite test to remove procfs dependency
2025-06-02 09:51:33 +02:00
Daniel Hofstetter
dfc2e249ef
Merge pull request #7894 from drinkcat/jiff-date-ls
...
date/ls: Switch from chrono to jiff
2025-06-02 09:36:27 +02:00
Nicolas Boichat
66d1e8a872
test_date: Expand on test_date_utc_time
...
Using the current time requires a bit of care, but it's nice
to have a test that doesn't use a fixed date as input.
2025-06-01 20:04:22 +02:00
Dorian Péron
1baedc417b
ln: don't show error when overwriting a link with -sfn ( #7449 )
...
GnuTests / Run GNU tests (push) Has been cancelled
Android / Test builds (push) Has been cancelled
CICD / Style/cargo-deny (push) Has been cancelled
CICD / Style/deps (push) Has been cancelled
CICD / Documentation/warnings (push) Has been cancelled
CICD / MinRustV (push) Has been cancelled
CICD / Dependencies (push) Has been cancelled
CICD / Code Coverage (push) Has been cancelled
CICD / Separate Builds (push) Has been cancelled
Code Quality / Style/format (push) Has been cancelled
Code Quality / Style/lint (push) Has been cancelled
Code Quality / Style/spelling (push) Has been cancelled
Code Quality / Style/toml (push) Has been cancelled
Code Quality / Style/Python (push) Has been cancelled
FreeBSD / Style and Lint (push) Has been cancelled
FreeBSD / Tests (push) Has been cancelled
CICD / Test all features separately (push) Has been cancelled
CICD / Build/Makefile (push) Has been cancelled
CICD / Build/stable (push) Has been cancelled
CICD / Build/nightly (push) Has been cancelled
CICD / Binary sizes (push) Has been cancelled
CICD / Build (push) Has been cancelled
CICD / Tests/BusyBox test suite (push) Has been cancelled
CICD / Tests/Toybox test suite (push) Has been cancelled
CICD / Build/SELinux (push) Has been cancelled
* ln: fix #6350
* test(ln): test_symlink_no_deref_dir success has no stderr
2025-05-30 16:29:43 +02:00
Nicolas Boichat
dadda0dd6a
test_date: Extend coverage to a lot more timezones
...
Also test %z/%Z formats.
2025-05-29 14:00:25 +02:00
Jadi
d1525e2d2e
date: Add more TZ tests
...
[drinkcat: separated test changes]
2025-05-29 14:00:25 +02:00
Daniel Hofstetter
d5b6af5216
csplit: only allow ASCII digits as offset
2025-05-28 16:07:45 +02:00
Daniel Hofstetter
7439050d85
csplit: only allow ASCII digits for repeat pattern
2025-05-28 15:53:54 +02:00
Teemu Pätsi
4946922c0f
expr: Fix error message for large numbers as range index
2025-05-27 17:28:19 +03:00
Teemu Pätsi
07caa4867b
expr: Fix error message for too big range quantifier index
2025-05-27 14:06:15 +03:00
Teemu Pätsi
b1a91351bc
expr: Ignore test cases from spell checker
2025-05-27 04:34:38 +03:00
Teemu Pätsi
bbc912eb75
expr: Add tests for regex range quantifiers
2025-05-27 04:26:37 +03:00
Teemu Pätsi
aae62072d8
expr: Fix parsing range quantifiers in regex
2025-05-26 15:59:35 +03:00
Sylvestre Ledru
be77e142aa
Merge pull request #7991 from RenjiSann/sort-multiple-outputs
...
sort: prevent -o/--output to be specified multiple times
2025-05-26 08:10:49 +02:00
Dorian Peron
3b4226c48c
sort: prevent -o/--output to be specified multiple times
2025-05-25 23:43:48 +02:00
Sylvestre Ledru
c992ce5507
Merge pull request #7948 from BenWiederhake/dev-shred-random-source
...
shred: implement and test feature --random-source
2025-05-25 22:58:18 +02:00
Teemu Pätsi
63ce37cf6e
expr: Refactor regex tests into multiple targeted functions
2025-05-24 11:17:39 +03:00
Teemu Pätsi
b0390fe36e
expr: Handle $ at the beginning of the regex pattern
2025-05-24 01:47:35 +03:00
Teemu Pätsi
4555e6fe48
expr: Handle trailing backslash error
2025-05-24 01:47:30 +03:00
Dorian Péron
cd9ce77098
Merge pull request #7953 from frendsick/fix/expr-regex-anchors
...
expr: Fix parsing regex anchors '^' and '$'
2025-05-23 15:16:28 +02:00
Teemu Pätsi
29332865a9
expr: Handle special cases for $ in regex
...
Enable fixed test `test_bre11`
2025-05-23 15:29:55 +03:00
Teemu Pätsi
f664578a4b
expr: Handle special cases for ^ in regex
2025-05-23 15:23:21 +03:00
Daniel Hofstetter
73e447224c
Adapt to API changes in nix
2025-05-23 09:24:46 +02:00
Sylvestre Ledru
38861cc767
selinux: add support for install
2025-05-21 09:51:27 +02:00
Daniel Hofstetter
147027022a
Merge pull request #7940 from Qelxiros/7671-timeout-tests
...
timeout: add hex parsing test
2025-05-20 10:39:56 +02:00
Sylvestre Ledru
0c7a5d25f2
Merge pull request #7943 from cakebaker/du_fix_never_used_warning_in_test
...
du: fix "function never used" warning in test
2025-05-20 09:44:33 +02:00
Jeremy Smart
384878b5df
add timeout test for hex parsing
2025-05-19 11:18:18 +02:00
Daniel Hofstetter
7f70bfad30
du: fix "function never used" warning in test
2025-05-19 11:18:02 +02:00
Ben Wiederhake
5a8fad8443
shred: implement and test feature --random-source
2025-05-19 11:17:55 +02:00
Ben Wiederhake
0011b6e3f7
run cargo fmt on missed files
...
It seems these files were missed by CI. Command to run cargo fmt on
absolutely *everything* (and possibly too much)
find tests -name "*.rs" -print0 | xargs -0 cargo fmt --
2025-05-19 11:17:46 +02:00
Daniel Hofstetter
8674e86703
cp: fix warnings from unnecessary_debug_formatting
...
Co-authored-by: Jeremy Smart <jeremy3141592@gmail.com>
2025-05-19 09:54:37 +02:00
Aaron Ang
c8c4f525a2
test_more: use at_and_ucmd helper macro
2025-05-18 21:09:48 +02:00
Daniel Hofstetter
0c53409857
split: delegate to avoid code duplication in test
2025-05-12 10:55:50 +02:00
Daniel Hofstetter
ad9a87118c
split: merge imports in test
2025-05-12 10:52:13 +02:00
Sylvestre Ledru
6091d0b62b
selinux: use the uucore::selinux::is_selinux_enabled() function
2025-05-11 09:36:15 +02:00
Sylvestre Ledru
45b0c39ed7
Merge pull request #7892 from cakebaker/uptime_refactor_uumain
...
uptime: refactor `uumain`
2025-05-09 22:11:44 +02:00
Daniel Hofstetter
7c865b29a1
Merge pull request #7898 from sylvestre/selinux-err
...
selinux: get closer to the GNU error msgs
2025-05-09 13:35:29 +02:00
Jeremy Smart
a752f73476
csplit: don't add a newline if the file doesn't end with one ( #7901 )
...
* csplit: don't add a newline if the file doesn't end with one
* refactor test
* refactor
2025-05-09 09:15:54 +02:00
Sylvestre Ledru
832dd495bf
selinux: adjust more error messages
2025-05-07 22:58:46 +02:00
Daniel Hofstetter
bcc02e9cea
Merge pull request #7897 from aaron-ang/ptx-panic
...
ptx: use char count instead of byte index to handle utf-8 characters
2025-05-07 15:52:13 +02:00