summaryrefslogtreecommitdiffhomepage
path: root/pkg/sentry/kernel/table_test.go
diff options
context:
space:
mode:
authorIan Lewis <ianlewis@google.com>2019-06-10 23:37:32 -0700
committerShentubot <shentubot@google.com>2019-06-10 23:38:36 -0700
commit74e397e39accbeb9fcb5382ce963df55014ae7ce (patch)
treef8b2b855f581600854f4601e9495701872a727e1 /pkg/sentry/kernel/table_test.go
parent589f36ac4ae31b1f7f35a74d982398e48c28aa31 (diff)
Add introspection for Linux/AMD64 syscalls
Adds simple introspection for syscall compatibility information to Linux/AMD64. Syscalls registered in the syscall table now have associated metadata like name, support level, notes, and URLs to relevant issues. Syscall information can be exported as a table, JSON, or CSV using the new 'runsc help syscalls' command. Users can use this info to debug and get info on the compatibility of the version of runsc they are running or to generate documentation. PiperOrigin-RevId: 252558304
Diffstat (limited to 'pkg/sentry/kernel/table_test.go')
-rw-r--r--pkg/sentry/kernel/table_test.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/pkg/sentry/kernel/table_test.go b/pkg/sentry/kernel/table_test.go
index 8f7cdb9f3..3f2b042c8 100644
--- a/pkg/sentry/kernel/table_test.go
+++ b/pkg/sentry/kernel/table_test.go
@@ -26,11 +26,13 @@ const (
)
func createSyscallTable() *SyscallTable {
- m := make(map[uintptr]SyscallFn)
+ m := make(map[uintptr]Syscall)
for i := uintptr(0); i <= maxTestSyscall; i++ {
j := i
- m[i] = func(*Task, arch.SyscallArguments) (uintptr, *SyscallControl, error) {
- return j, nil, nil
+ m[i] = Syscall{
+ Fn: func(*Task, arch.SyscallArguments) (uintptr, *SyscallControl, error) {
+ return j, nil, nil
+ },
}
}