diff options
Diffstat (limited to 'pkg/csource/csource_test.go')
| -rw-r--r-- | pkg/csource/csource_test.go | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go index 3e2c75a23..2eb8cd150 100644 --- a/pkg/csource/csource_test.go +++ b/pkg/csource/csource_test.go @@ -53,6 +53,23 @@ func TestGenerate(t *testing.T) { checked[target.OS] = true t.Parallel() testTarget(t, target, full) + testPseudoSyscalls(t, target) + }) + } +} + +func testPseudoSyscalls(t *testing.T, target *prog.Target) { + // Use options that are as minimal as possible. + // We want to ensure that the code can always be compiled. + opts := Options{ + Slowdown: 1, + } + rs := testutil.RandSource(t) + for _, meta := range target.PseudoSyscalls() { + p := target.GenSampleProg(meta, rs) + t.Run(fmt.Sprintf("single_%s", meta.CallName), func(t *testing.T) { + t.Parallel() + testOne(t, p, opts) }) } } |
