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

dd: handle SIGUSR1 directly. not just every 1sec #6025

Merged
merged 4 commits into from
Mar 30, 2024

Conversation

cre4ture
Copy link
Contributor

@cre4ture cre4ture commented Feb 27, 2024

addresses issue #5902.

The relevant gnu test tests/dd/stats.sh is now green.

Changes:

  • extend the Alarm-flag with a manual trigger that gets triggered by each received SIGUSR1 signal
  • fix block writing to also consider fullblock cmd line arg. It retries partial writes when this is set.

@cre4ture cre4ture changed the title handle SIGUSR1 directly. not just every 1sec dd: handle SIGUSR1 directly. not just every 1sec Feb 27, 2024
@cre4ture cre4ture force-pushed the feature/dd_direct_progress branch 3 times, most recently from 6eca368 to cf5fc49 Compare March 9, 2024 20:43
Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/dd/stats is no longer failing!

}
});

Self { interval, trigger }
}

pub fn is_triggered(&self) -> bool {
self.trigger.swap(false, Relaxed)
pub fn manual_trigger_fn(&self) -> Box<dyn Send + Sync + Fn()> {
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

it would be nice to add some comments explaining what it is doing

@@ -913,6 +950,27 @@ impl<'a> BlockWriter<'a> {
}
}

fn flush_caches_full_length(i: &Input, o: &Output) -> std::io::Result<()> {
Copy link
Sponsor Contributor

Choose a reason for hiding this comment

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

same

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/dd/stats is no longer failing!

Copy link

GNU testsuite comparison:

Skip an intermittent issue tests/tail/inotify-dir-recreate (fails in this run but passes in the 'main' branch)
Congrats! The gnu test tests/dd/stats is no longer failing!

@cre4ture cre4ture requested a review from sylvestre March 30, 2024 20:48
@sylvestre sylvestre merged commit c99e1c6 into uutils:main Mar 30, 2024
62 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.

2 participants