aboutsummaryrefslogtreecommitdiff
path: root/filesystem
diff options
context:
space:
mode:
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/path_test.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/filesystem/path_test.go b/filesystem/path_test.go
index 4152037..1c59dd5 100644
--- a/filesystem/path_test.go
+++ b/filesystem/path_test.go
@@ -23,6 +23,8 @@ import (
"io/ioutil"
"os"
"testing"
+
+ "github.com/google/fscrypt/util"
)
func TestDeviceNumber(t *testing.T) {
@@ -56,6 +58,9 @@ func TestDeviceNumber(t *testing.T) {
}
func TestHaveReadAccessTo(t *testing.T) {
+ if util.IsUserRoot() {
+ t.Skip("This test cannot be run as root")
+ }
file, err := ioutil.TempFile("", "fscrypt_test")
if err != nil {
t.Fatal(err)