diff options
| author | Hrutvik Kanabar <hrutvik@google.com> | 2022-09-19 14:40:43 +0000 |
|---|---|---|
| committer | Marco Elver <me@marcoelver.com> | 2022-09-22 16:42:04 +0200 |
| commit | 5088f152247b1ec7659f72a05309254ca1b2b1d7 (patch) | |
| tree | 5e6ff5f9c83bd0d93d8b2e733fb456b251e8add0 /prog/minimization_test.go | |
| parent | 800605ed4763b8457f8238c9168ff71ce82d6b7c (diff) | |
sys/linux: make `syz_mount_image` a `no_minimize` syscall
Minimizing of large images is time-consuming and unlikely to reproduce
any errors. This commit therefore marks the `syz_mount_image`
pseudo-syscall as ineligible for minimization.
A test has also been added to `prog/minimization_test.go`.
Diffstat (limited to 'prog/minimization_test.go')
| -rw-r--r-- | prog/minimization_test.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/prog/minimization_test.go b/prog/minimization_test.go index 4da791560..de58ad217 100644 --- a/prog/minimization_test.go +++ b/prog/minimization_test.go @@ -228,6 +228,18 @@ func TestMinimize(t *testing.T) { "mutate9(&(0x7f0000000000)='./file0\\x00')\n", 0, }, + // Ensure `no_minimize` calls are untouched. + { + "linux", "amd64", + "syz_mount_image$ext4(&(0x7f0000000000)='ext4\\x00', &(0x7f0000000100)='./file0\\x00', 0x40000, 0x2a, &(0x7f0000000200)=[{&(0x7f0000010000)='test\\x00'/32, 0x20, 0x400}], 0x0, &(0x7f0000010020), 0x1)\n", + 0, + func(p *Prog, callIndex int) bool { + // Anything is allowed except removing a call. + return len(p.Calls) > 0 + }, + "syz_mount_image$ext4(&(0x7f0000000000)='ext4\\x00', &(0x7f0000000100)='./file0\\x00', 0x40000, 0x2a, &(0x7f0000000200)=[{&(0x7f0000010000)='test\\x00'/32, 0x20, 0x400}], 0x0, &(0x7f0000010020), 0x1)\n", + 0, + }, } t.Parallel() for ti, test := range tests { |
