veyron.io/veyron/veyron/lib/modules: Fix build breakages related to modules and the shell.

Change-Id: Ifa1553406bffa7d9af3af7f2167741375fdabb51
diff --git a/lib/modules/core/core_test.go b/lib/modules/core/core_test.go
index 89df492..6d1731d 100644
--- a/lib/modules/core/core_test.go
+++ b/lib/modules/core/core_test.go
@@ -53,6 +53,7 @@
 	}
 	s := expect.NewSession(t, root.Stdout(), time.Second)
 	s.ExpectVar("MT_NAME")
+	s.ExpectVar("MT_ADDR")
 	s.ExpectVar("PID")
 	root.CloseStdin()
 	s.Expect("PASS")
diff --git a/tools/naming/simulator/driver.go b/tools/naming/simulator/driver.go
index 3643eda..35ca8de 100644
--- a/tools/naming/simulator/driver.go
+++ b/tools/naming/simulator/driver.go
@@ -284,7 +284,7 @@
 		r := p[rem:]
 		v, present := sh.GetVar(vn)
 		if !present {
-			return a, nil
+			return a, fmt.Errorf("unknown variable: %q", vn)
 		}
 		result += v
 		result += r
diff --git a/tools/naming/simulator/driver_test.go b/tools/naming/simulator/driver_test.go
index b448103..d4dac88 100644
--- a/tools/naming/simulator/driver_test.go
+++ b/tools/naming/simulator/driver_test.go
@@ -76,9 +76,9 @@
 		{"${fo", fmt.Errorf("unterminated variable: %q", "{fo")},
 	}
 	for i, c := range errors {
-		_, got := subVariables(sh, []string{c.input})
-		if got.Error() != c.err.Error() {
-			t.Errorf("%d: %q: expected error: got %q, want %q", i, c.input, got, c.err)
+		vars, got := subVariables(sh, []string{c.input})
+		if (got == nil && c.err != nil) || got.Error() != c.err.Error() {
+			t.Errorf("%d: %q: expected error: got %v (with results %#v) want %v", i, c.input, got, vars, c.err)
 		}
 	}
 }