summaryrefslogtreecommitdiffhomepage
path: root/runsc/cmd/capability_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'runsc/cmd/capability_test.go')
-rw-r--r--runsc/cmd/capability_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/runsc/cmd/capability_test.go b/runsc/cmd/capability_test.go
index e13a94486..99075d82d 100644
--- a/runsc/cmd/capability_test.go
+++ b/runsc/cmd/capability_test.go
@@ -122,6 +122,9 @@ func TestCapabilities(t *testing.T) {
func TestMain(m *testing.M) {
flag.Parse()
- specutils.MaybeRunAsRoot()
+ if err := specutils.MaybeRunAsRoot(); err != nil {
+ fmt.Fprintf(os.Stderr, "Error running as root: %v", err)
+ os.Exit(123)
+ }
os.Exit(m.Run())
}