From 93dcf0adc883d2e48bd5955bb5fad5688ea62e11 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Tue, 14 May 2019 10:18:11 +0200 Subject: prog: implement complex len target support This actually implements support for complex len targets during program generation and mutation. --- prog/size_test.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'prog/size_test.go') diff --git a/prog/size_test.go b/prog/size_test.go index 726f98d65..1962b3fc6 100644 --- a/prog/size_test.go +++ b/prog/size_test.go @@ -151,8 +151,11 @@ func TestAssignSize(t *testing.T) { "test$length29(&(0x7f0000000000)={'./a\\x00', './b/c\\x00', 0x0, 0x0, 0x0})", "test$length29(&(0x7f0000000000)={'./a\\x00', './b/c\\x00', 0xa, 0x14, 0x21})", }, + { + "test$length30(&(0x7f0000000000)={{{0x0, 0x0, 0x0, 0x0, 0x0, 0x0}, {'a', 'aaa', 'aaaaa', 'aaaaaa'}, &(0x7f0000000000)={'a', 'aaa', 'aaaaa', 'aaaaaa'}, &(0x7f0000000000)=&(0x7f0000000000)={'a', 'aaa', 'aaaaa', 'aaaaaa'}, 0x0}}, 0x0, &(0x7f0000000000)=0x0, 0x0)", + "test$length30(&(0x7f0000000000)={{{0x0, 0x18, 0x1, 0x3, 0x5, 0x6}, {'a', 'aaa', 'aaaaa', 'aaaaaa'}, &(0x7f0000000000)={'a', 'aaa', 'aaaaa', 'aaaaaa'}, &(0x7f0000000000)=&(0x7f0000000000)={'a', 'aaa', 'aaaaa', 'aaaaaa'}, 0x2}}, 0x40, &(0x7f0000000000)=0x18, 0x2)", + }, } - for i, test := range tests { p, err := target.Deserialize([]byte(test.unsizedProg), Strict) if err != nil { -- cgit mrf-deployment