Repository navigation
config-file: report a failed final close in config_save - #709
Merged
Merged
Conversation
Fixes #489 Local-Gate: v1 tree=20613fc270f98ff1c7fb79d7e396fa3a5c15755d secs=393 lanes=lint:run,rust-test:run,cross:run,tier2-linux:run Ci-Attestation: {"at":1791963910,"gate":"rust/all/fmt","host":"linux-x86_64","key":"7e12cd7176843a4799c2bc69bbeee88ef664d3fc04aa507eabfb688e54942c00","lane":"lint","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":30,"stamp":"104503643cff40dceb084fdad3fe7df1","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"rust/x86_64-unknown-linux-gnu/clippy","host":"linux-x86_64","key":"7e12cd7176843a4799c2bc69bbeee88ef664d3fc04aa507eabfb688e54942c00","lane":"lint","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":30,"stamp":"65ff1e5fe932e4f0e334a08b5a962e7d","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"rust/x86_64-unknown-linux-gnu/test","host":"linux-x86_64","key":"440a1a2a3025b93f16067669ace7510cedddd62876a891ad299e872d428f2c05","lane":"rust-test","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":150,"stamp":"d02cf677a1b7201709a7ab4559971cb9","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"rust/x86_64-pc-windows-msvc/clippy","host":"linux-x86_64","key":"a5dce7ac1485152f730fab049086256df26ba5418eebe7d45b559ffb1ca1634a","lane":"cross","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":83,"stamp":"fad6c888c2bf2e923dc33ce49c2598cf","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"rust/x86_64-pc-windows-msvc/dylint","host":"linux-x86_64","key":"a5dce7ac1485152f730fab049086256df26ba5418eebe7d45b559ffb1ca1634a","lane":"cross","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":83,"stamp":"69ac89236532cda4a7585cf65741858a","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"rust/aarch64-apple-darwin/clippy","host":"linux-x86_64","key":"a5dce7ac1485152f730fab049086256df26ba5418eebe7d45b559ffb1ca1634a","lane":"cross","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":83,"stamp":"8942ab47ceb45adb5fbd4df82890dff5","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"rust/aarch64-apple-darwin/dylint","host":"linux-x86_64","key":"a5dce7ac1485152f730fab049086256df26ba5418eebe7d45b559ffb1ca1634a","lane":"cross","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":83,"stamp":"28a710e486b85db6daba1591ead7c2ff","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"rust/x86_64-apple-darwin/clippy","host":"linux-x86_64","key":"a5dce7ac1485152f730fab049086256df26ba5418eebe7d45b559ffb1ca1634a","lane":"cross","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":83,"stamp":"befbb8e2150879a1470ae13b80ecdd0d","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"rust/x86_64-apple-darwin/dylint","host":"linux-x86_64","key":"a5dce7ac1485152f730fab049086256df26ba5418eebe7d45b559ffb1ca1634a","lane":"cross","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":83,"stamp":"f09e2df712fa4d26cbf056fd99c6416b","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"} Ci-Attestation: {"at":1791963910,"gate":"cpp/linux-x64/tier2","host":"linux-x86_64","key":"8f2e51674208c951f0849fc446eaeec89de313e98cdad7a9d35f1186151ba047","lane":"tier2-linux","parents":["9977cd1051dec4863e0ee0ecf3ca990a20df54d7"],"secs":130,"stamp":"341d8016c9fcf99f51b0ffe1163af3e8","tree":"20613fc270f98ff1c7fb79d7e396fa3a5c15755d","v":1,"via":"run"}
This was referenced Oct 14, 2026
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.
Fixes #489
write_todropped theFile, discarding the close error, soconfig_savereturned CONFIG_SUCCESS andconfig_save_saferenamed the temp over the real config. C checksfclose. Now the file is closed once viaplatform::close_file(unixclose(2), windowsCloseHandle) and a failure returns CONFIG_ERROR, so save_safe stops before promoting.RED (9977cd1, new tests/config_file_close.rs, interposed
closereturns EIO once): both tests fail withleft: 0, right: -2(CONFIG_SUCCESS vs CONFIG_ERROR); exactly one close attempt asserted.GREEN (3448d7c): config_file, config_file_parity, config_file_close pass; ./lint ok; linux-validate run.sh OFF/ON ok, 1766 exported symbols identical; local-gate run passed (lint, rust-test, cross, tier2-linux) and stamped.
Not done: the
config_save_safe: failed to write to %slog line (safe core has no logger; no behaviour change). No Tier 3 case (oracle cannot inject close failure); Tier 2 cmocka already covers /dev/full.