Commit graph

9247 commits

Author SHA1 Message Date
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
Daniel Hofstetter
747bc2513e sum: fix output when using BSD sum algo (-r) 2023-01-13 10:05:09 +01:00
Sylvestre Ledru
6a9660f9f6
Merge pull request #4268 from rivy/fix.sleep
Fix `sleep` argument parsing and errors
2023-01-12 18:41:04 +01:00
Sylvestre Ledru
22821c8ac6
Merge pull request #4272 from cakebaker/mv_remove_unnecessary_not
mv: remove unnecessary "!"
2023-01-12 18:32:31 +01:00
Sylvestre Ledru
9d161d450f
Merge pull request #4277 from cakebaker/remove_name_constants
remove NAME constants
2023-01-12 18:31:54 +01:00
Daniel Hofstetter
74ed737460 remove NAME constants 2023-01-12 15:21:11 +01:00
Sylvestre Ledru
11d0ab5413
Merge pull request #4258 from Joining7943/tests-util-stdin-default-to-stdio-null
`tests/util`: Use `Stdio::null` as default stdin for child processes
2023-01-11 16:59:00 +01:00
Sylvestre Ledru
74c9abb359
Merge pull request #4274 from cakebaker/sum_fix_output_of_about_string
sum, unexpand: fix output of about string
2023-01-11 16:33:39 +01:00
Daniel Hofstetter
5ad3cbe965 unexpand: fix output of about string 2023-01-11 15:55:37 +01:00
Daniel Hofstetter
0f79b3cf2d sum: fix output of about string 2023-01-11 14:44:59 +01:00
Sylvestre Ledru
46cac1145b
Merge pull request #4273 from cakebaker/pr_help_output
pr: add missing '\' before line breaks
2023-01-11 14:16:05 +01:00