<div dir="ltr">Hi,<br><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Dec 17, 2015 at 1:54 PM, TAKAHASHI Tetsuya <span dir="ltr"><<a href="mailto:takahashi.tetsuya.cis@canon-is.co.jp" target="_blank">takahashi.tetsuya.cis@canon-is.co.jp</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello.<br>
<br>
I think that a create syscall check of syscalls/creat/creat09 is wrong.<br>
<br>
When create syscall cannot make a file, the test result becomes PASS.<br>
In this case, the test result becomes FAIL is right.<br></blockquote><div><br></div><div>yes, I agree with u.<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">
<br>
<br>
diff -uprN a/testcases/kernel/syscalls/creat/creat09.c b/testcases/kernel/syscalls/creat/creat09.c<br>
--- a/testcases/kernel/syscalls/creat/creat09.c 2015-12-03 05:53:41.000000000 +0900<br>
+++ b/testcases/kernel/syscalls/creat/creat09.c 2015-12-06 01:48:34.757125367 +0900<br>
@@ -139,9 +139,13 @@ int main(int ac, char **av)<br>
<br>
TEST(creat(fname, 0700));<br>
<br>
- if (TEST_RETURN == -1) {<br>
+ if (TEST_RETURN != -1) {<br>
tst_resm(TPASS, "creat(%s, 0700) returned %ld",<br>
fname, TEST_RETURN);<br>
+ } else {<br>
+ tst_resm(TFAIL | TTERRNO, "creat(%s, 0700) FAILED",<br>
+ fname);<br>
+ continue; </blockquote><div> <br>why using continue here? it will skip some cleanup codes in the following.<br><br></div><div>so, how about make something like:<br>------------$ git diff<br>diff --git a/testcases/kernel/syscalls/creat/creat09.c b/testcases/kernel/syscalls/creat/creat09.c<br>index e52ad34..f680a78 100644<br>--- a/testcases/kernel/syscalls/creat/creat09.c<br>+++ b/testcases/kernel/syscalls/creat/creat09.c<br>@@ -139,10 +139,12 @@ int main(int ac, char **av)<br> <br> TEST(creat(fname, 0700));<br> <br>- if (TEST_RETURN == -1) {<br>+ if (TEST_RETURN != -1)<br> tst_resm(TPASS, "creat(%s, 0700) returned %ld",<br> fname, TEST_RETURN);<br>- }<br>+ else<br>+ tst_resm(TFAIL | TTERRNO, "creat(%s, 0700) FAILED",<br>+ fname);<br><br clear="all"></div></div><br>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div>Regards,<br></div>Li Wang<br></div><div>Email: <a href="mailto:liwang@redhat.com" target="_blank">liwang@redhat.com</a><br></div></div></div></div></div></div>
</div></div>