Skip to content

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

@github-actions
Copy link

GNU testsuite comparison:

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

@github-actions
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!

@github-actions
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
@github-actions
Copy link

GNU testsuite comparison:

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


/// Get the total number of bytes of physical memory.
///
/// TODO Implement this for non-Linux systems.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you please open a new issue for this?

@github-actions
Copy link

GNU testsuite comparison:

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

@sylvestre sylvestre merged commit ceb0785 into uutils:main Jan 23, 2025
65 checks passed
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 %

2 participants