<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Apr 30, 2019 at 3:21 PM Murphy Zhou <<a href="mailto:xzhou@redhat.com">xzhou@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Currently swapfiles on Overlayfs are not supported.<br>
<br>
So if we are on overlayfs and we get EINVAL from swapon() we return TCONF.<br>
<br>
Signed-off-by: Murphy Zhou <<a href="mailto:xzhou@redhat.com" target="_blank">xzhou@redhat.com</a>><br>
---<br>
 testcases/kernel/syscalls/swapon/swapon02.c | 5 +++++<br>
 1 file changed, 5 insertions(+)<br>
<br>
diff --git a/testcases/kernel/syscalls/swapon/swapon02.c b/testcases/kernel/syscalls/swapon/swapon02.c<br>
index 4af5105c6..211cdfc4e 100644<br>
--- a/testcases/kernel/syscalls/swapon/swapon02.c<br>
+++ b/testcases/kernel/syscalls/swapon/swapon02.c<br>
@@ -86,6 +86,11 @@ static void verify_swapon(struct test_case_t *test)<br>
                        return;<br>
        }<br>
<br>
+       if (fs_type == TST_OVERLAYFS_MAGIC && errno == EINVAL) {<br>
+               tst_resm(TCONF, "Swapfile on overlayfs not implemeted");<br>
+                       return;<br>
+       }<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">The code looks correct.</div><br></div><div><div class="gmail_default" style="font-size:small">But it already has a test skipping for BTRFS, is there any possibility to combine these filesystems check together?</div></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+<br>
        tst_resm(TFAIL, "swapon(2) failed to produce expected error:"<br>
                 " %d, errno: %s and got %d.", test->exp_errno,<br>
                 test->exp_errval, TEST_ERRNO);<br>
-- <br>
2.21.0<br>
<br>
<br>
-- <br>
Mailing list info: <a href="https://lists.linux.it/listinfo/ltp" rel="noreferrer" target="_blank">https://lists.linux.it/listinfo/ltp</a><br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>