tests: make MountInfo field accessible
Tests outside the test_helpers package may want to look at this.
This commit is contained in:
parent
035b3367b7
commit
b1819143c5
|
@ -18,9 +18,9 @@ var MountInfo map[string]mountInfo
|
||||||
|
|
||||||
type mountInfo struct {
|
type mountInfo struct {
|
||||||
// PID of the running gocryptfs process. Set by Mount().
|
// PID of the running gocryptfs process. Set by Mount().
|
||||||
pid int
|
Pid int
|
||||||
// List of open FDs of the running gocrypts process. Set by Mount().
|
// List of open FDs of the running gocrypts process. Set by Mount().
|
||||||
fds []string
|
Fds []string
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mount CIPHERDIR "c" on PLAINDIR "p"
|
// Mount CIPHERDIR "c" on PLAINDIR "p"
|
||||||
|
@ -125,8 +125,8 @@ func UnmountPanic(dir string) {
|
||||||
// resulting error.
|
// resulting error.
|
||||||
func UnmountErr(dir string) (err error) {
|
func UnmountErr(dir string) (err error) {
|
||||||
var fdsNow []string
|
var fdsNow []string
|
||||||
pid := MountInfo[dir].pid
|
pid := MountInfo[dir].Pid
|
||||||
fds := MountInfo[dir].fds
|
fds := MountInfo[dir].Fds
|
||||||
if pid <= 0 {
|
if pid <= 0 {
|
||||||
fmt.Printf("UnmountErr: %q was not found in MountInfo, cannot check for FD leaks\n", dir)
|
fmt.Printf("UnmountErr: %q was not found in MountInfo, cannot check for FD leaks\n", dir)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue