diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2019-04-09 19:27:54 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2019-05-31 13:35:25 +0200 |
| commit | 142ce68175f5321ccde23eafda4830707f20e67b (patch) | |
| tree | 9c90af141c4a6a068b9a843438313f32cbc3b53f | |
| parent | c054a92ddef28b343db8a733b3e191cf96c28768 (diff) | |
pkg/runtest: add simple USB runtest
| -rw-r--r-- | pkg/runtest/run.go | 3 | ||||
| -rw-r--r-- | sys/linux/test/vusb | 3 | ||||
| -rw-r--r-- | tools/syz-runtest/runtest.go | 3 |
3 files changed, 9 insertions, 0 deletions
diff --git a/pkg/runtest/run.go b/pkg/runtest/run.go index 67f736657..b30d284c6 100644 --- a/pkg/runtest/run.go +++ b/pkg/runtest/run.go @@ -140,6 +140,9 @@ func (ctx *Context) generatePrograms(progs chan *RunRequest) error { if strings.HasSuffix(file.Name(), "~") { continue } + if strings.HasSuffix(file.Name(), ".swp") { + continue + } p, requires, results, err := ctx.parseProg(file.Name()) if err != nil { return err diff --git a/sys/linux/test/vusb b/sys/linux/test/vusb new file mode 100644 index 000000000..500eef14e --- /dev/null +++ b/sys/linux/test/vusb @@ -0,0 +1,3 @@ +# requires: -sandbox=setuid -sandbox=namespace + +syz_usb_connect(0x0, 0x24, &(0x7f0000000000)={0x12, 0x1, 0x0, 0x97, 0xff, 0x82, 0x8, 0x2058, 0x1005, 0xc19b, 0x0, 0x0, 0x0, 0x1, [{0x9, 0x2, 0x12, 0x1, 0x0, 0x0, 0x0, 0x0, [{0x9, 0x4, 0x8f, 0x0, 0x0, 0xbf, 0x57, 0x5a, 0x0, [], []}]}]}, 0x0) diff --git a/tools/syz-runtest/runtest.go b/tools/syz-runtest/runtest.go index e507db571..61b89a809 100644 --- a/tools/syz-runtest/runtest.go +++ b/tools/syz-runtest/runtest.go @@ -284,6 +284,9 @@ func testParsing(target *prog.Target, dir string) error { if strings.HasSuffix(file.Name(), "~") { continue } + if strings.HasSuffix(file.Name(), ".swp") { + continue + } if err := runtest.TestParseProg(target, dir, file.Name()); err != nil { return err } |
