From 561c94884477f568bdb68aacebfeb4d0411a874b Mon Sep 17 00:00:00 2001 From: Hana Kim Date: Mon, 9 May 2016 15:14:07 -0400 Subject: [PATCH] os: skip Lchown test on Android if symlink doesn't work After upgrading builder device (android/arm) to android 5.0.2, the test started failing. Running 'ln -s' from shell fails with permission error. Change-Id: I5b9e312806d58532b41ea3560ff079dabbc6424e Reviewed-on: https://go-review.googlesource.com/22962 Reviewed-by: Brad Fitzpatrick --- src/os/os_unix_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/os/os_unix_test.go b/src/os/os_unix_test.go index c47f5462ab..5c10154760 100644 --- a/src/os/os_unix_test.go +++ b/src/os/os_unix_test.go @@ -145,6 +145,9 @@ func TestLchown(t *testing.T) { linkname := f.Name() + "2" if err := Symlink(f.Name(), linkname); err != nil { + if runtime.GOOS == "android" && IsPermission(err) { + t.Skip("skipping test on Android; permission error creating symlink") + } t.Fatalf("link %s -> %s: %v", f.Name(), linkname, err) } defer Remove(linkname)