@@ -135,12 +135,12 @@ func TestTranslateHelperFunctions(t *testing.T) {
135135 t .Fatalf ("resolveSymFuncForTarget darwin RawSyscall6 = %q" , got )
136136 }
137137
138+ if shouldKeepResolvedFunc ("syscall" , "linux" , "amd64" , "syscall.rawVforkSyscall" ) {
139+ t .Fatal ("linux rawVforkSyscall should be filtered" )
140+ }
138141 if ! shouldKeepResolvedFunc ("syscall" , "linux" , "amd64" , "syscall.Syscall" ) {
139142 t .Fatal ("normal syscall symbol should be kept" )
140143 }
141- if ! shouldKeepResolvedFunc ("syscall" , "linux" , "amd64" , "syscall.rawVforkSyscall" ) {
142- t .Fatal ("linux rawVforkSyscall should be kept" )
143- }
144144 if ! shouldKeepResolvedFunc ("syscall" , "darwin" , "arm64" , "syscall.RawSyscall" ) {
145145 t .Fatal ("darwin RawSyscall should be kept" )
146146 }
@@ -153,8 +153,8 @@ func TestTranslateHelperFunctions(t *testing.T) {
153153 }
154154 funcs := []extplan9asm.Func {{Sym : "·rawVforkSyscall" }, {Sym : "·Keep" }}
155155 filtered := FilterFuncs ("syscall" , "linux" , "amd64" , funcs , ResolveSymFunc ("syscall" ))
156- if len (filtered ) != len ( funcs ) {
157- t .Fatalf ("FilterFuncs linux = %#v, want all kept " , filtered )
156+ if len (filtered ) != 1 || filtered [ 0 ]. Sym != "·Keep" {
157+ t .Fatalf ("FilterFuncs linux = %#v, want only Keep " , filtered )
158158 }
159159 darwinFuncs := []extplan9asm.Func {{Sym : "·RawSyscall" }, {Sym : "·RawSyscall6" }, {Sym : "·Syscall" }}
160160 darwinFiltered := FilterFuncs ("syscall" , "darwin" , "arm64" , darwinFuncs , resolveDarwinSyscall )
0 commit comments