diff options
| author | juanPabloMiceli <48705702+juanPabloMiceli@users.noreply.github.com> | 2023-01-19 15:59:14 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-19 15:59:14 -0500 |
| commit | 551737f1076a910f809cc27ac629c587bc84fc2d (patch) | |
| tree | 7e847ee19f02e49269ac04437a5e62852aa2bf7e /pkg/osutil | |
| parent | 71197f3ac138d7cb03551b7d2159bfc4ecf5c5c2 (diff) | |
vm/starnix: add support for fuzzing starnix (#3624)
This commit adds a new VM for fuzzing starnix.
The VM will boot a fuchsia image using the `ffx` tool and will connect to an adb server inside it. Fuzzing will be done using HostFuzzer mode due to some features not being implemented yet in starnix. Once this is possible, fuzzing will be performed without HostFuzzer mode.
Co-authored-by: Juampi Miceli <jpmiceli@google.com>
Diffstat (limited to 'pkg/osutil')
| -rw-r--r-- | pkg/osutil/osutil.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/osutil/osutil.go b/pkg/osutil/osutil.go index c07c6372b..6ac96b344 100644 --- a/pkg/osutil/osutil.go +++ b/pkg/osutil/osutil.go @@ -130,6 +130,11 @@ func PrependContext(ctx string, err error) error { } } +func IsDir(name string) bool { + fileInfo, err := os.Stat(name) + return err == nil && fileInfo.IsDir() +} + // IsExist returns true if the file name exists. func IsExist(name string) bool { _, err := os.Stat(name) |
