Repository navigation
upslog: centralise monitored-system construction and cleanup - #3772
Open
user01010111 wants to merge 3 commits into
Open
user01010111 wants to merge 3 commits into
user01010111 wants to merge 3 commits into
Conversation
added 2 commits
October 16, 2026 04:24
Centralise monitored-system ownership in private helpers while preserving logging, discovery traversal and cleanup diagnostics. Add focused ownership and executable lifecycle regression tests. Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
Signed-off-by: user01010111 <lapses.50.booster@icloud.com>
|
A ZIP file with standard source tarball and another tarball with pre-built docs for commit 600829b is temporarily available: NUT-tarballs-PR-3772.zip. |
| struct monhost_ups_t *p = (struct monhost_ups_t *)xcalloc(1, sizeof(*p)); | ||
|
|
||
| p->monhost = xstrdup(system); | ||
| p->logtarget = target; |
| #define free tracked_free | ||
| #define upscli_disconnect tracked_disconnect | ||
| #define fclose tracked_fclose | ||
| #include "upslog.c" |
|
✅ Build nut 2.8.5.5891-master completed (commit 40868e9826 by @jimklimov)
|
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.
upslog repeats monitored-system construction, list insertion and teardown across its tuple, legacy-option and wildcard paths. Centralise those ownership rules in private helpers, keeping shared log targets borrowed and preserving discovery traversal, logging and cleanup diagnostics.
Add a C ownership fixture, automatic serverless executable checks and focused process-lifecycle integration checks. The wildcard cases characterise existing behaviour; an intentional wildcard fix should update their expectations. Existing split-string allocation loss and stale-predecessor list loss remain unchanged.
GCC builds and
make checkpass, including 17 core tests and ten automatic executable checks. The ownership fixture passes 35 checks on Linux and native Windows. Real executable observations match the pinned baseline across 25 Linux checks and 20 Windows checks, including connected and already-disconnected teardown. The corrected script also passes ten serverless and 25 integration checks under actual CPython 3.5.10. Windows uses its native Python interpreter and sequential upsd instances because upsd is a singleton on that platform.The affected C objects pass strict Clang checks, and the supported clang-minimal preset builds the client and passes the fixture. Full clang-hard builds encounter the same dependency errors on the baseline. GCC ASan reports the same inherited 28 bytes in four allocations for both executables; the ownership fixture has no leaks, and the mutation controls reject incorrect ownership and list behaviour.
make distcheck-light, staged install/uninstall, source checks, NEWS rendering and focused spelling checks pass.AI assistance: Codex (
gpt-6.1-sol) for implementation and testing, Codex (gpt-6-astra) for independent review and checks, and Claude Code (claude-opus-5-5) for read-only plan and implementation reviews. The human contributor remains responsible for the change.