From fbd1392a46558eb4adb368ba37fdce2b45013c1f Mon Sep 17 00:00:00 2001 From: Daniel J Walsh Date: Wed, 19 Sep 2018 09:54:15 -0400 Subject: Don't output inodes created to run a container There is a group of inodes that get created when running a container if they do not exist. containerMounts = map[string]bool{ "/dev": true, "/etc/hostname": true, "/etc/hosts": true, "/etc/resolv.conf": true, "/proc": true, "/run": true, "/run/.containerenv": true, "/run/secrets": true, "/sys": true, } If the destination inode does not exist, libpod/runc will create the inode. This can cause programs like podman diff to see the image as having changed, when actually it has not. This patch ignores changes in these inodes. Signed-off-by: Daniel J Walsh Closes: #1508 Approved by: giuseppe --- contrib/python/podman/test/test_containers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'contrib/python/podman/test') diff --git a/contrib/python/podman/test/test_containers.py b/contrib/python/podman/test/test_containers.py index 70221e33d..3de1e54bc 100644 --- a/contrib/python/podman/test/test_containers.py +++ b/contrib/python/podman/test/test_containers.py @@ -111,8 +111,8 @@ class TestContainers(PodmanTestCase): list(actual.keys()))) # TODO: brittle, depends on knowing history of ctnr - self.assertGreaterEqual(len(actual['changed']), 2) - self.assertGreaterEqual(len(actual['added']), 2) + self.assertGreaterEqual(len(actual['changed']), 0) + self.assertGreaterEqual(len(actual['added']), 0) self.assertEqual(len(actual['deleted']), 0) def test_kill(self): -- cgit v1.2.3-54-g00ecf