aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/csource/csource_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2020-09-20 14:31:51 +0200
committerDmitry Vyukov <dvyukov@google.com>2020-09-20 15:12:12 +0200
commit7b84681e920e498236b20efc748010cbd9d0d2c9 (patch)
treec76e7683804692e85119a6aca791855cccb5dd58 /pkg/csource/csource_test.go
parent5620c9c4dbbce2d97e92839afd66ba7c32f4bf0c (diff)
pkg/csource: don't test auto-generated files
syz_mount_image tests are very large and TestSysTests takes too long. syz-imagegen that generates them does some of this testing (Deserialize/SerializeForExec).
Diffstat (limited to 'pkg/csource/csource_test.go')
-rw-r--r--pkg/csource/csource_test.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/pkg/csource/csource_test.go b/pkg/csource/csource_test.go
index ece28cd92..3eec99792 100644
--- a/pkg/csource/csource_test.go
+++ b/pkg/csource/csource_test.go
@@ -4,6 +4,7 @@
package csource
import (
+ "bytes"
"fmt"
"io/ioutil"
"math/rand"
@@ -152,6 +153,11 @@ func TestSysTests(t *testing.T) {
if err != nil {
t.Fatalf("failed to read %v: %v", file, err)
}
+ // syz_mount_image tests are very large and this test takes too long.
+ // syz-imagegen that generates does some of this testing (Deserialize/SerializeForExec).
+ if bytes.Contains(data, []byte("# requires: manual")) {
+ continue
+ }
p, err := target.Deserialize(data, prog.Strict)
if err != nil {
t.Fatalf("failed to parse program %v: %v", file, err)