Commit graph

9014 commits

Author SHA1 Message Date
Joining7943
4f54eedb74 tests/util: Improve UChild. Cleanup redundant functions in util.rs.
A short summary of changes:

* Add some basic tests for UChild and the run methods.
* Try more often in a fixed interval to create the tempfile for CapturedOutput.
* Fix drop order of struct fields for better cleanup of temporary files/dirs.
* Mark UChild::wait_with_output and UChild::pipe_in_and_wait_with_output deprecated
* Make CapturedOutput private
* Panic in stdout_all, stdout_all_bytes etc. if output is not captured.
* Rename some methods, refactor, clean up, fix documentation, add try_... methods
2022-12-02 08:06:48 +01:00
Joining7943
982fb682e9 tests: Use UChild in tests. Rename run_no_wait_child to run_no_wait and return UChild
tests/tail:
* test_stdin_redirect_file:. Test fails now when assert_alive()!
The follow test `tail -f < file` where file's content is `foo` fails with:
    Assertion failed. Expected 'tail' to be running but exited with status=exit status: 0

I also tried on the command line and can confirm that tail isn't runnning when following by
descriptor. The test is deactivated until the implementation is fixed.

* test_follow_stdin_descriptor
* test_follow_stdin_explicit_indefinitely.
* test_follow_single
* test_follow_non_utf8_bytes
* test_follow_multiple
* test_follow_name_multiple
* test_follow_invalid_pid
* test_single_big_args
* test_retry3
* test_retry4
* test_retry5
* test_retry7
* test_retry8
* test_retry9
* test_follow_descriptor_vs_rename1
* test_follow_descriptor_vs_rename2
* test_follow_name_retry_headers
* test_follow_name_remove
* test_follow_name_truncate1
* test_follow_name_truncate2
* test_follow_name_truncate3
* test_follow_name_truncate4
* test_follow_truncate_fast
* test_follow_name_move_create1
* test_follow_name_move_create2
* test_follow_name_move1
* test_follow_name_move2
* test_follow_name_move_retry1
* test_follow_name_move_retry2
* test_follow_inotify_only_regular
* test_fifo
* test_illegal_seek

tests/cat:
* test_dev_full
* test_dev_full_show_all
* test_dev_random
* test_fifo_symlink

tests/dd:
* test_random_73k_test_lazy_fullblock
* test_sync_delayed_reader

tests/factor:
* test_parallel

tests/rm:
* test_rm_force_prompts_order
* test_rm_descend_directory
* test_rm_prompts

tests/seq:
* the helper run method

tests/sort:
* test_sigpipe_panic

tests/tee:
* the helper run_tee method

tests/tty:
* test_tty module

