rmdir/rmdir05: Delete unnecessary if
PATCH 1/1 rmdir/rmdir05: Delete unnecessary if
Delete unnecessary if in testcase
--- testcases/kernel/syscalls/rmdir/rmdir05.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/rmdir/rmdir05.c +0 -3
@@ -81,9 +81,6 @@ int main(int argc, char **argv)TEST (rmdir ("." ));if (TEST_RETURN ==-1 ) { - } - -if (TEST_RETURN ==-1 ) {if (TEST_ERRNO & (EBUSY |ENOTEMPTY )) {/* For functionality tests, verify that the * directory wasn't removed.
Signature · 13 lines
1.6.0.2 ------------------------------------------------------------------------------ Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place. SourceForge users - Click here to start your Free Trial of Datadog now! http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140 _______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
PATCH 1/1 rmdir/rmdir05: Delete unnecessary if
Delete unnecessary if in testcase
--- testcases/kernel/syscalls/rmdir/rmdir05.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)
testcases/kernel/syscalls/rmdir/rmdir05.c +0 -3
@@ -81,9 +81,6 @@ int main(int argc, char **argv)TEST (rmdir ("." ));if (TEST_RETURN ==-1 ) { - } - -if (TEST_RETURN ==-1 ) {if (TEST_ERRNO & (EBUSY |ENOTEMPTY )) {/* For functionality tests, verify that the * directory wasn't removed.
Signature · 4 lines
1.6.0.2 .
PATCH 1/1 rmdir/rmdir05: Delete unnecessary if
Hi!
Quoted 1 line
Delete unnecessary if in testcase
Pushed, thanks.
Signature · 2 lines
Cyril Hrubis [email protected]
Hello,
Quoted 12 lines · Cui Bixuan
Delete unnecessary if in testcase
Signed-off-by Cui Bixuan <[email protected]>--- testcases/kernel/syscalls/rmdir/rmdir05.c | 3 --- 1 files changed, 0 insertions(+), 3 deletions(-)testcases/kernel/syscalls/rmdir/rmdir05.c +0
-0
testcases/kernel/syscalls/rmdir/rmdir05.c int main(int argc, char **argv) · line 86
Quoted 9 lines
testcases/kernel/syscalls/rmdir/rmdir05.c +0
-3@@ -81,9 +81,6 @@ int main(int argc, char **argv)TEST (rmdir ("." ));if (TEST_RETURN ==-1 ) { - } - -if (TEST_RETURN ==-1 ) {if (TEST_ERRNO & (EBUSY |ENOTEMPTY )) {/* For functionality tests, verify that the * directory wasn't removed.
Good catch.
And more cleanup:
----------------------------------------------------------------------------------------
testcases/kernel/syscalls/bind/bind01.c +1 -3
@@ -119,10 +119,8 @@ int main(int argc, char *argv[])TEST (bind (s, tdat[testno].sockaddr, tdat[testno].salen)); -if (TEST_RETURN >0 ) { +if (TEST_RETURN >0 )TEST_RETURN =0 ; - }else { - }if (TEST_RETURN != tdat[testno].retval || (TEST_RETURN <0 &&TEST_ERRNO != tdat[testno].experrno)) {
testcases/kernel/syscalls/mkdir/mkdir01.c +0 -4
@@ -141,8 +141,6 @@ int main(int ac, char **av)TEST (mkdir (bad_addr,0777 ));/* check return code */ -if (TEST_RETURN ==-1 ) { - }if (TEST_RETURN ==-1 ) {if (TEST_ERRNO ==EFAULT ) {
@@ -171,8 +169,6 @@ int main(int ac, char **av)TEST (mkdir (get_high_address (),0777 ));/* check return code */ -if (TEST_RETURN ==-1 ) { - }if (TEST_RETURN ==-1 ) {if (TEST_ERRNO ==EFAULT ) {
testcases/kernel/syscalls/rmdir/rmdir03.c +0 -6
@@ -246,9 +246,6 @@ void dochild1(void)/* rmdir tstdir2 */ TEST (rmdir (tstdir2)); -if (TEST_ERRNO ) { - } -if (TEST_RETURN !=-1 ) { retval =1 ;tst_resm (TFAIL ,"call succeeded unexpectedly" );
@@ -284,9 +281,6 @@ void dochild2(void)/* rmdir tstdir4 */ TEST (rmdir (tstdir4)); -if (TEST_ERRNO ) { - } -if (TEST_RETURN !=-1 ) { retval =1 ;tst_resm (TFAIL ,"call succeeded unexpectedly" );
testcases/kernel/syscalls/rmdir/rmdir05.c +0 -8
@@ -81,9 +81,6 @@ int main(int argc, char **argv)TEST (rmdir ("." ));if (TEST_RETURN ==-1 ) { - } - -if (TEST_RETURN ==-1 ) {if (TEST_ERRNO & (EBUSY |ENOTEMPTY )) {/* For functionality tests, verify that the * directory wasn't removed.
@@ -125,9 +122,6 @@ int main(int argc, char **argv)TEST (rmdir (bad_addr));if (TEST_RETURN ==-1 ) { - } - -if (TEST_RETURN ==-1 ) {if (TEST_ERRNO ==EFAULT ) { tst_resm(TPASS, "rmdir() - path argument points below the minimum allocated address space failed as expected with errno %d : %s",
@@ -151,8 +145,6 @@ int main(int argc, char **argv)TEST (rmdir (get_high_address ())); -if (TEST_RETURN ==-1 ) { - }if (TEST_RETURN ==-1 ) {if (TEST_ERRNO ==EFAULT ) {
testcases/kernel/syscalls/sched_setscheduler/sched_setscheduler02.c +0 -3
@@ -94,9 +94,6 @@ int main(int ac, char **av)TEST (sched_setscheduler (pid,SCHED_FIFO , ¶m)); -if (TEST_ERRNO ) { - } -if (TEST_RETURN !=-1 ) {tst_resm (TFAIL ,"sched_setscheduler(2) passed " "with non root priveledges" );
testcases/kernel/syscalls/setregid/setregid03.c +0 -2
@@ -154,8 +154,6 @@ int main(int ac, char **av) *test_data[i].eff_gid); flag =-1 ; } -if (test_ret ==-1 ) { - } gid_verify(test_data[i].exp_real_usr, test_data[i].exp_eff_usr,
testcases/kernel/syscalls/setreuid/setreuid03.c +0 -2
@@ -136,8 +136,6 @@ int main(int ac, char **av) *test_data[i].eff_uid); } -if (TEST_RETURN ==-1 ) { - }uid_verify (test_data[i].exp_real_usr, test_data[i].exp_eff_usr, test_data[i].test_msg);
testcases/kernel/syscalls/setreuid/setreuid05.c +0 -2
@@ -137,8 +137,6 @@ int main(int argc, char **argv) *test_data[i].eff_uid); } -if (TEST_RETURN ==-1 ) { - }uid_verify (test_data[i].exp_real_usr, test_data[i].exp_eff_usr, test_data[i].test_msg);
testcases/kernel/syscalls/setsockopt/setsockopt01.c +0 -3
@@ -145,9 +145,6 @@ int main(int argc, char *argv[]) tdat[testno].optval, tdat[testno].optlen)); -if (TEST_RETURN ==-1 ) { - } -if (TEST_RETURN != tdat[testno].retval || (TEST_RETURN <0 &&TEST_ERRNO != tdat[testno].experrno)) {
testcases/kernel/syscalls/socket/socket01.c +1 -3
@@ -94,10 +94,8 @@ int main(int argc, char *argv[])for (testno =0 ; testno <TST_TOTAL ; ++testno) {TEST ((s =socket (tdat[testno].domain, tdat[testno].type, tdat[testno].proto))); -if (TEST_RETURN >=0 ) { +if (TEST_RETURN >=0 )TEST_RETURN =0 ;/* > 0 equivalent */ - }else { - }if (TEST_RETURN != tdat[testno].retval || (TEST_RETURN <0 && (TEST_ERRNO != tdat[testno].experrno &&TEST_ERRNO !=EPROTONOSUPPORT ))) {/* Change for defect 21065 for kernel change */ tst_resm (TFAIL ,"%s ; returned" /* of return code for this test but don't want */ " %d (expected %d), errno %d (expected" /* to break on older kernels */
testcases/kernel/syscalls/socketpair/socketpair01.c +1 -3
@@ -106,10 +106,8 @@ int main(int argc, char *argv[]) tdat[testno].type, tdat[testno].proto, tdat[testno].sv))); -if (TEST_RETURN >=0 ) { +if (TEST_RETURN >=0 )TEST_RETURN =0 ;/* > 0 equivalent */ - }else { - } if (TEST_RETURN != tdat[testno].retval || (TEST_RETURN && (TEST_ERRNO != tdat[testno].experrno
----------------------------------------------------------------------------------------
Thanks,
Zeng
------------------------------------------------------------------------------
Monitor Your Dynamic Infrastructure at Any Scale With Datadog! Get real-time metrics from all of your servers, apps and tools in one place.
SourceForge users - Click here to start your Free Trial of Datadog now!
http://pubads.g.doubleclick.net/gampad/clk?id=241902991&iu=/4140
_______________________________________________
Ltp-list mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ltp-list