[PATCH] check_layer: Add tests for constant st_dev

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



With constant st_dev implemented, overlayfs never returns the real dev
corresponding to lowerdir filesystems. Also, for the samefs case,
overlayfs always returns the pseudo st_dev corresponding to the union
layer.

Signed-off-by: Chandan Rajendra <chandan@xxxxxxxxxxxxxxxxxx>
---
 context.py | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/context.py b/context.py
index 829fb69..f6dbbe7 100644
--- a/context.py
+++ b/context.py
@@ -532,17 +532,15 @@ class test_context:
         if self.skip_layer_test():
             pass
         elif dev == self.lower_fs():
-            if dentry.is_dir():
-                raise TestError(name + ": Directory unexpectedly on lower filesystem")
+            # Overlayfs never returns st_dev corresponding to any of
+            # the lower layers
+            raise TestError(name + ": File unexpectedly has lowerfs dev id")
         elif dentry.is_dir():
             if dev != self.upper_dir_fs():
                 raise TestError(name + ": Directory not on union layer")
         elif dev == self.upper_fs() and not dentry.on_upper():
             raise TestError(name + ": File unexpectedly on upper layer")
-        elif dev != self.upper_fs() and dev != self.upper_dir_fs() and self.config().is_samefs():
-            # For samefs, file is on overlay dev
-            # TODO: for non-samefs, check file dev matches pseudo dev
-            # and that pseduo dev != real dev
+        elif dev != self.upper_dir_fs() and self.config().is_samefs():
             raise TestError(name + ": File on unexpected layer")
 
         if dentry.is_sym() and dentry not in symlinks:
-- 
2.9.4

--
To unsubscribe from this list: send the line "unsubscribe linux-unionfs" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Filesystems Devel]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux