diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2017-01-23 16:27:37 +0100 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2017-01-23 18:13:11 +0100 |
| commit | 1cf6a05e0ec1e456aabee97496594c4de70945d1 (patch) | |
| tree | 5a379aba5086a474b2a5e71b64a4297c252af781 /prog/size_test.go | |
| parent | b323c5aaa9b926ba43a9c5435b62b4fce992ff94 (diff) | |
sys, prog: add length of parent of parent to templates
Example:
```
struct s1 {
f0 len[s2] # length of s2
}
struct s2 {
f0 s1
f1 array[int32]
}
```
Diffstat (limited to 'prog/size_test.go')
| -rw-r--r-- | prog/size_test.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/prog/size_test.go b/prog/size_test.go index 0b7e5fb98..f6e4ab17c 100644 --- a/prog/size_test.go +++ b/prog/size_test.go @@ -72,7 +72,7 @@ func TestAssignSize(t *testing.T) { }, { "syz_test$length8(&(0x7f000001f000)={0x00, {0xff, 0x0, 0x00, [0xff, 0xff, 0xff]}, [{0xff, 0x0, 0x00, [0xff, 0xff, 0xff]}], 0x00, 0x0, [0xff, 0xff]})", - "syz_test$length8(&(0x7f000001f000)={0x32, {0xff, 0x1, 0x10, [0xff, 0xff, 0xff]}, [{0xff, 0x1, 0x10, [0xff, 0xff, 0xff]}], 0x10, 0x1, [0xff, 0xff]})", + "syz_test$length8(&(0x7f000001f000)={0x38, {0xff, 0x1, 0x10, [0xff, 0xff, 0xff]}, [{0xff, 0x1, 0x10, [0xff, 0xff, 0xff]}], 0x10, 0x1, [0xff, 0xff]})", }, { "syz_test$length9(&(0x7f000001f000)={&(0x7f0000000000/0x5000)=nil, (0x0000)})", @@ -118,6 +118,10 @@ func TestAssignSize(t *testing.T) { "syz_test$length19(&(0x7f0000000000)={{0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0xff}, 0xff, 0xff, 0xff})", "syz_test$length19(&(0x7f0000000000)={{0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x42, 0x14}, 0x14, 0x14, 0x5})", }, + { + "syz_test$length20(&(0x7f0000000000)={{{0xff, 0xff, 0xff, 0xff}, 0xff, 0xff, 0xff}, 0xff, 0xff})", + "syz_test$length20(&(0x7f0000000000)={{{0x4, 0x4, 0x7, 0x9}, 0x7, 0x7, 0x9}, 0x9, 0x9})", + }, } for i, test := range tests { |
