@@ -308,6 +308,7 @@ func TestDetectNohup(t *testing.T) {
308
308
t .Errorf ("ran test with -check_sighup_ignored and it succeeded: expected failure.\n Output:\n %s" , out )
309
309
}
310
310
Stop (c )
311
+
311
312
// Again, this time with nohup, assuming we can find it.
312
313
_ , err := os .Stat ("/usr/bin/nohup" )
313
314
if err != nil {
@@ -320,6 +321,13 @@ func TestDetectNohup(t *testing.T) {
320
321
data , _ := os .ReadFile ("nohup.out" )
321
322
os .Remove ("nohup.out" )
322
323
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
+
323
331
t .Errorf ("ran test with -check_sighup_ignored under nohup and it failed: expected success.\n Error: %v\n Output:\n %s%s" , err , out , data )
324
332
}
325
333
}
@@ -498,6 +506,16 @@ func TestNohup(t *testing.T) {
498
506
out , err := testenv .Command (t , "nohup" , args ... ).CombinedOutput ()
499
507
500
508
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
+
501
519
t .Errorf ("ran test with -send_uncaught_sighup=%d under nohup and it failed: expected success.\n Error: %v\n Output:\n %s" , i , err , out )
502
520
} else {
503
521
t .Logf ("ran test with -send_uncaught_sighup=%d under nohup.\n Output:\n %s" , i , out )
0 commit comments