diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2018-09-06 10:54:14 +0200 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2018-09-06 10:56:09 +0200 |
| commit | 596466b38cd4e2de23df479ffd78dece9966d875 (patch) | |
| tree | ade7a76b932f6311f505c4615755a56997411035 /pkg/osutil/osutil.go | |
| parent | 873745f2ff183dcbc303a504683ccaa3a472a635 (diff) | |
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.
Diffstat (limited to 'pkg/osutil/osutil.go')
| -rw-r--r-- | pkg/osutil/osutil.go | 6 |
1 files changed, 2 insertions, 4 deletions
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. |
