Debian Codegraph @

trace/internal/testtrace/platforms.go

raw symbols SCIP
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 // Code generated by "gen.bash" from internal/trace; DO NOT EDIT.
6
7 //go:build go1.23
8
9 package testtrace
10
11 import (
12 "runtime"
13 "testing"
14 )
15
16 // MustHaveSyscallEvents skips the current test if the current
17 // platform does not support true system call events.
18 func MustHaveSyscallEvents(t *testing.T) {
19 if HasSyscallEvents() {
20 return
21 }
22 t.Skip("current platform has no true syscall events")
23 }
24
25 // HasSyscallEvents returns true if the current platform
26 // has real syscall events available.
27 func HasSyscallEvents() bool {
28 switch runtime.GOOS {
29 case "js", "wasip1":
30 // js and wasip1 emulate system calls by blocking on channels
31 // while yielding back to the environment. They never actually
32 // call entersyscall/exitsyscall.
33 return false
34 }
35 return true
36 }