Skip to content

obs-util: report buffered close errors when copying files - #1538

Merged
zackees merged 3 commits into
masterfrom
fix/1537-copy-close-error
Oct 20, 2026
Merged

zackees merged 3 commits into
masterfrom
fix/1537-copy-close-error

Conversation

@zackees

@zackees zackees commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

File copy returns success when fclose fails flushing buffered data, leaving a truncated destination.

File copies report buffered close failures instead of success for truncated output.

Split fix from #1462. Fixes #1537.

Validation: soldr cargo test -p obs-util copy_reports_buffered_close_failure -- --test-threads=1 fails on RED bfb0c02dc and passes with the fix. Related tests: soldr cargo test -p obs-util platform_nix -- --test-threads=1.

:os_dirent_layout_matches_c_header ... ok
test tests::platform::platform_nix_layout::os_glob_info_layout_matches_c_header ... ok
test tests::platform::platform_nix_layout::os_globent_layout_matches_c_header ... ok
test tests::platform::platform_nix_layout::os_proc_memory_usage_layout_matches_c_header ... ok
test tests::platform::platform_nix_parity::abs_path_and_glob_match ... ok
test tests::platform::platform_nix_parity::copy_and_replace_match ... ok
test tests::platform::platform_nix_parity::copy_reports_buffered_close_failure ... ok
test tests::platform::platform_nix_parity::directory_listing_matches ... ok
test tests::platform::platform_nix_parity::file_ops_match_the_c_file ... ok
test tests::platform::platform_nix_parity::getcwd_matches_and_chdir_roundtrips ... ok
test tests::platform::platform_nix_parity::host_paths_and_cores_match ... ok
test tests::platform::platform_nix_parity::program_data_path_longer_than_int_max_fails ...     2.72 soldr[cache] obs_util [NC]
ok
test tests::platform::platform_nix_parity::sleepto_past_and_plugin_flag_match ... ok

test result: ok. 28 passed; 0 failed; 0 ignored; 0 measured; 641 filtered out; finished in 0.79s

    3.50 error: os_dlopen(/no/such/libobs-plugin-nix.so->/no/such/libobs-plugin-nix.so): /no/such/libobs-plugin-nix.so: cannot open shared object file: No such file or directory
    3.50 
    3.50 error: os_dlopen(/no/such/libobs-plugin-nix.so->/no/such/libobs-plugin-nix.so): /no/such/libobs-plugin-nix.so: cannot open shared object file: No such file or directory
    3.50 
soldr: cache 0 HIT, 1 MISS (0% hit rate, saved 0.1s)

PR CI supplies lint and Tier 2 validation. No public headers or existing C tests changed. Tier 4 does not apply to these utility APIs.
The file-size-limit regression runs only in an isolated child; it cannot truncate files written by other tests.

Additional validation: the full obs-util suite passes with 8 test threads (669 tests plus both doctests), confirming that the isolated file-size-limit regression leaves the parent process unchanged.

@zackees
zackees enabled auto-merge October 20, 2026 17:34
@zackees
zackees added this pull request to the merge queue Oct 20, 2026
Merged via the queue into master with commit 2ebd616 Oct 20, 2026
23 checks passed
@zackees
zackees deleted the fix/1537-copy-close-error branch October 26, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

bug: obs-util: report buffered close errors when copying files

1 participant