Terts Diepraam
5621502a95
all: remove accept_{any, complete, lossy}
and ConversionResult
...
Outside of tests, only `accept_any` was used, meaning that this unnecessarily complicated the code. The behaviour of `accept_any` is now the default (and only) option.
2022-08-17 14:57:28 +02:00
Terts Diepraam
0ed8b97a3f
uucore: remove panic encoding handling
...
We never want utilities to panic on invalid input and it is not currently in use, so it can be removed safely.
2022-08-17 14:29:53 +02:00
Owen Anderson
9fad6fde35
Fix a bug in split where chunking would be skipped when the chunk size ( #3800 )
...
* Fix a bug in split where chunking would be skipped when the chunk size
happened to be an exact divisor of the buffer size used to read the
input stream.
The issue here was that file was being split byte-wise in chunks of 1G.
The input stream was being read in chunks of 8KB, which evenly divides
the chunk size. Because the check to allocate the next output chunk was
done at the bottom of the loop previously, it would never occur because
the current input chunk was fully consumed at that point. By moving the
check to the top of the loop (but still late enough that we know we have
bytes to write) we resolve this issue.
This scenario is unfortunately hard to write a test for, since we don't
explicitly control the input chunk size.
Fixes https://github.com/uutils/coreutils/issues/3790
2022-08-16 11:02:52 +02:00
Terts Diepraam
5ecabb8467
Merge pull request #3784 from jarkonik/main
...
Use `clap::ArgAction` in `true` and `false`
2022-08-16 10:50:32 +02:00
Sylvestre Ledru
c03b3c4a18
Merge pull request #3826 from niyaznigmatullin/canonicalize_trailing_slash
...
readlink: GNU compatibility
2022-08-16 09:24:19 +02:00
Niyaz Nigmatullin
0db17196ca
readlink: follow clippy advice, add semicolon
2022-08-16 08:30:47 +03:00
Niyaz Nigmatullin
9c97b700ec
readlink: reformat using rustfmt
2022-08-16 08:25:02 +03:00
Niyaz Nigmatullin
5d4ad4de13
tests/readlink: add test for delimiters usage
2022-08-16 08:21:43 +03:00
Niyaz Nigmatullin
391143fe5b
readlink: fix -n and -z no delimiter at the end
2022-08-16 08:21:12 +03:00
Niyaz Nigmatullin
6879ed7b34
tests/readlink: refactor added tests
2022-08-15 23:33:41 +03:00
Niyaz Nigmatullin
38add34d31
tests/readlink: fix for Windows
2022-08-15 23:31:45 +03:00
Niyaz Nigmatullin
a5e0a14415
tests/readlink: fix Windows "Not a directory" error message
2022-08-15 23:04:51 +03:00
Niyaz Nigmatullin
b74e2f9d9b
tests/readlink: follow clippy advice
2022-08-15 22:48:35 +03:00
Niyaz Nigmatullin
e826ab5f0f
tests/readlink: follow clippy advice
2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin
df403334c0
tests/readlink: add spell-checker ignore
2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin
94860f8af6
tests/realpath: add trailing slash usage tests
2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin
1c6f71e0e1
tests/readlink: add tests for trailing slashes and canonicalize -e and
...
-f usages
2022-08-15 22:47:03 +03:00
Niyaz Nigmatullin
5af152be2c
uucore/fs: add Not a directory cases handling, e.g. for trailing slashes
2022-08-15 22:47:03 +03:00
Sylvestre Ledru
0ce135bd97
Merge pull request #3820 from uutils/dependabot/cargo/memmap2-0.5.6
...
build(deps): bump memmap2 from 0.5.5 to 0.5.6
2022-08-15 21:44:46 +02:00
Sylvestre Ledru
68aec6685e
Merge pull request #3823 from niyaznigmatullin/update-notify-5.0.0-pre.16
...
Update notify 5.0.0 pre.16
2022-08-15 21:44:09 +02:00
Jaroslaw Konik
710e2af5fd
Check argc instead of settings exclusive flag
2022-08-15 19:50:30 +02:00
Jaroslaw Konik
025a0dfa9e
Use clap::ArgAction in true
and false
2022-08-15 19:48:02 +02:00
Niyaz Nigmatullin
0e96cfa14b
tail: fix notify usage for new version
2022-08-15 18:11:46 +03:00
dependabot[bot]
826243bc02
build(deps): bump memmap2 from 0.5.5 to 0.5.6
...
Bumps [memmap2](https://github.com/RazrFalcon/memmap2-rs ) from 0.5.5 to 0.5.6.
- [Release notes](https://github.com/RazrFalcon/memmap2-rs/releases )
- [Changelog](https://github.com/RazrFalcon/memmap2-rs/blob/master/CHANGELOG.md )
- [Commits](https://github.com/RazrFalcon/memmap2-rs/compare/v0.5.5...v0.5.6 )
---
updated-dependencies:
- dependency-name: memmap2
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 11:42:35 +00:00
dependabot[bot]
ade3b7540c
build(deps): bump notify from 5.0.0-pre.15 to 5.0.0-pre.16
...
Bumps [notify](https://github.com/notify-rs/notify ) from 5.0.0-pre.15 to 5.0.0-pre.16.
- [Release notes](https://github.com/notify-rs/notify/releases )
- [Changelog](https://github.com/notify-rs/notify/blob/main/CHANGELOG.md )
- [Commits](https://github.com/notify-rs/notify/compare/5.0.0-pre.15...notify-5.0.0-pre.16 )
---
updated-dependencies:
- dependency-name: notify
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-15 11:42:17 +00:00
Sylvestre Ledru
c401b35fdd
dependabot: allow 10 PR
2022-08-15 13:39:37 +02:00
5225225
c7b988c825
uutils: Remove use of mem::uninitialized ( #3808 )
2022-08-15 10:10:50 +02:00
Przemysław Fuchs
e2bab1d515
mv: fix error when moving directory to itself ( #3809 )
2022-08-15 10:10:04 +02:00
Terts Diepraam
4434b7d357
Merge pull request #3816 from sylvestre/fix-3815
...
sha1sum: fix the -c usage (Closes : #3815 )
2022-08-15 09:55:49 +02:00
Sylvestre Ledru
00f5d91886
sha1sum: fix the -c usage ( Closes : #3815 )
2022-08-14 23:32:46 +02:00
Sylvestre Ledru
2870fb091b
remaining-gnu-error.py: separate FAIL from ERROR/SKIP
2022-08-14 22:23:23 +02:00
Sylvestre Ledru
56c8ab8b17
Document how to run a perl test in debug mode
2022-08-14 21:19:24 +02:00
Sylvestre Ledru
38a64bdc2e
Merge pull request #3706 from anastygnome/tail_refactor
...
Rework tail plateform module to tackle #2873
2022-08-14 17:53:23 +02:00
Sylvestre Ledru
ae8b6706e2
Merge pull request #3793 from uutils/dependabot/cargo/thiserror-1.0.32
...
build(deps): bump thiserror from 1.0.31 to 1.0.32
2022-08-14 17:52:09 +02:00
anastygnome
1596f802f5
Rework tail plateform module in light of #2873
...
Optimize tail plateform module using the libc::stdin fd constant.
Commenting out `is_bad_symlink` as #2873 will not be fixed for the time being.
2022-08-14 13:30:57 +02:00
dependabot[bot]
abd4c066c9
build(deps): bump thiserror from 1.0.31 to 1.0.32
...
Bumps [thiserror](https://github.com/dtolnay/thiserror ) from 1.0.31 to 1.0.32.
- [Release notes](https://github.com/dtolnay/thiserror/releases )
- [Commits](https://github.com/dtolnay/thiserror/compare/1.0.31...1.0.32 )
---
updated-dependencies:
- dependency-name: thiserror
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2022-08-14 13:28:03 +02:00
Sylvestre Ledru
c8aa5bcbd7
reformat python code with black
2022-08-14 12:45:51 +02:00
Jan Scheer
5258dec9a8
tail: fix race condition ( #3798 )
...
* tail: fix race condition (fix #3765 )
There exists a race condition (RC) that can occur if changes to a path
happen after the initial print loop in `uu_tail()`, but before the
path is added to the notify-Watcher thread in `follow()`.
To minimize the window where the RC can occur, this moves starting the
Watcher thread and adding paths to it from `follow()` to the initial
print loop in `uu_tail()`.
Additionally, to make sure the RC cannot happen in
"gnu/tests/tail-2/F-headers.sh", the error message that is used as a trigger
in this test, is delayed until the path is added to the Watcher thread.
* build-gnu: remove workarounds for tail
Remove workarounds for "tests/tail-2/F-headers.sh" which are
(presumably) no longer needed because of the race condition fix.
* build-gnu: remove workarounds for tail
Remove workarounds for "tests/tail-2/F-headers.sh" which are
(presumably) no longer needed because of the race condition fix.
* tail: refactor to minimize chances of RC
Move "adding paths to Watcher thread" to its own loop and run this loop
before the initial tail-print-loop in order to minimize the window for
race conditions.
2022-08-14 01:01:15 +02:00
Sylvestre Ledru
97a77e93cf
Merge pull request #3807 from devnexen/netbsd_bbuild_fix
...
Netbsd / OpenBSD build fix
2022-08-13 20:39:59 +02:00
Sylvestre Ledru
9ad582a7e7
Merge pull request #3806 from jhscheer/fix_3778
...
tests: ignore failing tests for FreeBSD (#3778 )
2022-08-13 18:28:41 +02:00
David Carlier
b5bb070777
while at it, let's do OpenBSD.
2022-08-13 10:21:30 +01:00
Jan Scheer
391709c911
tests: ignore failing tests for FreeBSD ( #3778 )
2022-08-13 10:09:05 +02:00
David Carlier
36561c9526
uucore fix NetBSD build.
2022-08-13 08:24:45 +01:00
Sylvestre Ledru
fc14c6e7a9
Merge pull request #3805 from cakebaker/clippy_deriving_eq
...
Fix clippy warnings with Rust 1.63
2022-08-12 17:48:42 +02:00
Daniel Hofstetter
fcb7185279
Disable "broken intra doc links" lint
2022-08-12 14:48:59 +02:00
Daniel Hofstetter
689000576b
du: remove useless transmute to fix clippy warning
2022-08-12 10:56:13 +02:00
Daniel Hofstetter
898914b6fb
touch: remove transmute to fix clippy warning
2022-08-12 10:54:59 +02:00
Daniel Hofstetter
dd19f85d2b
Fix clippy warnings in tests
2022-08-12 09:45:16 +02:00
Daniel Hofstetter
bfa6e23166
numfmt: implement Eq to fix clippy warning
2022-08-12 07:49:05 +02:00
Sylvestre Ledru
0f1b98c259
Merge pull request #3804 from cakebaker/clap_replace_deprecated_values_of
...
Replace deprecated values_of() with get_many()
2022-08-11 15:08:25 +02:00