Reduce supported platform matrix

This commit is contained in:
2026-09-07 03:28:50 +00:00
parent 1558c9ccae
commit f8e3e651e6
26 changed files with 32 additions and 387 deletions

View File

@@ -4,7 +4,6 @@ import (
"errors"
"os"
"path/filepath"
"runtime"
"strings"
"testing"
"time"
@@ -117,9 +116,6 @@ func TestInspectExtractionEvidenceClassifiesBundleStates(t *testing.T) {
paths.Root = t.TempDir()
}},
{name: "unsafe symlink", state: ExtractionEvidenceUnsafe, mutate: func(t *testing.T, _ *SessionPaths, m *manifest.Manifest) {
if runtime.GOOS == "windows" {
t.Skip("symlink creation requires privileges on Windows")
}
path := m.Stages["extract"].Outputs[0].LocalPath
outside := filepath.Join(t.TempDir(), "outside.json")
writeExtractionFixtureFile(t, outside, `{"outside":true}`)

View File

@@ -1,11 +1,10 @@
//go:build !linux && !darwin && !windows
//go:build !linux && !darwin
package artifacts
import (
"fmt"
"os"
"runtime"
)
func acquireHeldFileLock(_ *os.File) error {

View File

@@ -1,29 +0,0 @@
//go:build windows
package artifacts
import (
"errors"
"os"
"golang.org/x/sys/windows"
)
func acquireHeldFileLock(file *os.File) error {
err := windows.LockFileEx(
windows.Handle(file.Fd()),
windows.LOCKFILE_EXCLUSIVE_LOCK|windows.LOCKFILE_FAIL_IMMEDIATELY,
0,
1,
0,
&windows.Overlapped{},
)
if errors.Is(err, windows.ERROR_LOCK_VIOLATION) {
return errHeldLockConflict
}
return err
}
func releaseHeldFileLock(file *os.File) error {
return windows.UnlockFileEx(windows.Handle(file.Fd()), 0, 1, 0, &windows.Overlapped{})
}