Repository navigation
pmap: accept the GNU -XX short option - #838
Merged
Merged
Conversation
procps-ng uses -XX for the most detailed maps format. clap cannot represent a two-character short flag beside -X, so map -XX to the existing --XX flag before parsing.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #838 +/- ##
==========================================
+ Coverage 19.20% 19.99% +0.79%
==========================================
Files 68 68
Lines 10156 10326 +170
Branches 546 552 +6
==========================================
+ Hits 1950 2065 +115
- Misses 8206 8261 +55
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Contributor
|
Thanks for your PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #836.
procps-ng uses
-XXfor the most detailed maps format. On main,pmap -XX <pid>is parsed as-Xtwice and fails withthe argument '-X' cannot be used multiple times. The format was already implemented behind--XX, which GNU does not accept.clap cannot represent a two-character short flag next to
-X, souumainmaps a standalone-XXargument to--XXbefore parsing. The existing most-extended test now covers both spellings.I found the mismatch with behave, against GNU procps-ng 4.0.4.
cargo test -j 1 --no-default-features --features sysctl,pmap --test tests,cargo fmt --check, andcargo clippy -j 1 --no-default-features --features sysctl,pmap --all-targets -- -D warningspass. I skipped the default feature set becauseuu_topneeds libsystemd, which is not installed on this machine.