Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sort: support percent arguments to -S option #7181

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

jfinkels
Copy link
Collaborator

Add support for parsing percent arguments to the -S option. The given
percentage specifies a percentage of the total physical memory. For
Linux, the total physical memory is read from /proc/meminfo. The
feature is not yet implemented for other systems.

In order to implement the feature, the uucore::parser::parse_size
function was updated to recognize strings of the form NNN%.

Fixes #3500

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/misc/usage_vs_getopt is no longer failing!

Copy link

GNU testsuite comparison:

GNU test failed: tests/misc/stdbuf. tests/misc/stdbuf is passing on 'main'. Maybe you have to rebase?
Congrats! The gnu test tests/misc/usage_vs_getopt is no longer failing!

Add support for parsing percent arguments to the `-S` option. The given
percentage specifies a percentage of the total physical memory. For
Linux, the total physical memory is read from `/proc/meminfo`. The
feature is not yet implemented for other systems.

In order to implement the feature, the `uucore::parser::parse_size`
function was updated to recognize strings of the form `NNN%`.

Fixes uutils#3500
@jfinkels jfinkels marked this pull request as ready for review January 20, 2025 21:25
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

sort: -S/--buffer-size does not support memory percentages %
1 participant