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).
This commit is contained in:
Dmitry Vyukov 2020-09-20 14:31:51 +02:00
parent 5620c9c4db
commit 7b84681e92

View File

@ -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)