| 1 |
// Copyright 2025 The Go Authors. All rights reserved. |
| 2 |
// Use of this source code is governed by a BSD-style |
| 3 |
// license that can be found in the LICENSE file. |
| 4 |
|
| 5 |
package runtime_test |
| 6 |
|
| 7 |
import ( |
| 8 |
"internal/testenv" |
| 9 |
"runtime" |
| 10 |
"testing" |
| 11 |
) |
| 12 |
|
| 13 |
func TestSyscallArgs(t *testing.T) { |
| 14 |
if runtime.GOOS != "darwin" { |
| 15 |
t.Skipf("skipping test: GOARCH=%s", runtime.GOARCH) |
| 16 |
} |
| 17 |
testenv.MustHaveCGO(t) |
| 18 |
|
| 19 |
exe, err := buildTestProg(t, "testsyscall") |
| 20 |
if err != nil { |
| 21 |
t.Fatal(err) |
| 22 |
} |
| 23 |
|
| 24 |
cmd := testenv.Command(t, exe) |
| 25 |
if out, err := cmd.CombinedOutput(); err != nil { |
| 26 |
t.Fatalf("test program failed: %v\n%s", err, out) |
| 27 |
} |
| 28 |
} |