Commit graph

9206 commits

Author SHA1 Message Date
Daniel Hofstetter
f6b646e4e5 clippy: fix warnings introduced with Rust 1.67.0 2023-01-27 17:37:56 +01:00
Terts Diepraam
fc7e51a4f8
Merge pull request #4261 from Joining7943/tests-util-enhance-cmdresult
`tests/util`: Implement enhancements of `CmdResult` #4259
2023-01-25 10:06:32 +01:00
Sylvestre Ledru
dce8a021da
Merge pull request #4299 from Joining7943/fix-4298-build-fails-on-s390x-and-risc64
`uucore`: Fix #4298: Fails to build on s390x (and riscv64)
2023-01-24 11:47:20 +01:00
Joining7943
9796e70a28 uucore: Fix #4298: Build on s390x and riscv64 architectures fails 2023-01-23 21:13:59 +01:00
Terts Diepraam
8c35465e03
Merge pull request #4265 from sylvestre/add_test_test
test: add a test matching what busybox is doing
2023-01-22 23:42:54 +01:00
Sylvestre Ledru
2df4aaccd9
Merge pull request #4263 from cakebaker/od_cleanup_format_strings
od: remove "width = width" from format strings
2023-01-22 21:32:59 +01:00
Sylvestre Ledru
c996dc8bac
Merge pull request #4292 from rivy/maint.cicd
CICD maintainence
2023-01-22 20:57:55 +01:00
Sylvestre Ledru
6f95f0953b
Merge pull request #4271 from eds-collabora/eds/nice
Support legacy argument syntax for nice
2023-01-22 20:57:08 +01:00
Joining7943
78a381032b tests/util: Improve assertion messages of CmdResult::stderr_is_bytes, stdout_is_bytes 2023-01-22 14:56:19 +01:00
Joining7943
1fadeb43b2 tests/util: Do not trim stderr in CmdResult::stderr_is. Add method stderr_trimmed_is.
Fix tests assert whitespace instead of trimming it. Disable some tests in `test_tr` because `tr`
produces too many newlines.
2023-01-22 14:56:19 +01:00
Joining7943
7c0ed0340b tests/util: Add stdout_check, stdout_str_check ... to CmdResult to run arbitrary assertions 2023-01-22 14:56:19 +01:00
Joining7943
c2ad54fe09 tests/util: Add methods in CmdResult to assert the received signal on unix systems
Add tests for these signal methods. Include `signals` feature in Cargo.toml uucore dev-dependencies.
2023-01-22 14:56:19 +01:00
Joining7943
19db042022 tests/util: Use ExitStatus instead of code, success in CmdResult. Rewrite tests for CmdResult 2023-01-22 14:48:23 +01:00
Joining7943
37e06edadc tests/util: Introduce CmdResult::stdout_str_apply ... to preprocess stdout, stderr before asserting 2023-01-22 14:48:23 +01:00
Roy Ivy III
9b440dfab6 maint/CICD ~ refactor var names 2023-01-21 23:39:05 -06:00
Roy Ivy III
f4086f237f maint/CICD ~ re-label bash script steps for easier review 2023-01-21 23:39:05 -06:00
Roy Ivy III
6f5f3736ce docs ~ update spell-checker exceptions 2023-01-21 23:39:05 -06:00
Roy Ivy III
f0ce605f4b maint/CICD ~ improve/update outputs() function 2023-01-21 23:39:05 -06:00
Roy Ivy III
0b4ef62eed maint/CICD ~ refactor to standard use of outputs() 2023-01-21 23:39:05 -06:00
Roy Ivy III
80a9eaf8ab maint/CICD ~ normalize to use expanded 10 digit SHAs 2023-01-21 23:39:05 -06:00
Roy Ivy III
3977ef608e
Merge pull request #4287 from tertsdiepraam/fix-publish-script
util: fix publish order of uucore_procs and uucore
2023-01-21 23:37:52 -06:00
Roy Ivy III
ea3c83e273
Merge pull request #4290 from sylvestre/platform-info
uname: use the same version of platform-info as arch
2023-01-21 20:40:36 -06:00
Sylvestre Ledru
f30124e497 uname: use the same version of platform-info as arch 2023-01-21 23:24:53 +01:00
Terts Diepraam
a9f1743ba6 util: fix publish order of uucore_procs and uucore 2023-01-21 13:00:49 +01:00
Terts Diepraam
7e127005af
Merge pull request #4284 from tertsdiepraam/version-0.0.17
Version 0.0.17
2023-01-21 12:11:22 +01:00
Terts Diepraam
4d3dc78686 Version 0.0.17 2023-01-21 10:38:18 +01:00
Emil Suleymanov
50c1833c11
cp: require preserve only certain attributes (#4099)
* cp: require preserve only certain attributes

# Conflicts:
#	src/uu/cp/src/copydir.rs
#	src/uu/cp/src/cp.rs

* tests/cp: preserve all and preserve xattr tests with todos

* tests/cp: rename preserve tests

* tests/cp: add android fail test for preserve=xattr

On Android, this cp with explicit preserve of xattr must fail, because of the limitations of the filesystem setup used on Android.

* cp: verify some metadata in cp preserve tests

# Conflicts:
#	tests/by-util/test_cp.rs

* cp: run test_cp_preserve_all in all OS's but only check metadata on linux

* test/cp: don't expect the mode to change in explicit cp preserve

* cp: attributes struct instead of enum for unified required tracking

* cp: refactor preserver and handle_preserve

# Conflicts:
#	src/uu/cp/src/cp.rs

* cp: update preserve attr to max

* test/cp: fix the preserve xattr test

Access timestamps appear to be modified only in this test. Running the command directly does not alter the access timestamp.

* cp/test: preserve all and context case

* cp: fix preserve args value source

* test/cp: don't check mtime on freebsd

* test/cp: don't check mtime on macos

* test/cp: fix freebsd deps

* test/cp: support freebsd tests

* cp: simplify try_set_from_string

* cp: parse context attr in preserve in any case to show warning later

* cp: print warnings for attribute errors if not required

* cp: show SELinux warning only once

* cp: show SELinux warning without error

* Revert "cp: show SELinux warning without error"

This reverts commit d130cf0d8c8e28ac2c903413992613241decf879.

* cp: add documentation for preserve components

* cp: simplify try_set_from_string

* cp: EN_US "behavior" spelling for cspell
2023-01-19 13:02:06 +01:00
Ed Smith
34e10f9aa8 nice: Remove use of show_warning
This is required to pass the GNU nice test suite. Failure to produce
the advisory message when unable to change the process priority must
be fatal, and without this commit our version of nice will exit, but
before the commit the exit code will be 101 (due to eprintln!
panicking), and it must be 125 to pass the test suite.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Ed Smith
07e7372311 nice: Permit --adjustment to be specified multiple times
This is tested by the GNU coreutils test suite, and the
correct behaviour is the last specification wins.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Ed Smith
8aa9f346ef Support legacy argument syntax for nice
This introduces an argument preprocessing step for the nice tool in
order to support the legacy nice adjustment syntax (`nice -1 foo`,
`nice --1 foo`, `nice -+1 foo` and so forth).

This is a preprocessing step because the interaction between these
arguments and the existing `nice -n -1` syntax becomes context
dependent, in a way that is currently difficult to capture through
clap.

Signed-off-by: Ed Smith <ed.smith@collabora.com>
2023-01-18 11:44:41 +01:00
Sylvestre Ledru
8c137f5d7c
Merge pull request #4278 from cakebaker/sum
sum: fix output when using BSD sum algo (-r)
2023-01-18 11:33:41 +01:00
Sylvestre Ledru
afbe850115
Merge pull request #4279 from rivy/up.uname
change/uname ~ update and revise
2023-01-18 11:33:29 +01:00
Sylvestre Ledru
f12202e39c
Merge pull request #4281 from cakebaker/default_trait_access
clippy: use type name instead of Default::default
2023-01-18 11:33:09 +01:00
Sylvestre Ledru
77fa199059
Merge pull request #4283 from cakebaker/cp_remove_empty_line_from_version_output
cp: remove empty line from version output
2023-01-18 11:32:36 +01:00
Daniel Hofstetter
3489647407 cp: remove empty line from version output 2023-01-18 10:20:17 +01:00
Sylvestre Ledru
fb1ee80837
Merge pull request #4282 from cakebaker/join_remove_name_constant
join: remove NAME constant
2023-01-17 17:32:22 +01:00
Daniel Hofstetter
e09d718ca7 join: remove NAME constant 2023-01-17 16:10:32 +01:00
Daniel Hofstetter
f50c352adc clippy: use type name instead of Default::default 2023-01-16 10:52:28 +01:00
Sylvestre Ledru
98f02f78d3
Merge pull request #4269 from rivy/fix.usage-error
Fix usage error production and testing (multiple uutils)
2023-01-15 14:34:18 +01:00
Roy Ivy III
03e55d2ecb docs ~ update spell-checker exceptions 2023-01-14 22:53:26 -06:00
Roy Ivy III
ead457171b refactor/uname ~ rename vars to standards 2023-01-14 22:53:26 -06:00
Roy Ivy III
759f32fe4f fix/uname ~ correct --all help description 2023-01-14 22:53:25 -06:00
Roy Ivy III
b5eaa8822f fix/uname ~ strip any trailing NUL(s) from nodename() (from bug in platform-info) 2023-01-14 22:53:25 -06:00
Roy Ivy III
b4e3e66236 test/uname ~ test for invisible characters in output (ie, NULs) 2023-01-14 22:16:41 -06:00
Roy Ivy III
cfdbaca6c1 test/uname ~ update tests for expected platform-v1.0.2 outputs 2023-01-14 22:16:41 -06:00
Roy Ivy III
27d20129fe fix/dd ~ correct usage error display text 2023-01-13 22:14:48 -06:00
Roy Ivy III
3d93e25160 fix/touch ~ correct usage error display text 2023-01-13 22:14:48 -06:00
Roy Ivy III
d78e1e7399 tests: revise/standardize usage error testing (for dd, install, mktemp, rm, seq, and touch) 2023-01-13 22:14:48 -06:00
Roy Ivy III
4eb5bc1d2f update Cargo.lock 2023-01-13 22:13:26 -06:00
Roy Ivy III
10f35fc282 refactor/uname ~ use platform_info-v1.0.2 2023-01-13 22:13:26 -06:00