os: stub out support for some more features

This is necessary for the following:

  - to make sure os/exec can be imported
  - to make sure internal/testenv can be imported

The internal/testenv package (which imports os/exec) is used by a lot of
tests. By adding support for it, more tests can be run.

This commit adds a bunch of new packages that now pass all tests.
This commit is contained in:
Ayke van Laethem
2020-09-25 19:59:48 +02:00
committed by Ron Evans
parent 6cbaed75c8
commit 718746dd21
12 changed files with 186 additions and 12 deletions
+7
View File
@@ -67,6 +67,13 @@ func Getenv(key string) (value string, found bool) {
return "", false
}
func Environ() []string {
env := runtime_envs()
envCopy := make([]string, len(env))
copy(envCopy, env)
return envCopy
}
func Open(path string, mode int, perm uint32) (fd int, err error) {
return 0, ENOSYS
}