Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions .gds/bundle.lock.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ bundle:
version: "0.9.4-dev"
release_sequence: 0
channel: "development"
source_tree_digest: "sha256:85d792bf33db30ad34ecd6ad0bf7bf0bdf84c41778432e87b45a89e200dbe18b"
digest: "sha256:7d089792b096f905b6b9568f62fef25b568f5e37b1ed8a17543380bf8e9d28e3"
source_tree_digest: "sha256:6e0da387f1ed9a162e18f93470f9712783b4a7501a2ec9979d4ce2e15fc73f46"
digest: "sha256:030d8ccfe93fc4ded1b5fabe8e8df2eee4195c7b2eec33f6b1880dec851116bd"

projection:
input_digest: "sha256:7eac6db12d8a42a5003f12d2e22b63e17f20aff3b49764e000b94a9a782702f2"
output_digest: "sha256:2174c5325ae3eb87af133acd34eab9b63dedb780c795e562a134fd4608c55d68"
input_digest: "sha256:6bae4a92f7cdb2890369fc557f3e82f64172dae27ce782d7f10455a6a0f47949"
output_digest: "sha256:92322690bf490037b4ec99b33584004ed63a1dc7f2b7368e6362510292b81d3c"
files:
- path: ".gds/compiled-policy.json"
digest: "sha256:37ece9020fd9eeed4ee90582600c5e50cb3a7e32ee773719d1ccfad2d9cd1b6d"
- path: ".github/workflows/gds-ci.yml"
digest: "sha256:1269d657b675dc22f6e72ddd885a11d14519d8039d97a8d86627f296333b2390"
digest: "sha256:21bbe5aad38befa4f10438841bcfd06f42dd9981047e057ec8142fa9326d0bd0"
4 changes: 2 additions & 2 deletions .github/workflows/gds-ci.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# GENERATED FILE - DO NOT EDIT DIRECTLY
# generator: gds
# bundle: 0.9.4-dev
# source-tree-digest: sha256:85d792bf33db30ad34ecd6ad0bf7bf0bdf84c41778432e87b45a89e200dbe18b
# input-digest: sha256:7eac6db12d8a42a5003f12d2e22b63e17f20aff3b49764e000b94a9a782702f2
# source-tree-digest: sha256:6e0da387f1ed9a162e18f93470f9712783b4a7501a2ec9979d4ce2e15fc73f46
# input-digest: sha256:6bae4a92f7cdb2890369fc557f3e82f64172dae27ce782d7f10455a6a0f47949
# output-digest: sha256:15b87303cd0692fd8e5d88281771dded9fdc2fc027d600681155cb4e71f42386
# edit-source:
# - .gds/repository.yaml
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/platforms.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,7 @@ jobs:
- name: go build
run: go build -trimpath ./core/cmd/gds
- name: go test
run: go test ./...
# The integration package can exceed Go's default 10m aggregate
# budget on Intel runners. Per-operation deadlines remain intact;
# the suite and the enclosing job both keep explicit upper bounds.
run: go test -timeout=15m ./...
29 changes: 19 additions & 10 deletions core/app/module_process_unix_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ func TestDeclaredSuccessCannotLeaveBackgroundWriter(t *testing.T) {
assertTestChildStopped(t, pid)
}

func TestDeclaredTimeoutDoesNotClaimSetsidChildren(t *testing.T) {
func TestDeclaredCancellationDoesNotClaimSetsidChildren(t *testing.T) {
// Process-group cleanup is not ownership of setsid/Docker-daemon children.
// Darwin images have no util-linux `setsid(1)`; python3.os.setsid is the
// same syscall on linux and darwin.
Expand All @@ -93,16 +93,25 @@ func TestDeclaredTimeoutDoesNotClaimSetsidChildren(t *testing.T) {
if err := os.WriteFile(filepath.Join(dir, "setsid_child.py"), []byte(child), 0o600); err != nil {
t.Fatal(err)
}
report := runDeclaredCommand(
context.Background(),
dir,
"python3 setsid_child.py & wait",
350*time.Millisecond,
)
// Interpreter startup is outside the behavior under test. Wait for the
// child to enter its new session before exercising cancellation; a short
// launch deadline can otherwise kill Python before the child exists.
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
done := make(chan CommandReport, 1)
go func() {
done <- runDeclaredCommand(ctx, dir, "python3 setsid_child.py & wait", 30*time.Second)
}()
pid := readOwnedTestChild(t, dir)
defer stopOwnedTestChild(pid)
if report.Status == "passed" {
t.Fatalf("setsid child made the parent look finished: %#v", report)
cancel()
select {
case report := <-done:
if report.Status == "passed" {
t.Fatalf("setsid child made the parent look finished: %#v", report)
}
case <-time.After(6 * time.Second):
t.Fatal("setsid parent cancellation did not settle")
}
b, err := exec.Command("ps", "-o", "stat=", "-p", strconv.Itoa(pid)).Output()
if err != nil || strings.TrimSpace(string(b)) == "" || strings.HasPrefix(strings.TrimSpace(string(b)), "Z") {
Expand All @@ -112,7 +121,7 @@ func TestDeclaredTimeoutDoesNotClaimSetsidChildren(t *testing.T) {

func readOwnedTestChild(t *testing.T, dir string) int {
t.Helper()
deadline := time.Now().Add(3 * time.Second)
deadline := time.Now().Add(10 * time.Second)
for time.Now().Before(deadline) {
b, err := os.ReadFile(filepath.Join(dir, "child.pid"))
if err == nil {
Expand Down