aboutsummaryrefslogtreecommitdiffstats
path: root/pkg/db
diff options
context:
space:
mode:
authorDmitry Vyukov <dvyukov@google.com>2022-01-24 18:14:42 +0100
committerDmitry Vyukov <dvyukov@google.com>2022-01-24 19:06:56 +0100
commit2cbffd88022f3e52b29aa9373ff0fb3d43ee5918 (patch)
tree9d1b10670b81a52f424f2bf0465f27c0d55ad4ae /pkg/db
parent96ff84efe96135909f870cd105d034ff9bf77c05 (diff)
pkg/db: fix test under root
Opening inaccessible file won't fail under root. Skip the test.
Diffstat (limited to 'pkg/db')
-rw-r--r--pkg/db/db_test.go3
1 files changed, 3 insertions, 0 deletions
diff --git a/pkg/db/db_test.go b/pkg/db/db_test.go
index 7ff69b2b7..9d10ffbed 100644
--- a/pkg/db/db_test.go
+++ b/pkg/db/db_test.go
@@ -138,6 +138,9 @@ func TestOpenInvalid(t *testing.T) {
}
func TestOpenInaccessible(t *testing.T) {
+ if os.Getuid() == 0 {
+ t.Skip("opening inaccessible file won't fail under root")
+ }
f, err := ioutil.TempFile("", "syz-db-test")
if err != nil {
t.Error(err)