From 78e3ad98f6120342ae56b9812c695637fc245c75 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 3 Aug 2018 19:48:30 +0200 Subject: sys/test: add more tests Add syz_errno syscall which sets errno to the argument, and add a test with different errno values. This mostly tests the testing infrastructure itself. Add syz_compare syscall which compare two blobs, this can be used for testing of argument memory layout. Implement syz_mmap and fix Makefile to allow building syz-execprog for test OS. Useful for debugging. Update #603 --- executor/syscalls.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'executor/syscalls.h') diff --git a/executor/syscalls.h b/executor/syscalls.h index a8845adb5..6f53b4490 100644 --- a/executor/syscalls.h +++ b/executor/syscalls.h @@ -11439,6 +11439,8 @@ const call_t syscalls[] = { #if GOARCH_32_fork_shmem const call_t syscalls[] = { + {"syz_compare", 0, (syscall_t)syz_compare}, + {"syz_errno", 0, (syscall_t)syz_errno}, {"syz_mmap", 0, (syscall_t)syz_mmap}, }; @@ -11446,6 +11448,8 @@ const call_t syscalls[] = { #if GOARCH_32_shmem const call_t syscalls[] = { + {"syz_compare", 0, (syscall_t)syz_compare}, + {"syz_errno", 0, (syscall_t)syz_errno}, {"syz_mmap", 0, (syscall_t)syz_mmap}, }; @@ -11472,6 +11476,8 @@ const call_t syscalls[] = { {"mutate8", 0}, {"serialize0", 0}, {"serialize1", 0}, + {"syz_compare", 0, (syscall_t)syz_compare}, + {"syz_errno", 0, (syscall_t)syz_errno}, {"syz_mmap", 0, (syscall_t)syz_mmap}, {"test", 0}, {"test$align0", 0}, @@ -11566,6 +11572,8 @@ const call_t syscalls[] = { #if GOARCH_64_fork const call_t syscalls[] = { + {"syz_compare", 0, (syscall_t)syz_compare}, + {"syz_errno", 0, (syscall_t)syz_errno}, {"syz_mmap", 0, (syscall_t)syz_mmap}, }; -- cgit mrf-deployment