Linux Overlay Filesystem development
 help / color / mirror / Atom feed
* [PATCH] check_layer: Add tests for constant st_dev
@ 2017-07-04 17:00 Chandan Rajendra
  2017-07-04 18:03 ` Amir Goldstein
  0 siblings, 1 reply; 9+ messages in thread
From: Chandan Rajendra @ 2017-07-04 17:00 UTC (permalink / raw)
  To: linux-unionfs; +Cc: Chandan Rajendra, miklos, amir73il

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@linux.vnet.ibm.com>
---
 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

^ permalink raw reply related	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2017-07-13 15:10 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-07-04 17:00 [PATCH] check_layer: Add tests for constant st_dev Chandan Rajendra
2017-07-04 18:03 ` Amir Goldstein
2017-07-07  5:36   ` Chandan Rajendra
2017-07-07 20:35     ` Amir Goldstein
2017-07-07 21:09       ` Amir Goldstein
2017-07-08  8:12         ` Amir Goldstein
2017-07-13 14:17           ` Chandan Rajendra
2017-07-13 14:59             ` Amir Goldstein
2017-07-13 15:10               ` Amir Goldstein

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox