From 11a690d2752b590cadebe982ae4b66bf5c0cccef Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Wed, 28 Sep 2016 20:06:42 +0200 Subject: sys, prog: add tests for description parsing and serialization Add sys/test.txt file with description of syscalls for tests. These descriptions can be used to ensure that we can parse everything we clain we can parse. Use these descriptions to write several tests for exec serialization (one test shows that alignment handling is currently incorrect). These test descriptions can also be used to write e.g. mutation tests. Update #78 --- sys/test.txt | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 sys/test.txt (limited to 'sys') diff --git a/sys/test.txt b/sys/test.txt new file mode 100644 index 000000000..67e338a83 --- /dev/null +++ b/sys/test.txt @@ -0,0 +1,25 @@ +# Copyright 2015 syzkaller project authors. All rights reserved. +# Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. + +# Syscalls used in syzkaller tests. + +syz_test() + +# Integer types. +syz_test$int(a0 intptr, a1 int8, a2 int16, a3 int32, a4 int64) + +# Opt arguments +syz_test$opt0(a0 intptr[opt]) +syz_test$opt1(a0 ptr[in, intptr, opt]) +syz_test$opt2(a0 vma[opt]) + +# Struct alignment. +syz_test$align0(a0 ptr[in, align0]) + +align0 { + f0 int16 + f1 int32 + f2 int8 + f3 int16 + f4 int64 +} -- cgit mrf-deployment