<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hi Gongyi,</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Zhao Gongyi <<a href="mailto:zhaogongyi@huawei.com">zhaogongyi@huawei.com</a>> wrote:<br></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">
--- a/testcases/kernel/syscalls/fanotify/fanotify03.c<br>
+++ b/testcases/kernel/syscalls/fanotify/fanotify03.c<br>
@@ -128,17 +128,13 @@ static void generate_events(void)<br>
        /*<br>
         * Generate sequence of events<br>
         */<br>
-       if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)<br>
-               exit(1);<br>
-       if (write(fd, fname, 1) == -1)<br>
-               exit(2);<br>
+       fd = SAFE_OPEN(fname, O_RDWR | O_CREAT, 0700);<br>
<br>
-       lseek(fd, 0, SEEK_SET);<br>
-       if (read(fd, buf, BUF_SIZE) != -1)<br>
-               exit(3);<br>
+       SAFE_WRITE(fd, fname, 1);<br></blockquote><div><br></div><div><div class="gmail_default" style="">SAFE_READ/SAFE_WRITE requires 4 arguments, but only 3 given,</div><div class="gmail_default" style="">it even builds fails after applying this patch. So it'd be better to compile</div><div class="gmail_default" style="">PASS at least locally before sending it to ML.<br></div></div><div><br></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">
--- a/testcases/kernel/syscalls/fanotify/fanotify07.c<br>
+++ b/testcases/kernel/syscalls/fanotify/fanotify07.c<br>
@@ -53,14 +53,12 @@ static void generate_events(void)<br>
        /*<br>
         * generate sequence of events<br>
         */<br>
-       if ((fd = open(fname, O_RDWR | O_CREAT, 0700)) == -1)<br>
-               exit(1);<br>
+       fd = SAFE_OPEN(FNAME, O_RDWR | O_CREAT, 0700);<br></blockquote><div><br></div><div><div class="gmail_default" style="font-size:small">FNAME --> fname</div></div></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>