diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2022-08-09 12:40:58 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2022-08-10 11:45:49 +0200 |
| commit | 8fad22bf840fc968171bee6cf294f026eb1e0d3a (patch) | |
| tree | 2bad644606904f4e75ef6fe689bac49e91877c40 /prog/mutation_test.go | |
| parent | a12254451cfa5e5129a0c091255d502b6805adf6 (diff) | |
prog: generate very long file names
Generate very long file names once in a while to provoke bugs like:
https://github.com/google/gvisor/commit/f857f268eceb1cdee0b2bdfa218c969c84033fcd
Diffstat (limited to 'prog/mutation_test.go')
| -rw-r--r-- | prog/mutation_test.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/prog/mutation_test.go b/prog/mutation_test.go index a14719065..5edba991c 100644 --- a/prog/mutation_test.go +++ b/prog/mutation_test.go @@ -86,6 +86,7 @@ func TestMutateArgument(t *testing.T) { if testutil.RaceEnabled { t.Skip("skipping in race mode, too slow") } + // nolint: lll tests := [][2]string{ // Mutate an integer with a higher priority than the boolean arguments. { @@ -122,6 +123,15 @@ func TestMutateArgument(t *testing.T) { `mutate_union(&(0x7f0000000000)=@f1=[0x0, 0x1, 0x2, 0x3, 0x0, 0x1, 0x2, 0x3, 0x0, 0x0])`, `mutate_union(&(0x7f0000000000)=@f1=[0x0, 0x1, 0xff, 0x3, 0x0, 0x1, 0x2, 0x3, 0x0, 0x0])`, }, + // Mutate filename using target.SpecialFileLenghts. + { + `mutate9(&(0x7f0000000000)='./file0\x00')`, + `mutate9(&(0x7f0000000040)='./file0aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\x00')`, + }, + { + `mutate10(&(0x7f0000000000)=""/10)`, + `mutate10(&(0x7f0000000040)=""/256)`, + }, } target := initTargetTest(t, "test", "64") |
