Skip to content

Commit bbab863

Browse files
prattmiccagedmantis
authored andcommitted
[release-branch.go1.21] os/signal: skip nohup tests on darwin builders
The new LUCI builders have a temporary limitation that breaks nohup. Skip nohup tests there. For #63875. Fixes #63911. Cq-Include-Trybots: luci.golang.try:go1.21-darwin-amd64_13 Change-Id: Ia9ffecea7310f84a21f6138d8f8cdfc5e1392307 Reviewed-on: https://go-review.googlesource.com/c/go/+/538698 Reviewed-by: Dmitri Shuralyov <[email protected]> Reviewed-by: Dmitri Shuralyov <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Bryan Mills <[email protected]> (cherry picked from commit a334c45) Reviewed-on: https://go-review.googlesource.com/c/go/+/546022
1 parent 7dc67e8 commit bbab863

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

src/os/signal/signal_test.go

+18
Original file line numberDiff line numberDiff line change
@@ -308,6 +308,7 @@ func TestDetectNohup(t *testing.T) {
308308
t.Errorf("ran test with -check_sighup_ignored and it succeeded: expected failure.\nOutput:\n%s", out)
309309
}
310310
Stop(c)
311+
311312
// Again, this time with nohup, assuming we can find it.
312313
_, err := os.Stat("/usr/bin/nohup")
313314
if err != nil {
@@ -320,6 +321,13 @@ func TestDetectNohup(t *testing.T) {
320321
data, _ := os.ReadFile("nohup.out")
321322
os.Remove("nohup.out")
322323
if err != nil {
324+
// nohup doesn't work on new LUCI darwin builders due to the
325+
// type of launchd service the test run under. See
326+
// https://go.dev/issue/63875.
327+
if runtime.GOOS == "darwin" && strings.Contains(string(out), "nohup: can't detach from console: Inappropriate ioctl for device") {
328+
t.Skip("Skipping nohup test due to darwin builder limitation. See https://go.dev/issue/63875.")
329+
}
330+
323331
t.Errorf("ran test with -check_sighup_ignored under nohup and it failed: expected success.\nError: %v\nOutput:\n%s%s", err, out, data)
324332
}
325333
}
@@ -498,6 +506,16 @@ func TestNohup(t *testing.T) {
498506
out, err := testenv.Command(t, "nohup", args...).CombinedOutput()
499507

500508
if err != nil {
509+
// nohup doesn't work on new LUCI darwin builders due to the
510+
// type of launchd service the test run under. See
511+
// https://go.dev/issue/63875.
512+
if runtime.GOOS == "darwin" && strings.Contains(string(out), "nohup: can't detach from console: Inappropriate ioctl for device") {
513+
// TODO(go.dev/issue/63799): A false-positive in vet reports a
514+
// t.Skip here as invalid. Switch back to t.Skip once fixed.
515+
t.Logf("Skipping nohup test due to darwin builder limitation. See https://go.dev/issue/63875.")
516+
return
517+
}
518+
501519
t.Errorf("ran test with -send_uncaught_sighup=%d under nohup and it failed: expected success.\nError: %v\nOutput:\n%s", i, err, out)
502520
} else {
503521
t.Logf("ran test with -send_uncaught_sighup=%d under nohup.\nOutput:\n%s", i, out)

0 commit comments

Comments
 (0)