v23tests: port tools/debug to v23tests + v23tests improvements/fixes
Improvements to v23tests:
- invocations should be shut down in LIFO order - they were not!
- adopt the convention of naming v23 integration tests as:
<pkg>_v23_test.go
- export NewChildCredentials from the shell and use it in
v23tests to give DebugShell's access to the security agent.
- remove an annoying .VI(1) in vif.go
- make sure that all V23Tests in a single package share binaries, it's
up to v23 to arrange for sharing binaries across multiple packages.
- transition a bunch of testdata tests to <pkg>_v23_tests.
MultiPart: 1/2
Change-Id: Iee6db154a6908c0f4c817f7cb9d56f8982c188a5
diff --git a/lib/modules/shell.go b/lib/modules/shell.go
index cfdfc73..df14af9 100644
--- a/lib/modules/shell.go
+++ b/lib/modules/shell.go
@@ -136,7 +136,12 @@
return sh, nil
}
-func (sh *Shell) getChildCredentials() (c *os.File, err error) {
+// NewChildCredentials creates a new set of credentials, stored in the
+// security agent, that have a blessing from this shell's principal.
+// All processes started by this shell will have access to these credentials
+// and this method can be used to create other processes that can communicate
+// with these.
+func (sh *Shell) NewChildCredentials() (c *os.File, err error) {
if sh.ctx == nil {
return nil, nil
}
@@ -273,7 +278,7 @@
if err != nil {
return nil, err
}
- p, err := sh.getChildCredentials()
+ p, err := sh.NewChildCredentials()
if err != nil {
return nil, err
}