tests/yes:
* the helper run method
2022-12-02 08:06:45 +01:00
Joining7943
040a5e8301 tests/util: Implement UChild. UCommand: implement stderr_to_stdout, capture output as default
See pr #4136 (https://github.com/uutils/coreutils/pull/4136)
2022-12-02 08:05:05 +01:00
Joining7943
9b446bf261 tests/tail: Fix clippy warning same-item-push. Do not push same flag twice. 2022-12-02 08:05:05 +01:00
Sylvestre Ledru
403780a613
Merge pull request #4196 from cakebaker/cut_remove_unnecessary_return_type
cut: remove unnecessary return type
2022-12-02 07:47:49 +01:00
Sylvestre Ledru
3f43e7d1ea
Merge pull request #4202 from cakebaker/string_new
chore: standardize creation of empty strings
2022-12-02 07:47:27 +01:00
Daniel Hofstetter
05d12892f3 CI: enable manual_string_new lint 2022-12-01 13:49:23 +01:00
Daniel Hofstetter
6cc470920f numfmt: derive default impl for FormatOptions 2022-12-01 13:49:23 +01:00
Daniel Hofstetter
9a2174ba02 chore: standardize creation of empty strings 2022-12-01 13:49:23 +01:00
Terts Diepraam
efa0fd498b
Merge pull request #4179 from djedi23/verbose_and_progress
Suspend the progress bar before printing the copied files.
2022-11-30 13:19:58 +01:00
Terts Diepraam
558314e822
Merge pull request #4200 from uutils/sylvestre-patch-2
Move the dependabot to weekly
2022-11-30 12:32:39 +01:00
Sylvestre Ledru
46b7019ddf
Merge pull request #4195 from uutils/dependabot/cargo/clap_complete-4.0.6
build(deps): bump clap_complete from 4.0.5 to 4.0.6
2022-11-30 08:39:20 +01:00
Sylvestre Ledru
033969cf8f
Merge pull request #4181 from cakebaker/split_backticks_are_unbalanced
split: fix "backticks are unbalanced" warnings
2022-11-30 08:38:30 +01:00
Sylvestre Ledru
5efdc51609
Merge pull request #4191 from jfinkels/dd-sparse
dd: correctly set file size when conv=sparse
2022-11-30 08:38:09 +01:00
Moïse Valvassori
8b30ead588 add comment to the pregress bar suspension. 2022-11-29 22:54:07 +01:00
Moïse Valvassori
1b004053ac Suspend the progress bar before printing the copied files. 2022-11-29 22:54:07 +01:00
Daniel Hofstetter
ac1790c69e split: fix "backticks are unbalanced" warnings 2022-11-29 22:53:56 +01:00
Jeffrey Finkelstein
9632db4f86 dd: correctly set file size when conv=sparse
Before this commit, if `sparsefile` were a regular file of non-zero
size whose contents are all null bytes, then

    dd if=sparsefile of=outfile conv=notrunc

would have resulted in `outfile` having zero size as reported by
`stat`. After this commit, `outfile` will have the same size as
`sparsefile` (even if the contents are represented sparsely by the
filesystem).
2022-11-29 22:53:18 +01:00
dependabot[bot]
f0e0404496 build(deps): bump clap_complete from 4.0.5 to 4.0.6
Bumps [clap_complete](https://github.com/clap-rs/clap) from 4.0.5 to 4.0.6.
- [Release notes](https://github.com/clap-rs/clap/releases)
- [Changelog](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md)
- [Commits](https://github.com/clap-rs/clap/compare/clap_complete-v4.0.5...clap_complete-v4.0.6)

---
updated-dependencies:
- dependency-name: clap_complete
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-11-29 22:53:03 +01:00
Daniel Hofstetter
be7717b2d0 cut: remove unnecessary return type 2022-11-29 22:52:58 +01:00
Sylvestre Ledru
4cada56e78 Move the dependabot to weekly
We don't need to move that fast
2022-11-29 22:51:58 +01:00
Sylvestre Ledru
e307f624e8
Merge pull request #4201 from niyaznigmatullin/ubuntu-20.04_for_GNUTests
gnu-tests: rollback to `ubuntu-20.04` for gnu-tests until fixed
2022-11-29 22:51:42 +01:00
Niyaz Nigmatullin
328b387dbd gnu-tests: rollback to ubuntu-20.04 for gnu-tests until it fixed 2022-11-29 18:43:12 +02:00
Sylvestre Ledru
27958a27ef
Merge pull request #4159 from sylvestre/issue_3780
date: add a test for the issue 3780 to make sure we don't regress
2022-11-27 18:24:07 +01:00
Sylvestre Ledru
96fab62421
Merge pull request #4182 from cakebaker/ci_remove_python_pyinotify_dependency
CI: change python-pyinotify to python3-pyinotify
2022-11-26 13:36:52 +01:00
Daniel Hofstetter
f079c7aa80 CI: change python-pyinotify to python3-pyinotify 2022-11-24 15:30:02 +01:00
Sylvestre Ledru
af804df9a2
Merge pull request #4166 from miles170/issue-4080-cp-fails-on-mac
cp: fix `cp --force --backup f f` fails on macOS
2022-11-21 21:13:35 +01:00
Sylvestre Ledru
aa0c00aeb2
Merge pull request #4174 from niyaznigmatullin/cargo_update
deps: bump `textwrap` to `0.16` and `cargo +1.60.0 update`
2022-11-21 15:35:58 +01:00
Niyaz Nigmatullin
fd42953984 deny: modify duplicate packages 2022-11-21 10:46:59 +02:00
Niyaz Nigmatullin
7ca3f0b338 deps: bump textwrap to 0.16 and cargo +1.60.0 update 2022-11-21 10:40:44 +02:00
Sylvestre Ledru
1fccafe2b1
Merge pull request #4170 from sylvestre/deny
Remove some old and unused info from cargo-deny
2022-11-21 09:27:53 +01:00
Sylvestre Ledru
bdd67b7203 Remove some old and unused info from cargo-deny 2022-11-20 20:35:44 +01:00
Sylvestre Ledru
9e859e98c1
Merge pull request #4168 from sylvestre/lscolors
update lscolors to switch to nu_ansi_term
2022-11-20 20:35:21 +01:00
Sylvestre Ledru
a6ed764c87
Merge pull request #4167 from miles170/issue-4163-fix-ci-freebsd
CI: increase the FreeBSD memory limit to 4096
2022-11-20 16:56:22 +01:00
Sylvestre Ledru
406f5978a0 ignore bindgen 0.60.1 2022-11-20 16:51:10 +01:00
Sylvestre Ledru
edc08f59fb update lscolors to switch to nu_ansi_term 2022-11-20 13:46:02 +01:00
Miles Liu
9e8c422b3f
CI: increase the FreeBSD memory limit to 4096 2022-11-20 19:58:07 +08:00
Miles Liu
3896aa31be
cp: fix cp --force --backup f f fails on macOS 2022-11-20 18:14:42 +08:00
Sylvestre Ledru
e6ff094e54
Merge pull request #4157 from miles170/ci-update-actions
CI: update actions to run on Node 16
2022-11-19 19:40:48 +01:00
jfinkels
881e63a2f6
Merge pull request #4160 from jfinkels/dd-test-lazy-reader
dd: move tests of slow reader to test_dd.rs
2022-11-19 11:26:38 -05:00
Sylvestre Ledru
3d960570eb
Merge pull request #4141 from uutils/dependabot/cargo/selinux-0.3.1
build(deps): bump selinux from 0.3.0 to 0.3.1
2022-11-19 16:28:45 +01:00
Miles Liu
584f3cd0b2 CI: replace actions-rs/install with cargo install 2022-11-19 16:28:08 +01:00
Miles Liu
418fe6d758 CI: remove use of actions-rs/toolchain 2022-11-19 16:28:08 +01:00
Miles Liu
af7e4180ec CI: remove use of actions-rs/cargo 2022-11-19 16:28:08 +01:00
Miles Liu
61b7ff8116 CI: resolve rust-cache misplacement and cache conflict 2022-11-19 16:28:08 +01:00
Jeffrey Finkelstein
903ad1656d dd: move tests of slow reader to test_dd.rs
Move some tests that simulate a slow reader from `dd.rs` to
`tests/by-util/test_dd.rs`, and employ a FIFO and `sleep()` to
simulate the slow reader instead of a custom struct that implements
`Read`. This change restricts the type of `Input`s the
`Output::dd_out()` function can accept, facilitating a future change
to make `Input` an enum.
2022-11-19 09:27:23 -05:00
Terts Diepraam
5acb0227aa
Merge pull request #4134 from jfinkels/dd-output-enums
dd: create Dest enum and simpler Output struct
2022-11-19 14:52:46 +01:00
Terts Diepraam
1b35e467ac
Merge pull request #4137 from jfinkels/dd-bytes-suffix
dd: allow B as a suffix for count, seek, and skip
2022-11-19 12:23:43 +01:00
Terts Diepraam
38e810a122
Merge pull request #4161 from miles170/stat-remove-unused-import
stat: remove unused import
2022-11-19 11:53:40 +01:00
Miles Liu
b2b3512749
stat: remove unused import 2022-11-19 17:37:59 +08:00