aboutsummaryrefslogtreecommitdiffstats
path: root/prog/size_test.go
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2019-05-14 10:18:11 +0200
committerDmitry Vyukov <dvyukov@google.com>2019-05-14 19:28:01 +0200
commit93dcf0adc883d2e48bd5955bb5fad5688ea62e11 (patch)
treeff83296b36f2d868088ed8fa2d1884586d438f5e /prog/size_test.go
parent16c881ad8573b0bb87e8bfb0c71cba90b701e9a9 (diff)
prog: implement complex len target support
This actually implements support for complex len targets during program generation and mutation.
Diffstat (limited to 'prog/size_test.go')
-rw-r--r--prog/size_test.go5
1 files changed, 4 insertions, 1 deletions
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 {