Repository navigation
config-file: Log config_save_safe temp-file write failures in Rust (#489) - #714
Merged
Merged
Conversation
(cherry picked from commit 0e8b9c7)
Log "config_save_safe: failed to write to <temp>" as the C does, after releasing the config lock because log callbacks may re-enter the config API. Master already reports the final close result (close_file), so only the logging half of the fork commit applies. (partially cherry picked from commit 604ec6dbb42ec44d02aa0b5a90f63a7cf3405f45)
10 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #489, #686
#709 made the Rust
config_savereport a failed final close. The Cconfig_save_safealso logsconfig_save_safe: failed to write to <temp>when writing the temp file fails, and the Rust port did not. This brings @chriscoveries' RED test (test_config_close_fault, cherry-picked with-x) and the logging half of their GREEN commit, with authorship kept. The log is emitted after the config lock is released, because log callbacks may re-enter the config API.RED → GREEN
rust/tools/linux-validate/run.sh):test_config_close_faultpasses OFF (C) and fails ON (Rust):safe_close_failure_preserves_original(no log at test_config_close_fault.c:121)../lintand thecrosslane are ok. The test is UNIX-only (LD_PRELOAD/DYLD_INSERT_LIBRARIES fault injection), so the Windowsclose_filepath is not exercised locally.