* [LTP] [PATCH 1/3] fcntl14: dup code clean up [not found] <1397094487.31209591.1410431434756.JavaMail.zimbra@redhat.com> @ 2014-09-11 10:30 ` Xiong Zhou 2014-09-11 14:04 ` Stanislav Kholmanskikh 0 siblings, 1 reply; 11+ messages in thread From: Xiong Zhou @ 2014-09-11 10:30 UTC (permalink / raw) To: ltp-list And block3 description message fix from "mandatory locking" to "negative whence". Signed-off-by: Xiong Zhou <xzhou@redhat.com> --- testcases/kernel/syscalls/fcntl/fcntl14.c | 36 +++++++++++-------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c index 30a1ea9..9db88e8 100644 --- a/testcases/kernel/syscalls/fcntl/fcntl14.c +++ b/testcases/kernel/syscalls/fcntl/fcntl14.c @@ -969,6 +969,15 @@ void catch1(int sig) got1++; } +static void testcheck_end(int check_fail, char *msg) +{ + if (check_fail) { + tst_resm(TFAIL, "%s FAILED", msg); + } else { + tst_resm(TPASS, "%s PASSED", msg); + } +} + int main(int ac, char **av) { int lc; @@ -1009,20 +1018,11 @@ int main(int ac, char **av) * mandatory locking */ (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 0, 0, 36); - if (fail) { - tst_resm(TFAIL, "Block 1, test 1 FAILED"); - } else { - tst_resm(TPASS, "Block 1, test 1 PASSED"); - } + testcheck_end(fail, "Block 1, test 1"); /* Now try with negative values for L_start and L_len */ (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 5, 36, 45); - - if (fail) { - tst_resm(TFAIL, "Block 1, test 2 FAILED"); - } else { - tst_resm(TPASS, "Block 1, test 2 PASSED"); - } + testcheck_end(fail, "Block 1, test 2"); tst_resm(TINFO, "Exit block 1"); @@ -1094,13 +1094,7 @@ int main(int ac, char **av) close(fd); unlink(tmpname); - if (fail) { - tst_resm(TINFO, "Test with mandatory " - "locking FAILED"); - } else { - tst_resm(TINFO, "Test with mandatory " - "locking PASSED"); - } + testcheck_end(fail, "Test with negative whence locking"); tst_resm(TINFO, "Exit block 3"); /* //block4: */ @@ -1223,11 +1217,7 @@ int main(int ac, char **av) close(fd); unlink(tmpname); - if (fail) { - tst_resm(TINFO, "Test of locks on file FAILED"); - } else { - tst_resm(TINFO, "Test of locks on file PASSED"); - } + testcheck_end(fail, "Test of locks on file"); tst_resm(TINFO, "Exit block 4"); } cleanup(); -- 1.8.3.1 ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH 1/3] fcntl14: dup code clean up 2014-09-11 10:30 ` [LTP] [PATCH 1/3] fcntl14: dup code clean up Xiong Zhou @ 2014-09-11 14:04 ` Stanislav Kholmanskikh 2014-09-19 6:46 ` Xiong Zhou 2014-09-19 6:47 ` [LTP] [PATCH v2 " Xiong Zhou 0 siblings, 2 replies; 11+ messages in thread From: Stanislav Kholmanskikh @ 2014-09-11 14:04 UTC (permalink / raw) To: Xiong Zhou, ltp-list Hi! On 09/11/2014 02:30 PM, Xiong Zhou wrote: > And block3 description message fix from "mandatory locking" > to "negative whence". > > Signed-off-by: Xiong Zhou <xzhou@redhat.com> > --- > testcases/kernel/syscalls/fcntl/fcntl14.c | 36 +++++++++++-------------------- > 1 file changed, 13 insertions(+), 23 deletions(-) > > diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c > index 30a1ea9..9db88e8 100644 > --- a/testcases/kernel/syscalls/fcntl/fcntl14.c > +++ b/testcases/kernel/syscalls/fcntl/fcntl14.c > @@ -969,6 +969,15 @@ void catch1(int sig) > got1++; > } > > +static void testcheck_end(int check_fail, char *msg) > +{ > + if (check_fail) { > + tst_resm(TFAIL, "%s FAILED", msg); > + } else { > + tst_resm(TPASS, "%s PASSED", msg); > + } > +} There are many places left in fcntl14.c where you can put this "deduplication". Why aren't you doing it? ;) > + > int main(int ac, char **av) > { > int lc; > @@ -1009,20 +1018,11 @@ int main(int ac, char **av) > * mandatory locking > */ > (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 0, 0, 36); > - if (fail) { > - tst_resm(TFAIL, "Block 1, test 1 FAILED"); > - } else { > - tst_resm(TPASS, "Block 1, test 1 PASSED"); > - } > + testcheck_end(fail, "Block 1, test 1"); > > /* Now try with negative values for L_start and L_len */ > (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 5, 36, 45); > - > - if (fail) { > - tst_resm(TFAIL, "Block 1, test 2 FAILED"); > - } else { > - tst_resm(TPASS, "Block 1, test 2 PASSED"); > - } > + testcheck_end(fail, "Block 1, test 2"); > > tst_resm(TINFO, "Exit block 1"); > > @@ -1094,13 +1094,7 @@ int main(int ac, char **av) > close(fd); > unlink(tmpname); > > - if (fail) { > - tst_resm(TINFO, "Test with mandatory " > - "locking FAILED"); > - } else { > - tst_resm(TINFO, "Test with mandatory " > - "locking PASSED"); > - } > + testcheck_end(fail, "Test with negative whence locking"); > tst_resm(TINFO, "Exit block 3"); > > /* //block4: */ > @@ -1223,11 +1217,7 @@ int main(int ac, char **av) > close(fd); > unlink(tmpname); > > - if (fail) { > - tst_resm(TINFO, "Test of locks on file FAILED"); > - } else { > - tst_resm(TINFO, "Test of locks on file PASSED"); > - } > + testcheck_end(fail, "Test of locks on file"); > tst_resm(TINFO, "Exit block 4"); > } > cleanup(); > ------------------------------------------------------------------------------ Want excitement? Manually upgrade your production database. When you want reliability, choose Perforce Perforce version control. Predictably reliable. http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH 1/3] fcntl14: dup code clean up 2014-09-11 14:04 ` Stanislav Kholmanskikh @ 2014-09-19 6:46 ` Xiong Zhou 2014-09-23 11:52 ` Stanislav Kholmanskikh 2014-09-19 6:47 ` [LTP] [PATCH v2 " Xiong Zhou 1 sibling, 1 reply; 11+ messages in thread From: Xiong Zhou @ 2014-09-19 6:46 UTC (permalink / raw) To: Stanislav Kholmanskikh, ltp-list ----- Original Message ----- > From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com> > To: "Xiong Zhou" <xzhou@redhat.com>, ltp-list@lists.sourceforge.net > Sent: Thursday, September 11, 2014 10:04:32 PM > Subject: Re: [LTP] [PATCH 1/3] fcntl14: dup code clean up > > Hi! > > On 09/11/2014 02:30 PM, Xiong Zhou wrote: > > And block3 description message fix from "mandatory locking" > > to "negative whence". > > > > Signed-off-by: Xiong Zhou <xzhou@redhat.com> > > --- > > testcases/kernel/syscalls/fcntl/fcntl14.c | 36 > > +++++++++++-------------------- > > 1 file changed, 13 insertions(+), 23 deletions(-) > > > > diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c > > b/testcases/kernel/syscalls/fcntl/fcntl14.c > > index 30a1ea9..9db88e8 100644 > > --- a/testcases/kernel/syscalls/fcntl/fcntl14.c > > +++ b/testcases/kernel/syscalls/fcntl/fcntl14.c > > @@ -969,6 +969,15 @@ void catch1(int sig) > > got1++; > > } > > > > +static void testcheck_end(int check_fail, char *msg) > > +{ > > + if (check_fail) { > > + tst_resm(TFAIL, "%s FAILED", msg); > > + } else { > > + tst_resm(TPASS, "%s PASSED", msg); > > + } > > +} > > There are many places left in fcntl14.c where you can put this > "deduplication". Why aren't you doing it? ;) I think I have done all of them, I cannot find other places which are applicable to this function. I will resend this series based on your last comments. Thanks. > > > + > > int main(int ac, char **av) > > { > > int lc; > > @@ -1009,20 +1018,11 @@ int main(int ac, char **av) > > * mandatory locking > > */ > > (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 0, 0, 36); > > - if (fail) { > > - tst_resm(TFAIL, "Block 1, test 1 FAILED"); > > - } else { > > - tst_resm(TPASS, "Block 1, test 1 PASSED"); > > - } > > + testcheck_end(fail, "Block 1, test 1"); > > > > /* Now try with negative values for L_start and L_len */ > > (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 5, 36, 45); > > - > > - if (fail) { > > - tst_resm(TFAIL, "Block 1, test 2 FAILED"); > > - } else { > > - tst_resm(TPASS, "Block 1, test 2 PASSED"); > > - } > > + testcheck_end(fail, "Block 1, test 2"); > > > > tst_resm(TINFO, "Exit block 1"); > > > > @@ -1094,13 +1094,7 @@ int main(int ac, char **av) > > close(fd); > > unlink(tmpname); > > > > - if (fail) { > > - tst_resm(TINFO, "Test with mandatory " > > - "locking FAILED"); > > - } else { > > - tst_resm(TINFO, "Test with mandatory " > > - "locking PASSED"); > > - } > > + testcheck_end(fail, "Test with negative whence locking"); > > tst_resm(TINFO, "Exit block 3"); > > > > /* //block4: */ > > @@ -1223,11 +1217,7 @@ int main(int ac, char **av) > > close(fd); > > unlink(tmpname); > > > > - if (fail) { > > - tst_resm(TINFO, "Test of locks on file FAILED"); > > - } else { > > - tst_resm(TINFO, "Test of locks on file PASSED"); > > - } > > + testcheck_end(fail, "Test of locks on file"); > > tst_resm(TINFO, "Exit block 4"); > > } > > cleanup(); > > > ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH 1/3] fcntl14: dup code clean up 2014-09-19 6:46 ` Xiong Zhou @ 2014-09-23 11:52 ` Stanislav Kholmanskikh 0 siblings, 0 replies; 11+ messages in thread From: Stanislav Kholmanskikh @ 2014-09-23 11:52 UTC (permalink / raw) To: Xiong Zhou, ltp-list Hi! On 09/19/2014 10:46 AM, Xiong Zhou wrote: > > > ----- Original Message ----- >> From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com> >> To: "Xiong Zhou" <xzhou@redhat.com>, ltp-list@lists.sourceforge.net >> Sent: Thursday, September 11, 2014 10:04:32 PM >> Subject: Re: [LTP] [PATCH 1/3] fcntl14: dup code clean up >> >> Hi! >> >> On 09/11/2014 02:30 PM, Xiong Zhou wrote: >>> And block3 description message fix from "mandatory locking" >>> to "negative whence". >>> >>> Signed-off-by: Xiong Zhou <xzhou@redhat.com> >>> --- >>> testcases/kernel/syscalls/fcntl/fcntl14.c | 36 >>> +++++++++++-------------------- >>> 1 file changed, 13 insertions(+), 23 deletions(-) >>> >>> diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c >>> b/testcases/kernel/syscalls/fcntl/fcntl14.c >>> index 30a1ea9..9db88e8 100644 >>> --- a/testcases/kernel/syscalls/fcntl/fcntl14.c >>> +++ b/testcases/kernel/syscalls/fcntl/fcntl14.c >>> @@ -969,6 +969,15 @@ void catch1(int sig) >>> got1++; >>> } >>> >>> +static void testcheck_end(int check_fail, char *msg) >>> +{ >>> + if (check_fail) { >>> + tst_resm(TFAIL, "%s FAILED", msg); >>> + } else { >>> + tst_resm(TPASS, "%s PASSED", msg); >>> + } >>> +} >> >> There are many places left in fcntl14.c where you can put this >> "deduplication". Why aren't you doing it? ;) > > I think I have done all of them, I cannot find other places which are applicable to this function. Sorry, but by "many places" I meant block 2. Last time I commented your [PATCH 2/3] with "And testcheck_end() to block 2 should be introduced in the previous patch." Could you please add all testcheck_end() invocations in the first patch of the series? Thanks. > > I will resend this series based on your last comments. > > Thanks. > >> >>> + >>> int main(int ac, char **av) >>> { >>> int lc; >>> @@ -1009,20 +1018,11 @@ int main(int ac, char **av) >>> * mandatory locking >>> */ >>> (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 0, 0, 36); >>> - if (fail) { >>> - tst_resm(TFAIL, "Block 1, test 1 FAILED"); >>> - } else { >>> - tst_resm(TPASS, "Block 1, test 1 PASSED"); >>> - } >>> + testcheck_end(fail, "Block 1, test 1"); >>> >>> /* Now try with negative values for L_start and L_len */ >>> (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 5, 36, 45); >>> - >>> - if (fail) { >>> - tst_resm(TFAIL, "Block 1, test 2 FAILED"); >>> - } else { >>> - tst_resm(TPASS, "Block 1, test 2 PASSED"); >>> - } >>> + testcheck_end(fail, "Block 1, test 2"); >>> >>> tst_resm(TINFO, "Exit block 1"); >>> >>> @@ -1094,13 +1094,7 @@ int main(int ac, char **av) >>> close(fd); >>> unlink(tmpname); >>> >>> - if (fail) { >>> - tst_resm(TINFO, "Test with mandatory " >>> - "locking FAILED"); >>> - } else { >>> - tst_resm(TINFO, "Test with mandatory " >>> - "locking PASSED"); >>> - } >>> + testcheck_end(fail, "Test with negative whence locking"); >>> tst_resm(TINFO, "Exit block 3"); >>> >>> /* //block4: */ >>> @@ -1223,11 +1217,7 @@ int main(int ac, char **av) >>> close(fd); >>> unlink(tmpname); >>> >>> - if (fail) { >>> - tst_resm(TINFO, "Test of locks on file FAILED"); >>> - } else { >>> - tst_resm(TINFO, "Test of locks on file PASSED"); >>> - } >>> + testcheck_end(fail, "Test of locks on file"); >>> tst_resm(TINFO, "Exit block 4"); >>> } >>> cleanup(); >>> >> ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 11+ messages in thread
* [LTP] [PATCH v2 1/3] fcntl14: dup code clean up 2014-09-11 14:04 ` Stanislav Kholmanskikh 2014-09-19 6:46 ` Xiong Zhou @ 2014-09-19 6:47 ` Xiong Zhou 2014-09-25 7:17 ` [LTP] [PATCH v3 " Xiong Zhou 1 sibling, 1 reply; 11+ messages in thread From: Xiong Zhou @ 2014-09-19 6:47 UTC (permalink / raw) To: Stanislav Kholmanskikh; +Cc: ltp-list And block3 description message fix from "mandatory locking" to "negative whence". Signed-off-by: Xiong Zhou <xzhou@redhat.com> --- testcases/kernel/syscalls/fcntl/fcntl14.c | 36 +++++++++++-------------------- 1 file changed, 13 insertions(+), 23 deletions(-) diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c index 30a1ea9..9db88e8 100644 --- a/testcases/kernel/syscalls/fcntl/fcntl14.c +++ b/testcases/kernel/syscalls/fcntl/fcntl14.c @@ -969,6 +969,15 @@ void catch1(int sig) got1++; } +static void testcheck_end(int check_fail, char *msg) +{ + if (check_fail) { + tst_resm(TFAIL, "%s FAILED", msg); + } else { + tst_resm(TPASS, "%s PASSED", msg); + } +} + int main(int ac, char **av) { int lc; @@ -1009,20 +1018,11 @@ int main(int ac, char **av) * mandatory locking */ (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 0, 0, 36); - if (fail) { - tst_resm(TFAIL, "Block 1, test 1 FAILED"); - } else { - tst_resm(TPASS, "Block 1, test 1 PASSED"); - } + testcheck_end(fail, "Block 1, test 1"); /* Now try with negative values for L_start and L_len */ (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 5, 36, 45); - - if (fail) { - tst_resm(TFAIL, "Block 1, test 2 FAILED"); - } else { - tst_resm(TPASS, "Block 1, test 2 PASSED"); - } + testcheck_end(fail, "Block 1, test 2"); tst_resm(TINFO, "Exit block 1"); @@ -1094,13 +1094,7 @@ int main(int ac, char **av) close(fd); unlink(tmpname); - if (fail) { - tst_resm(TINFO, "Test with mandatory " - "locking FAILED"); - } else { - tst_resm(TINFO, "Test with mandatory " - "locking PASSED"); - } + testcheck_end(fail, "Test with negative whence locking"); tst_resm(TINFO, "Exit block 3"); /* //block4: */ @@ -1223,11 +1217,7 @@ int main(int ac, char **av) close(fd); unlink(tmpname); - if (fail) { - tst_resm(TINFO, "Test of locks on file FAILED"); - } else { - tst_resm(TINFO, "Test of locks on file PASSED"); - } + testcheck_end(fail, "Test of locks on file"); tst_resm(TINFO, "Exit block 4"); } cleanup(); -- 1.8.3.1 ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [LTP] [PATCH v3 1/3] fcntl14: dup code clean up 2014-09-19 6:47 ` [LTP] [PATCH v2 " Xiong Zhou @ 2014-09-25 7:17 ` Xiong Zhou 2014-09-25 12:07 ` Stanislav Kholmanskikh 0 siblings, 1 reply; 11+ messages in thread From: Xiong Zhou @ 2014-09-25 7:17 UTC (permalink / raw) To: Stanislav Kholmanskikh; +Cc: ltp-list And block3 description message fix from "mandatory locking" to "negative whence". Signed-off-by: Xiong Zhou <xzhou@redhat.com> --- testcases/kernel/syscalls/fcntl/fcntl14.c | 48 ++++++++++--------------------- 1 file changed, 15 insertions(+), 33 deletions(-) diff --git a/testcases/kernel/syscalls/fcntl/fcntl14.c b/testcases/kernel/syscalls/fcntl/fcntl14.c index 30a1ea9..b110d35 100644 --- a/testcases/kernel/syscalls/fcntl/fcntl14.c +++ b/testcases/kernel/syscalls/fcntl/fcntl14.c @@ -969,6 +969,15 @@ void catch1(int sig) got1++; } +static void testcheck_end(int check_fail, char *msg) +{ + if (check_fail) { + tst_resm(TFAIL, "%s FAILED", msg); + } else { + tst_resm(TPASS, "%s PASSED", msg); + } +} + int main(int ac, char **av) { int lc; @@ -1009,20 +1018,11 @@ int main(int ac, char **av) * mandatory locking */ (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 0, 0, 36); - if (fail) { - tst_resm(TFAIL, "Block 1, test 1 FAILED"); - } else { - tst_resm(TPASS, "Block 1, test 1 PASSED"); - } + testcheck_end(fail, "Block 1, test 1"); /* Now try with negative values for L_start and L_len */ (void)run_test(O_CREAT | O_RDWR | O_TRUNC, 0777, 5, 36, 45); - - if (fail) { - tst_resm(TFAIL, "Block 1, test 2 FAILED"); - } else { - tst_resm(TPASS, "Block 1, test 2 PASSED"); - } + testcheck_end(fail, "Block 1, test 2"); tst_resm(TINFO, "Exit block 1"); @@ -1035,20 +1035,12 @@ int main(int ac, char **av) */ (void)run_test(O_CREAT | O_RDWR | O_TRUNC, S_ENFMT | S_IRUSR | S_IWUSR, 0, 0, 36); - if (fail) { - tst_resm(TFAIL, "Block 2, test 1 FAILED"); - } else { - tst_resm(TPASS, "Block 2, test 1 PASSED"); - } + testcheck_end(fail, "Block 2, test 1"); /* Now try negative values for L_start and L_len */ (void)run_test(O_CREAT | O_RDWR | O_TRUNC, S_ENFMT | S_IRUSR | S_IWUSR, 5, 36, 45); - if (fail) { - tst_resm(TFAIL, "Block 2, test 2 FAILED"); - } else { - tst_resm(TPASS, "Block 2, test 2 PASSED"); - } + testcheck_end(fail, "Block 2, test 2"); tst_resm(TINFO, "Exit block 2"); @@ -1094,13 +1086,7 @@ int main(int ac, char **av) close(fd); unlink(tmpname); - if (fail) { - tst_resm(TINFO, "Test with mandatory " - "locking FAILED"); - } else { - tst_resm(TINFO, "Test with mandatory " - "locking PASSED"); - } + testcheck_end(fail, "Test with negative whence locking"); tst_resm(TINFO, "Exit block 3"); /* //block4: */ @@ -1223,11 +1209,7 @@ int main(int ac, char **av) close(fd); unlink(tmpname); - if (fail) { - tst_resm(TINFO, "Test of locks on file FAILED"); - } else { - tst_resm(TINFO, "Test of locks on file PASSED"); - } + testcheck_end(fail, "Test of locks on file"); tst_resm(TINFO, "Exit block 4"); } cleanup(); -- 1.8.3.1 ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up 2014-09-25 7:17 ` [LTP] [PATCH v3 " Xiong Zhou @ 2014-09-25 12:07 ` Stanislav Kholmanskikh 2014-09-26 3:23 ` Xiong Zhou 0 siblings, 1 reply; 11+ messages in thread From: Stanislav Kholmanskikh @ 2014-09-25 12:07 UTC (permalink / raw) To: Xiong Zhou; +Cc: ltp-list Hi! On 09/25/2014 11:17 AM, Xiong Zhou wrote: > > And block3 description message fix from "mandatory locking" > to "negative whence". > > Signed-off-by: Xiong Zhou <xzhou@redhat.com> > --- Patch 1 and patch 2 of the series are pushed. Btw, patch 2 didn't apply to index correctly with 'git am', I had to manually apply it. I'm experiencing difficulties with checking patch 3. In particular, after applying your patch utime02 fails on NFSv4 with 2.6.32-431.29.2.el6.x86_64 kernel. I'm not quite sure if it's a kernel problem or test case error. Still investigating. Could you please check the test case in your RHEL 6 environment as well? Thank you. ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up 2014-09-25 12:07 ` Stanislav Kholmanskikh @ 2014-09-26 3:23 ` Xiong Zhou 2014-09-26 12:36 ` Stanislav Kholmanskikh 0 siblings, 1 reply; 11+ messages in thread From: Xiong Zhou @ 2014-09-26 3:23 UTC (permalink / raw) To: Stanislav Kholmanskikh; +Cc: ltp-list ----- Original Message ----- > From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com> > To: "Xiong Zhou" <xzhou@redhat.com> > Cc: ltp-list@lists.sourceforge.net > Sent: Thursday, September 25, 2014 8:07:26 PM > Subject: Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up > > Hi! > > On 09/25/2014 11:17 AM, Xiong Zhou wrote: > > > > And block3 description message fix from "mandatory locking" > > to "negative whence". > > > > Signed-off-by: Xiong Zhou <xzhou@redhat.com> > > --- > > Patch 1 and patch 2 of the series are pushed. > Btw, patch 2 didn't apply to index correctly with 'git am', I had to > manually apply it. > Sorry for the inconvenience.. I should keep my master branch updated. > I'm experiencing difficulties with checking patch 3. In particular, > after applying your patch utime02 fails on NFSv4 with > 2.6.32-431.29.2.el6.x86_64 kernel. Yes, I got the same results on 2.6.32-431.29.2.el6 kernel, v3 pass v4 fail. > > I'm not quite sure if it's a kernel problem or test case error. Still > investigating. > > Could you please check the test case in your RHEL 6 environment as well? I double checked that utime02 did pass on upstream 2.6.32 kernel both NFSv3 and NFSv4 in my env. On latest RHEL-6 kernel, both NFSv3 and NFSv4 passed utime02 test case. All failed test_output are just like: tst_tmpdir.c:158: chown(/nfsmnt/ltp-6L6Oqow6wv/utiMPq3y5, -1, 0) \ failed: errno=EPERM(1): Operation not permitted One single clean chown(nfsfile, -1, 0) call to NFSv3/4 file succeeds on multiple kernels include 2.6.32-431.29.2.el6. Neither, I'm not sure about where the problem lies. Still checking. Thanks for catching this! -- xzhou > > Thank you. > ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up 2014-09-26 3:23 ` Xiong Zhou @ 2014-09-26 12:36 ` Stanislav Kholmanskikh 2014-09-28 2:53 ` Xiong Zhou 0 siblings, 1 reply; 11+ messages in thread From: Stanislav Kholmanskikh @ 2014-09-26 12:36 UTC (permalink / raw) To: Xiong Zhou; +Cc: ltp-list Hi! On 09/26/2014 07:23 AM, Xiong Zhou wrote: > > > ----- Original Message ----- >> From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com> >> To: "Xiong Zhou" <xzhou@redhat.com> >> Cc: ltp-list@lists.sourceforge.net >> Sent: Thursday, September 25, 2014 8:07:26 PM >> Subject: Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up >> >> Hi! >> >> On 09/25/2014 11:17 AM, Xiong Zhou wrote: >>> >>> And block3 description message fix from "mandatory locking" >>> to "negative whence". >>> >>> Signed-off-by: Xiong Zhou <xzhou@redhat.com> >>> --- >> >> Patch 1 and patch 2 of the series are pushed. >> Btw, patch 2 didn't apply to index correctly with 'git am', I had to >> manually apply it. >> > > Sorry for the inconvenience.. I should keep my master branch updated. > >> I'm experiencing difficulties with checking patch 3. In particular, >> after applying your patch utime02 fails on NFSv4 with >> 2.6.32-431.29.2.el6.x86_64 kernel. > > Yes, I got the same results on 2.6.32-431.29.2.el6 kernel, v3 pass v4 fail. > >> >> I'm not quite sure if it's a kernel problem or test case error. Still >> investigating. >> >> Could you please check the test case in your RHEL 6 environment as well? > > I double checked that utime02 did pass on upstream 2.6.32 kernel > both NFSv3 and NFSv4 in my env. > On latest RHEL-6 kernel, both NFSv3 and NFSv4 passed utime02 test case. > > All failed test_output are just like: > tst_tmpdir.c:158: chown(/nfsmnt/ltp-6L6Oqow6wv/utiMPq3y5, -1, 0) \ > failed: errno=EPERM(1): Operation not permitted Sorry, I didn't get whether utime02+NFSv4 passed with the latest RHEL-6 kernel. Could you elaborate on this? > > One single clean chown(nfsfile, -1, 0) call to NFSv3/4 file succeeds > on multiple kernels include 2.6.32-431.29.2.el6. > > Neither, I'm not sure about where the problem lies. Still checking. test.c: #include <error.h> #include <unistd.h> #include <sys/stat.h> #include <sys/types.h> int main(void) { if (setuid(99)) { perror("setuid() failed"); goto out; } if (mkdir("dir", 0700)) { perror("mkdir() failed"); goto out; } if (chown("dir", -1, 0)) perror("chown() failed"); out: return 0; } 99 is 'nobody'. With both upstream 2.6.32 and 2.6.32.63 `strace ./test` on a nfsv4 fs will show: setuid(99) = 0 mkdir("dir", 0700) = 0 chown("dir", 4294967295, 0) = 0 [root@ol6-x64 nfsv4]# ls -ld dir drwx------ 2 nobody root 4096 Sep 26 13:14 dir But with 2.6.32-431.29.2.el6.x86_64: setuid(99) = 0 mkdir("dir", 0700) = 0 chown("dir", 4294967295, 0) = -1 EPERM (Operation not permitted) [root@ol6-x64 nfsv4]# ls -ld dir drwx------ 2 nobody root 4096 Sep 26 13:19 dir So, most likely, it's a bug in the vendor kernels. So on I think that your patch may be pushed. If there are no objections, I would like to do it on Monday. Thanks. > > Thanks for catching this! > > -- > xzhou > >> >> Thank you. >> ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up 2014-09-26 12:36 ` Stanislav Kholmanskikh @ 2014-09-28 2:53 ` Xiong Zhou 2014-09-29 8:28 ` Stanislav Kholmanskikh 0 siblings, 1 reply; 11+ messages in thread From: Xiong Zhou @ 2014-09-28 2:53 UTC (permalink / raw) To: Stanislav Kholmanskikh; +Cc: ltp-list Hi! ----- Original Message ----- > From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com> > To: "Xiong Zhou" <xzhou@redhat.com> > Cc: ltp-list@lists.sourceforge.net > Sent: Friday, September 26, 2014 8:36:00 PM > Subject: Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up > > Hi! > > On 09/26/2014 07:23 AM, Xiong Zhou wrote: > > > > > > ----- Original Message ----- > >> From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com> > >> To: "Xiong Zhou" <xzhou@redhat.com> > >> Cc: ltp-list@lists.sourceforge.net > >> Sent: Thursday, September 25, 2014 8:07:26 PM > >> Subject: Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up > >> > >> Hi! > >> > >> On 09/25/2014 11:17 AM, Xiong Zhou wrote: > >>> > >>> And block3 description message fix from "mandatory locking" > >>> to "negative whence". > >>> > >>> Signed-off-by: Xiong Zhou <xzhou@redhat.com> > >>> --- > >> > >> Patch 1 and patch 2 of the series are pushed. > >> Btw, patch 2 didn't apply to index correctly with 'git am', I had to > >> manually apply it. > >> > > > > Sorry for the inconvenience.. I should keep my master branch updated. > > > >> I'm experiencing difficulties with checking patch 3. In particular, > >> after applying your patch utime02 fails on NFSv4 with > >> 2.6.32-431.29.2.el6.x86_64 kernel. > > > > Yes, I got the same results on 2.6.32-431.29.2.el6 kernel, v3 pass v4 fail. > > > >> > >> I'm not quite sure if it's a kernel problem or test case error. Still > >> investigating. > >> > >> Could you please check the test case in your RHEL 6 environment as well? > > > > I double checked that utime02 did pass on upstream 2.6.32 kernel > > both NFSv3 and NFSv4 in my env. > > On latest RHEL-6 kernel, both NFSv3 and NFSv4 passed utime02 test case. > > > > All failed test_output are just like: > > tst_tmpdir.c:158: chown(/nfsmnt/ltp-6L6Oqow6wv/utiMPq3y5, -1, 0) \ > > failed: errno=EPERM(1): Operation not permitted > > Sorry, I didn't get whether utime02+NFSv4 passed with the latest RHEL-6 > kernel. Could you elaborate on this? Sorry for the confusion. The latest kernel I have tested on was an internal test temp build. > > > > > One single clean chown(nfsfile, -1, 0) call to NFSv3/4 file succeeds > > on multiple kernels include 2.6.32-431.29.2.el6. > > > > Neither, I'm not sure about where the problem lies. Still checking. > > test.c: > > #include <error.h> > #include <unistd.h> > #include <sys/stat.h> > #include <sys/types.h> > > int main(void) > { > if (setuid(99)) { > perror("setuid() failed"); > goto out; > } > > if (mkdir("dir", 0700)) { > perror("mkdir() failed"); > goto out; > } > > if (chown("dir", -1, 0)) > perror("chown() failed"); > > out: > return 0; > } > > 99 is 'nobody'. > > With both upstream 2.6.32 and 2.6.32.63 `strace ./test` on a nfsv4 fs > will show: > setuid(99) = 0 > mkdir("dir", 0700) = 0 > chown("dir", 4294967295, 0) = 0 > > [root@ol6-x64 nfsv4]# ls -ld dir > drwx------ 2 nobody root 4096 Sep 26 13:14 dir > > But with 2.6.32-431.29.2.el6.x86_64: > setuid(99) = 0 > mkdir("dir", 0700) = 0 > chown("dir", 4294967295, 0) = -1 EPERM (Operation not permitted) > > [root@ol6-x64 nfsv4]# ls -ld dir > drwx------ 2 nobody root 4096 Sep 26 13:19 dir > > So, most likely, it's a bug in the vendor kernels. I agree, and I think it has been recorded already. Thanks! -- xzhou > > So on I think that your patch may be pushed. > > If there are no objections, I would like to do it on Monday. > > Thanks. > > > > > Thanks for catching this! > > > > -- > > xzhou > > > >> > >> Thank you. > >> > ------------------------------------------------------------------------------ Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up 2014-09-28 2:53 ` Xiong Zhou @ 2014-09-29 8:28 ` Stanislav Kholmanskikh 0 siblings, 0 replies; 11+ messages in thread From: Stanislav Kholmanskikh @ 2014-09-29 8:28 UTC (permalink / raw) To: Xiong Zhou; +Cc: ltp-list Hi! Patch 3 was pushed. Thank you. On 09/28/2014 06:53 AM, Xiong Zhou wrote: > Hi! > > ----- Original Message ----- >> From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com> >> To: "Xiong Zhou" <xzhou@redhat.com> >> Cc: ltp-list@lists.sourceforge.net >> Sent: Friday, September 26, 2014 8:36:00 PM >> Subject: Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up >> >> Hi! >> >> On 09/26/2014 07:23 AM, Xiong Zhou wrote: >>> >>> >>> ----- Original Message ----- >>>> From: "Stanislav Kholmanskikh" <stanislav.kholmanskikh@oracle.com> >>>> To: "Xiong Zhou" <xzhou@redhat.com> >>>> Cc: ltp-list@lists.sourceforge.net >>>> Sent: Thursday, September 25, 2014 8:07:26 PM >>>> Subject: Re: [LTP] [PATCH v3 1/3] fcntl14: dup code clean up >>>> >>>> Hi! >>>> >>>> On 09/25/2014 11:17 AM, Xiong Zhou wrote: >>>>> >>>>> And block3 description message fix from "mandatory locking" >>>>> to "negative whence". >>>>> >>>>> Signed-off-by: Xiong Zhou <xzhou@redhat.com> >>>>> --- >>>> >>>> Patch 1 and patch 2 of the series are pushed. >>>> Btw, patch 2 didn't apply to index correctly with 'git am', I had to >>>> manually apply it. >>>> >>> >>> Sorry for the inconvenience.. I should keep my master branch updated. >>> >>>> I'm experiencing difficulties with checking patch 3. In particular, >>>> after applying your patch utime02 fails on NFSv4 with >>>> 2.6.32-431.29.2.el6.x86_64 kernel. >>> >>> Yes, I got the same results on 2.6.32-431.29.2.el6 kernel, v3 pass v4 fail. >>> >>>> >>>> I'm not quite sure if it's a kernel problem or test case error. Still >>>> investigating. >>>> >>>> Could you please check the test case in your RHEL 6 environment as well? >>> >>> I double checked that utime02 did pass on upstream 2.6.32 kernel >>> both NFSv3 and NFSv4 in my env. >>> On latest RHEL-6 kernel, both NFSv3 and NFSv4 passed utime02 test case. >>> >>> All failed test_output are just like: >>> tst_tmpdir.c:158: chown(/nfsmnt/ltp-6L6Oqow6wv/utiMPq3y5, -1, 0) \ >>> failed: errno=EPERM(1): Operation not permitted >> >> Sorry, I didn't get whether utime02+NFSv4 passed with the latest RHEL-6 >> kernel. Could you elaborate on this? > > Sorry for the confusion. The latest kernel I have tested on was an internal > test temp build. > >> >>> >>> One single clean chown(nfsfile, -1, 0) call to NFSv3/4 file succeeds >>> on multiple kernels include 2.6.32-431.29.2.el6. >>> >>> Neither, I'm not sure about where the problem lies. Still checking. >> >> test.c: >> >> #include <error.h> >> #include <unistd.h> >> #include <sys/stat.h> >> #include <sys/types.h> >> >> int main(void) >> { >> if (setuid(99)) { >> perror("setuid() failed"); >> goto out; >> } >> >> if (mkdir("dir", 0700)) { >> perror("mkdir() failed"); >> goto out; >> } >> >> if (chown("dir", -1, 0)) >> perror("chown() failed"); >> >> out: >> return 0; >> } >> >> 99 is 'nobody'. >> >> With both upstream 2.6.32 and 2.6.32.63 `strace ./test` on a nfsv4 fs >> will show: >> setuid(99) = 0 >> mkdir("dir", 0700) = 0 >> chown("dir", 4294967295, 0) = 0 >> >> [root@ol6-x64 nfsv4]# ls -ld dir >> drwx------ 2 nobody root 4096 Sep 26 13:14 dir >> >> But with 2.6.32-431.29.2.el6.x86_64: >> setuid(99) = 0 >> mkdir("dir", 0700) = 0 >> chown("dir", 4294967295, 0) = -1 EPERM (Operation not permitted) >> >> [root@ol6-x64 nfsv4]# ls -ld dir >> drwx------ 2 nobody root 4096 Sep 26 13:19 dir >> >> So, most likely, it's a bug in the vendor kernels. > > I agree, and I think it has been recorded already. > > Thanks! > -- > xzhou >> >> So on I think that your patch may be pushed. >> >> If there are no objections, I would like to do it on Monday. >> >> Thanks. >> >>> >>> Thanks for catching this! >>> >>> -- >>> xzhou >>> >>>> >>>> Thank you. >>>> >> ------------------------------------------------------------------------------ Slashdot TV. Videos for Nerds. Stuff that Matters. http://pubads.g.doubleclick.net/gampad/clk?id=160591471&iu=/4140/ostg.clktrk _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2014-09-29 8:29 UTC | newest] Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- [not found] <1397094487.31209591.1410431434756.JavaMail.zimbra@redhat.com> 2014-09-11 10:30 ` [LTP] [PATCH 1/3] fcntl14: dup code clean up Xiong Zhou 2014-09-11 14:04 ` Stanislav Kholmanskikh 2014-09-19 6:46 ` Xiong Zhou 2014-09-23 11:52 ` Stanislav Kholmanskikh 2014-09-19 6:47 ` [LTP] [PATCH v2 " Xiong Zhou 2014-09-25 7:17 ` [LTP] [PATCH v3 " Xiong Zhou 2014-09-25 12:07 ` Stanislav Kholmanskikh 2014-09-26 3:23 ` Xiong Zhou 2014-09-26 12:36 ` Stanislav Kholmanskikh 2014-09-28 2:53 ` Xiong Zhou 2014-09-29 8:28 ` Stanislav Kholmanskikh
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.