diff options
| author | Andrey Konovalov <andreyknvl@google.com> | 2016-10-11 21:01:21 +0200 |
|---|---|---|
| committer | Andrey Konovalov <andreyknvl@google.com> | 2016-10-13 15:38:58 +0200 |
| commit | e4edb0e20b90350779b319f60f0d7878ef423e4f (patch) | |
| tree | 8ca14885513f95d3fb6b8fc5d9e2d612d7db79a0 /prog | |
| parent | 7686d19affbd3f592a64517679df85b9d49f4628 (diff) | |
Add tests for big-endian ints
Diffstat (limited to 'prog')
| -rw-r--r-- | prog/encodingexec_test.go | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/prog/encodingexec_test.go b/prog/encodingexec_test.go index e166e8ae8..207543705 100644 --- a/prog/encodingexec_test.go +++ b/prog/encodingexec_test.go @@ -129,6 +129,28 @@ func TestSerializeForExec(t *testing.T) { instrEOF, }, }, + { + "syz_test$end0(&(0x7f0000000000)={0x42, 0x42, 0x42, 0x42, 0x42})", + []uint64{ + instrCopyin, dataOffset + 0, argConst, 1, 0x42, + instrCopyin, dataOffset + 1, argConst, 2, 0x4200, + instrCopyin, dataOffset + 3, argConst, 4, 0x42000000, + instrCopyin, dataOffset + 7, argConst, 8, 0x4200000000000000, + instrCopyin, dataOffset + 15, argConst, 8, 0x4200000000000000, + callID("syz_test$end0"), 1, argConst, ptrSize, dataOffset, + instrEOF, + }, + }, + { + "syz_test$end1(&(0x7f0000000000)={0xe, 0x42, 0x1})", + []uint64{ + instrCopyin, dataOffset + 0, argConst, 2, 0x0e00, + instrCopyin, dataOffset + 2, argConst, 4, 0x42000000, + instrCopyin, dataOffset + 6, argConst, 8, 0x0100000000000000, + callID("syz_test$end1"), 1, argConst, ptrSize, dataOffset, + instrEOF, + }, + }, } for i, test := range tests { |
