From f06b44424355224a04b2de493b11354610f33b90 Mon Sep 17 00:00:00 2001 From: Michael Pursifull Date: Tue, 8 Sep 2026 08:44:51 -0500 Subject: [PATCH] Skip the orphan-reclaim test where the listener image is unresolvable TestUninstallTerminatesRunningInstance asserts that Uninstall reclaims a managed engine started without an executor process handle. That reclaim needs the listener's executable path, and procImage resolves it through /proc. On a platform without /proc the image comes back empty, isOurEngineImage declines, and Uninstall refuses, which the procImage doc comment describes as the intended behavior there. The test asserted the Linux outcome on every platform, so on macOS it failed rather than skipped and left `make test-services` red on a supported development platform. A red baseline makes a real regression harder to notice. Check the precondition rather than the platform: skip only when pidOnPort resolves a pid but no image. The test starts running again on its own if the image ever becomes resolvable, without another change here. Verified on darwin/arm64 with Go 1.26.5: go test -run TestUninstallTerminatesRunningInstance -count=1 -v ./... --- SKIP: TestUninstallTerminatesRunningInstance (0.52s) listener image is unresolvable on darwin, so reclaim declines by design go test -count=1 ./... ok nvpair-engine-manager 37.073s No service binary output changes, so no services/versions.json bump. Refs: #17 Signed-off-by: Michael Pursifull --- services/nvpair-engine-manager/executor_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/services/nvpair-engine-manager/executor_test.go b/services/nvpair-engine-manager/executor_test.go index 40ebe249..d515243f 100644 --- a/services/nvpair-engine-manager/executor_test.go +++ b/services/nvpair-engine-manager/executor_test.go @@ -691,6 +691,16 @@ func TestUninstallTerminatesRunningInstance(t *testing.T) { t.Cleanup(func() { _ = cmd.Process.Kill() }) waitPortServing(t, port) + // Reclaiming a managed orphan needs the listener's executable path. + // procImage resolves it through /proc, so on a platform without /proc the + // image comes back empty, isOurEngineImage declines, and Uninstall refuses + // by design; see the procImage doc comment in proc_unix.go. Check the + // precondition rather than the platform, so this test starts running again + // on its own if the image ever becomes resolvable there. + if _, image, ok := pidOnPort(port); ok && image == "" { + t.Skipf("listener image is unresolvable on %s, so reclaim declines by design", runtime.GOOS) + } + m := testEngineManifest(bin) key := runtime.GOOS + "/" + runtime.GOARCH p := m.Platforms[key]