Feature/windows registry and job objects improvments - #39
Merged
Conversation
Signed-off-by: Mark Bolwell <info@krameff.com>
…he shared pat Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
… outcome Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
…press Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
…ured Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
Signed-off-by: Mark Bolwell <info@krameff.com>
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.
Description of change
windows registry
regedit'saddress bar shows
HKEY_LOCAL_MACHINE\...andGet-ItemPropertyshowsHKLM:\...; both, and the long forms with the PowerShell colon, now parsealongside the short names, case-insensitively. Previously a path copied out
of either tool had to be hand-edited before syver would take it
view:--32,64ornative, selecting the WOW64registry view a check reads. On 64-bit Windows some keys exist twice, and a
spec had no way to say which copy it meant: it got whichever syver's own
architecture saw.
nativeis the default and behaves exactly as everyexisting gossfile did, which a test pins rather than assumes
type:reports the fullREG_*set.REG_NONE,REG_LINK,REG_DWORD_BIG_ENDIANand the threeREG_RESOURCE_*hardware descriptortypes previously came back as
UNKNOWN(n), so a type assertion againstthem could not be written.
REG_DWORD_BIG_ENDIANis deliberately not readas an integer: doing so would return a confidently wrong number in the
wrong byte order, so it renders as hex like the other opaque types
place now says so. This is the one shape where a truthful answer reliably
answers a different question from the one asked:
HKLM\...\ProfileListasks about a value and is false,
HKLM\...\ProfileList\asks about thekey and is true. Asserting
exists: falseagainst the first thereforePASSES while testing nothing the author intended. The trailing backslash is
still not guessed at or made optional -- guessing moves the ambiguity
somewhere you cannot see it -- but the confusable case is no longer silent
REG_EXPAND_SZis documented as compared unexpanded: a value holding%SystemRoot%\System32is matched as that literal text. Unchangedbehaviour, previously unstated
windows command timeouts
command:that timed out killed the process syver started and leftanything that process had spawned running.
command:runs throughcmd /c, so the thing syver starts is a shell and the thing that hangs isthe shell's child -- meaning the leak was the normal case on Windows, not
an edge one. The process now runs inside a Job Object whose closure
terminates the whole tree
stating because the documentation said the opposite. A process that calls
setsidleaves the POSIX process group and is permanently out of reach; aprocess cannot leave a job unless it was created to break away and the job
permits it. The daemonising case that escapes on POSIX does not escape on
Windows
tree, so a check that deliberately starts a background process and exits
zero still leaves it running
service:had no process-groupprotection at all, and now shares the same mechanism
container image
image carried
org.opencontainers.image.descriptionas a label on eachper-architecture image, but a multi-architecture image is published behind
an index, the index carries no labels, and the index is what GitHub
Packages reads. The same values are now attached as OCI annotations as
well, on the index and on each manifest, for both the release images and
the moving branch image. Nothing about the images themselves changed, only
what a registry can read about them without pulling one
docs
what was assumed.
port:errors withnot implemented yeton Windows:gopsutil ships a Windows backend for connection enumeration, so the row had
recorded an assumption nobody had checked.
process: statusreads notimplemented rather than broken, because that is what the library reports.
process: userworks, and had read no data. The page says where eachcame from, and notes that the
port:andmount:fixtures are skipped, soa green Windows suite does not cover them
documentation index: goss vs Syver, Windows and Testing. They
are now listed. Navigation on the published site was unaffected, since it is
generated from the directory rather than from that list, but anyone reading
the index as the table of contents was missing them
documentation rather than at the
docs/directory, and says plainly thatthe site is built from
main, so it shows the latest release rather thanunreleased work
RELEASES.mdgained a Re-cut tags section. Two entries pointed at "thenote below" for the detail of why their tag was re-cut, and those notes had
been moved out of the file, so both references led nowhere. The section
names the four tags that were deleted and re-created after first being
pushed, and says what a clone that fetched one of them beforehand has to do:
git fetch --tags --force, since git will not correct a stale tag on its owntests
so a suite that quietly got smaller still reported a clean pass. It could
not see an assertion that stopped existing, nor one that turned into a skip,
because a skipped assertion never fails and over a third of these fixtures
use
skip: true. Fixtures now declare# expect-count:and# expect-skipped:alongside the existing# expect-exit:, in the sameinline form, and every one of them has been seeded.
Failedis deliberatelynot pinned, since it depends on the host, which is what the exit code is for
count, the total assertions and the total skipped. The per-platform CI jobs
are named identically and all render as an identical green tick, while the
suites behind them differ by close to an order of magnitude
grep -q, so a mismatch aborted the run with no message: the operator saw anon-zero exit and had to scroll back through the validate output to work out
which of the three numbers had moved. It now names both sides, and prints
the counts it matched on a pass. The pass condition itself is unchanged
docs
docs/windows.mdhad drifted from thefixtures it describes. It said
interfaceasserted nothing, when thatfixture has two live entries including an absent-adapter case, and it
omitted
autoadd, which is the fixture that really asserts nothing. Fourother rows undercounted. Every row is now measured, an assertion column has
been added, and the re-derivation instructions point at the
# expect-count:directive each fixture now carries, which is checked onevery run and so cannot drift silently
docs/windows.mdanddocs/testing.mdnow explain the skipcascade: a resource whose existence check fails has its remaining
attributes reported as skipped rather than failed, so one missing file turns
five further assertions into skips. That is why the same fixtures skip 33
assertions driven from Linux and 19 on a real Windows host, and it is why a
resource quietly disappearing shows up as a rise in skips rather than a
failure
docs/platforms.mdunderstated macOS andWindows. It marked
serveon Windows as never tried, andserveandvalidateon macOS as working but without automated tests. All three run onevery push and pass, as do
addandhelpon both platforms. The cells arenow measured from CI job logs rather than estimated, and the page says which
log lines prove them, because the workflow derives its target from
go envand so tells you a lane is wired up rather than that it ran.
autoaddandrenderare unchanged:autoadd's fixture is skipped on both platforms andrenderhas no fixture anywherewindows
mount:check on Windows said the mountpoint was not found, blamingthe path the operator wrote for what is actually a missing implementation.
It now says it is not supported on this platform. This is Windows-only:
mount:is already fully supported on macOS, through the same POSIX lookupLinux uses, so neither platform's behaviour changes. The fix is a platform
capability check placed before the shared lookup rather than a reordering
of it, so supported platforms take exactly the path they did
process: statusreturned an empty list and no error on Windows, wherethe underlying library cannot read process state at all. The check ran,
found the process, reported nothing about it and passed. It now errors when
every matching process fails to read, while still tolerating a process that
exits between being listed and being read when others were read
successfully. Note the boundary: where exactly one process matches,
which is the common case for a single-instance daemon, those two are the
same event and the check errors rather than tolerating it. That is the
intended trade: an error naming the cause is better than an empty result
reported as success for a process that demonstrably exists.
process: userhad the same shape and gets the same rulesyver add mounton Windows now fails instead of silently writing anexists: falseentry it never verified. It is the same fix seen from theaddside: the old mountpoint-not-found error was excluded frompropagation as an ordinary "not a mount" answer, and the honest
not-supported error is not
C:\...) wasresolved relative to the including file instead, because the absoluteness
test was a literal check for a leading
/. Paths beginning/still behaveexactly as before on every platform. A UNC path (
\\server\share\...)now resolves too, where it was previously joined onto the including file's
directory and silently failed to resolve. That follows from using the
platform's own definition of absolute, and makes a gossfile on a Windows
file share usable as a shared include
~\Documents\xdid not expand on Windows. Home-directory expansion splitthe path on
/only, so the whole string was read as an account nameautoadd
syver autoaddnow honours--log-level/SYVER_LOGLEVEL, and itsoutput carries the same timestamped format as every other subcommand. It
was the one verb that never installed the level filter, which did not matter
while nothing in that path logged. The warning below made it matter
syver autoaddsilently skipped any resource whose existence checkfailed, making an unreadable resource indistinguishable from one that is
genuinely absent. It now reports the reason and carries on, rather than
either hiding it or aborting the whole run over one entry. Lookups that ran
and found nothing, such as a path that is not a mount or a service that is
not registered, stay quiet: those are answers, not failures