From: Chandan Rajendra <chandan@linux.vnet.ibm.com>
To: linux-unionfs@vger.kernel.org
Cc: Chandan Rajendra <chandan@linux.vnet.ibm.com>,
miklos@szeredi.hu, amir73il@gmail.com
Subject: [PATCH] check_layer: Add tests for constant st_dev
Date: Tue, 4 Jul 2017 22:30:28 +0530 [thread overview]
Message-ID: <20170704170028.4278-1-chandan@linux.vnet.ibm.com> (raw)
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
next reply other threads:[~2017-07-04 17:00 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-07-04 17:00 Chandan Rajendra [this message]
2017-07-04 18:03 ` [PATCH] check_layer: Add tests for constant st_dev 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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170704170028.4278-1-chandan@linux.vnet.ibm.com \
--to=chandan@linux.vnet.ibm.com \
--cc=amir73il@gmail.com \
--cc=linux-unionfs@vger.kernel.org \
--cc=miklos@szeredi.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox