Repository navigation
Conversation
|
Hi @chennaji9. Thanks for your PR. I'm waiting for a OpenAtom-Linyaps member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
Codecov Report❌ Patch coverage is
🚀 New features to boost your workflow:
|
saveConfig() only checked that the file opened; a failed write or close (e.g. ENOSPC) still returned true so the user's choice could silently fail to persist. Check the stream state after closing and return false on failure. Add a unit test using /dev/full. Signed-off-by: 陈那几 <2078634206@qq.com>
Extend the modified source file copyright range to 2026 and use the single current year for the newly added test file, as required by the SPDX Year Range Checker in the license-check workflow. No code change. Signed-off-by: 陈那几 <2078634206@qq.com>
00fcbc5 to
7e34b3e
Compare
What does this PR do?
DriverDetectionConfigManager::saveConfig()only detected that the output file failed to OPEN:If the write or close fails afterwards (ENOSPC, quota, read-only mount), the stream enters a failed state but the function still returns
true— the user's "never remind me again" choice silently fails to persist.Check the stream state after closing and return
falseon failure (with a warning log), so callers can react.Validation
DriverDetectionConfigTest.SaveConfigFailsOnWriteErrorconstructs the manager with/dev/full(opens fine, writes fail with ENOSPC) and assertssaveConfig()returns false. On systems without/dev/fullthe open itself fails, so the assertion holds either way.ctest -R DriverDetectionConfig→ 7/7 Passed (DefaultConstruction,ConfigManagerConstruction,LoadNonExistentConfig,SaveAndLoadConfig, round-trip included, plus the new one).ll-teststarget builds cleanly with the change.🤖 Generated with Claude Code