From 30633913343126384a7bdfab7d06fbf6dc4449cd Mon Sep 17 00:00:00 2001 From: Peng Tao Date: Fri, 19 Jul 2019 08:44:51 -0700 Subject: [PATCH] ut: skip TestBindUnmountContainerRootfsENOENTNotError for non-root mount syscall requires root. Fixes: #1898 Signed-off-by: Peng Tao --- virtcontainers/mount_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/virtcontainers/mount_test.go b/virtcontainers/mount_test.go index 1809d36eb..2c6407c19 100644 --- a/virtcontainers/mount_test.go +++ b/virtcontainers/mount_test.go @@ -344,6 +344,9 @@ func TestIsEphemeralStorage(t *testing.T) { // or directory attempting to be unmounted doesn't exist, then it // is not considered an error func TestBindUnmountContainerRootfsENOENTNotError(t *testing.T) { + if os.Getuid() != 0 { + t.Skip("Test disabled as requires root user") + } testMnt := "/tmp/test_mount" sID := "sandIDTest" cID := "contIDTest"