From 596466b38cd4e2de23df479ffd78dece9966d875 Mon Sep 17 00:00:00 2001 From: Dmitry Vyukov Date: Thu, 6 Sep 2018 10:54:14 +0200 Subject: pkg/runtest: fixes for fuchsia Add simple fuchsia program, the one that is run during image testing. Fix csource errno printing for fuchsia. Fix creation of executable files (chmod is not implemented on fuchsia). Check that we get signal/coverage from all syscalls. --- pkg/osutil/osutil.go | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'pkg/osutil') diff --git a/pkg/osutil/osutil.go b/pkg/osutil/osutil.go index d9a543971..d8a1cbe84 100644 --- a/pkg/osutil/osutil.go +++ b/pkg/osutil/osutil.go @@ -196,10 +196,8 @@ func WriteFile(filename string, data []byte) error { } func WriteExecFile(filename string, data []byte) error { - if err := ioutil.WriteFile(filename, data, DefaultExecPerm); err != nil { - return err - } - return os.Chmod(filename, DefaultExecPerm) + os.Remove(filename) + return ioutil.WriteFile(filename, data, DefaultExecPerm) } // TempFile creates a unique temp filename. -- cgit mrf-deployment