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

uucore/buf_copy: bug fixes for compatibility with uutils core utilities #6983

Merged
merged 7 commits into from
Dec 28, 2024

Conversation

DaringCuteSeal
Copy link
Contributor

This PR addresses several issues that previously hindered the usage of the new buffer-based copying module (#6964) in several core utilities (notably cp, cat, yes, and install).

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/timeout/timeout (fails in this run but passes in the 'main' branch)
Skipping an intermittent issue tests/tail/inotify-dir-recreate (passes in this run but fails in the 'main' branch)

use crate::error::UError;
use std::io::{Read, Write};

#[cfg(any(target_os = "linux", target_os = "android"))]
Copy link
Contributor

Choose a reason for hiding this comment

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

it is starting to look messy with all the cfg
maybe the .rs file per platform ?
for example:
src/uu/tail/src/platform/

Copy link
Contributor

@sylvestre sylvestre left a comment

Choose a reason for hiding this comment

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

needs some refactoring. Too many cfg

@DaringCuteSeal
Copy link
Contributor Author

oh right on that, wait

@DaringCuteSeal DaringCuteSeal force-pushed the uucore-splice-cross branch 2 times, most recently from 791c24c to 0b793ef Compare December 23, 2024 01:02
@DaringCuteSeal
Copy link
Contributor Author

DaringCuteSeal commented Dec 25, 2024

@sylvestre how's it

@@ -0,0 +1,29 @@
use crate::error::UError;
Copy link
Contributor

Choose a reason for hiding this comment

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

please add the license header here

the splice_data_to_fd function now does not loop forever and returns the amount of bytes written properly.
several tests now are executed properly with proper handling of pipelines.
refactor the buf_copy module into Linux and non-Linux implementations.
@sylvestre
Copy link
Contributor

much better, thanks :)
just a few comments now

Copy link

GNU testsuite comparison:

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

1 similar comment
Copy link

GNU testsuite comparison:

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

@DaringCuteSeal
Copy link
Contributor Author

there, should be ok now

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)

@sylvestre sylvestre merged commit edf8be5 into uutils:main Dec 28, 2024
62 of 63 checks passed
@sylvestre
Copy link
Contributor

thanks!

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.

2 participants