From 9fe4bdc5f1037a409e82299f36117030114c7b94 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Fri, 20 Jul 2018 20:26:05 +0200 Subject: executor: overhaul Make as much code as possible shared between all OSes. In particular main is now common across all OSes. Make more code shared between executor and csource (in particular, loop function and threaded execution logic). Also make loop and threaded logic shared across all OSes. Make more posix/unix code shared across OSes (e.g. signal handling, pthread creation, etc). Plus other changes along similar lines. Also support test OS in executor (based on portable posix) and add 4 arches that cover all execution modes (fork server/no fork server, shmem/no shmem). This change paves way for testing of executor code and allows to preserve consistency across OSes and executor/csource. --- executor/test.go | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 executor/test.go (limited to 'executor/test.go') diff --git a/executor/test.go b/executor/test.go deleted file mode 100644 index f318b5627..000000000 --- a/executor/test.go +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright 2017 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. - -//go:generate bash -c "gcc kvm_gen.cc kvm.S -o kvm_gen && ./kvm_gen > kvm.S.h && rm ./kvm_gen" - -// +build linux - -package executor - -// int test_copyin(); -// int test_csum_inet(); -// int test_csum_inet_acc(); -// int test_kvm(); -import "C" - -func testCopyin() int { - return int(C.test_copyin()) -} - -func testCsumInet() int { - return int(C.test_csum_inet()) -} - -func testCsumInetAcc() int { - return int(C.test_csum_inet_acc()) -} - -func testKVM() int { - return int(C.test_kvm()) -} - -// Prevent deadcode warnings: -var ( - _ = testCopyin - _ = testCsumInet - _ = testCsumInetAcc - _ = testKVM -) -- cgit mrf-deployment