From 8ef00507063baf3fa681bb53113cb33adda5e4d7 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 13 Dec 2017 20:12:13 +0100 Subject: prog: don't serialize output data args Fixes #188 We now will write just ""/1000 to denote a 1000-byte output buffer. Also we now don't store 1000-byte buffer in memory just to denote size. Old format is still parsed. --- prog/encoding_test.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'prog/encoding_test.go') diff --git a/prog/encoding_test.go b/prog/encoding_test.go index 39063a055..5fce30142 100644 --- a/prog/encoding_test.go +++ b/prog/encoding_test.go @@ -168,8 +168,12 @@ func TestSerializeDeserialize(t *testing.T) { target := initTargetTest(t, "test", "64") tests := [][2]string{ { - `serialize(&(0x7f0000408000)={"6861736800000000000000000000", "4849000000"})`, - `serialize(&(0x7f0000408000)={'hash\x00', 'HI\x00'})`, + `serialize0(&(0x7f0000408000)={"6861736800000000000000000000", "4849000000"})`, + `serialize0(&(0x7f0000408000)={'hash\x00', 'HI\x00'})`, + }, + { + `serialize1(&(0x7f0000000000)="0000000000000000", 0x8)`, + `serialize1(&(0x7f0000000000)=""/8, 0x8)`, }, } for _, test := range tests { -- cgit mrf-deployment