From 8fad22bf840fc968171bee6cf294f026eb1e0d3a Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 9 Aug 2022 12:40:58 +0200 Subject: 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 --- prog/mutation_test.go | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'prog/mutation_test.go') 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") -- cgit mrf-deployment