Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #636 +/- ##
==========================================
+ Coverage 18.77% 18.93% +0.16%
==========================================
Files 66 66
Lines 9752 9773 +21
Branches 516 518 +2
==========================================
+ Hits 1831 1851 +20
- Misses 7921 7922 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
2f41da0 to
961f167
Compare
|
could you please add some unittest to test your modification and make sure no regression if possible? |
0d7b008 to
f0c7301
Compare
When calculating the length, the ^$ character needs to be removed if the -x parameter is present. Closes: uutils#635
f0c7301 to
fb69db0
Compare
@Krysztal112233 Thank you for your review; I have added test cases in this area. |
|
|
||
| // spawn a flock process that locks the file | ||
| let mut flock_process = Command::new("flock") | ||
| .arg("--fcntl") |
There was a problem hiding this comment.
@sylvestre Thanks for your reply. When the --fcntl option is present, executing cargo test --all on ubuntu 25.10 will report an error:
failures:
---- test_pgrep::test_pidfile_fcntl_locked stdout ----
bin: "/home/ysq/code/procps/target/debug/procps"
run: /home/ysq/code/procps/target/debug/procps pgrep --logpidfile --pidfile /tmp/.tmpWhyLfW
thread 'test_pgrep::test_pidfile_fcntl_locked' (23065) panicked at tests/by-util/test_pgrep.rs:668:10:
Command was expected to succeed. code: 1
stdout =
stderr = pgrep: Pidfile /tmp/.tmpWhyLfW is not locked
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
failures:
test_pgrep::test_pidfile_fcntl_locked
test result: FAILED. 197 passed; 1 failed; 1 ignored; 0 measured; 0 filtered out; finished in 4.92s
error: test failed, to rerun pass `-p procps --test tests`There is also a note: “CI runner doesn't support flock --fcntl”. Therefore, modifications were made to handle this error.
When calculating the length, the
^$character needs to be removed if the-xparameter is present.Closes: #635