<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small"><br></div></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Viresh Kumar <<a href="mailto:viresh.kumar@linaro.org">viresh.kumar@linaro.org</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"><span class="gmail_default" style="font-size:small">...</span><br>
+++ b/testcases/kernel/syscalls/open_tree/open_tree01.c<br>
<span class="gmail_default" style="font-size:small">...</span><br>
+static struct tcase {<br>
+       char *name;<br>
+       unsigned int flags;<br>
+} tcases[] = {<br>
+       {"Flag OPEN_TREE_CLONE", OPEN_TREE_CLONE},<br>
+       {"Flag OPEN_TREE_CLOEXEC", OPEN_TREE_CLONE | OPEN_TREE_CLOEXEC},<br>
+};<br>
</blockquote><div><span class="gmail_default" style="font-size:small">==> remove Flag</span></div><div><span class="gmail_default" style="font-size:small"></span> </div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
+++ b/testcases/kernel/syscalls/open_tree/open_tree02.c<br>
@@ -0,0 +1,104 @@<br>
+// SPDX-License-Identifier: GPL-2.0-or-later<br><span class="gmail_default" style="font-size:small">...</span><br>
+<br>
+       fsmfd = TST_RET;<br>
+       TEST(move_mount(fsmfd, "", AT_FDCWD, MNTPOINT,<br>
+                       MOVE_MOUNT_F_EMPTY_PATH));<br>
+       SAFE_CLOSE(fsmfd);<br>
+<br>
+       if (TST_RET == -1)<br>
+               tst_brk(TBROK | TERRNO, "move_mount() failed");<br>
+<br></blockquote><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small">+       ismounted = 1;</span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><span class="gmail_default" style="font-size:small">We need to set 'ismounted' variable to 1 here, otherwise, the test will break at the second loop.</span></div><div><span class="gmail_default" style="font-size:small"></span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div><div class="gmail_default" style="font-size:small">------Error log------</div></div><div><span class="gmail_default" style="font-size:small">tst_test.c:1278: INFO: Testing on ext3<br>tst_mkfs.c:90: INFO: Formatting /dev/loop2 with ext3 opts='' extra opts=''<br>mke2fs 1.44.6 (5-Mar-2019)<br>/dev/loop2 is mounted; will not make a filesystem here!<br>tst_mkfs.c:101: BROK: tst_test.c:831: mkfs.ext3 failed with 1<br>tst_device.c:222: WARN: ioctl(/dev/loop2, LOOP_CLR_FD, 0) no ENXIO for too long<br>tst_tmpdir.c:330: WARN: tst_rmdir: rmobj(/tmp/SHZbDJ) failed: unlink(/tmp/SHZbDJ/mntpoint) failed; errno=21: EISDIR<br></span></div><div><span class="gmail_default" style="font-size:small"><br></span></div><div class="gmail_default" style="font-size:small">Summary:</div>passed   3<br>failed   0<br>skipped  0<br><div class="gmail_default" style="font-size:small">warnings 0</div><div class="gmail_default" style="font-size:small"><br></div></div>-- <br><div dir="ltr" class="gmail_signature"><div dir="ltr"><div>Regards,<br></div><div>Li Wang<br></div></div></div></div>