From f2d77726c8e7d2662bda0414d55073cd51742ff3 Mon Sep 17 00:00:00 2001 From: Andrey Konovalov Date: Fri, 30 Sep 2016 19:14:50 +0200 Subject: Add exec serialize tests for array[int8] --- prog/encodingexec_test.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'prog') diff --git a/prog/encodingexec_test.go b/prog/encodingexec_test.go index eddda5199..e166e8ae8 100644 --- a/prog/encodingexec_test.go +++ b/prog/encodingexec_test.go @@ -110,6 +110,25 @@ func TestSerializeForExec(t *testing.T) { instrEOF, }, }, + { + "syz_test$array1(&(0x7f0000000000)={0x42, \"0102030405\"})", + []uint64{ + instrCopyin, dataOffset + 0, argConst, 1, 0x42, + instrCopyin, dataOffset + 1, argData, 5, 0x0504030201, + callID("syz_test$array1"), 1, argConst, ptrSize, dataOffset, + instrEOF, + }, + }, + { + "syz_test$array2(&(0x7f0000000000)={0x42, \"aaaaaaaabbbbbbbbccccccccdddddddd\", 0x43})", + []uint64{ + instrCopyin, dataOffset + 0, argConst, 2, 0x42, + instrCopyin, dataOffset + 2, argData, 16, 0xbbbbbbbbaaaaaaaa, 0xddddddddcccccccc, + instrCopyin, dataOffset + 18, argConst, 2, 0x43, + callID("syz_test$array2"), 1, argConst, ptrSize, dataOffset, + instrEOF, + }, + }, } for i, test := range tests { -- cgit mrf-deployment