Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@naoNao89
Copy link
Contributor

This PR adds proper flag reset logic to the sync utility to align with GNU coreutils implementation.

Changes

  • Reset O_NONBLOCK flag before calling syncfs() and fdatasync()
  • Added necessary imports: fcntl, FcntlArg, OFlag, and AsRawFd
  • Applies to Linux/Android platforms only

The implementation ensures proper handling of non-blocking file descriptors before performing synchronization operations.

https://www.gnu.org/software/coreutils/manual/html_node/sync-invocation.html

@naoNao89 naoNao89 force-pushed the sync-remove-unwrap branch 3 times, most recently from 9ac5413 to 75a3e0c Compare November 21, 2025 14:34
@github-actions
Copy link

GNU testsuite comparison:

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

@github-actions
Copy link

GNU testsuite comparison:

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

@sylvestre
Copy link
Contributor

Could you please add a test for this?

@github-actions
Copy link

GNU testsuite comparison:

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

@naoNao89 naoNao89 force-pushed the sync-remove-unwrap branch 4 times, most recently from 83f162c to e9622ed Compare November 28, 2025 22:46
@codspeed-hq
Copy link

codspeed-hq bot commented Dec 9, 2025

CodSpeed Performance Report

Merging #9437 will degrade performances by 2.34%

Comparing naoNao89:sync-remove-unwrap (3577f24) with main (415d01c)

Summary

⚡ 1 improvement
❌ 1 regression
✅ 125 untouched
⏩ 6 skipped1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
tsort_input_parsing_heavy[5000] 82.1 ms 84.1 ms -2.34%
du_max_depth_balanced_tree[(6, 4, 10)] 33.1 ms 32.4 ms +2.15%

Footnotes

  1. 6 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

GNU testsuite comparison:

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

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails in the 'main' branch)

@github-actions
Copy link

GNU testsuite comparison:

Skipping an intermittent issue tests/tail/overlay-headers (passes in this run but fails 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.

2 participants