From: Subrata M. <su...@li...> - 2008-01-22 10:34:09
|
Well, i am not of the idea to use direct return(), or, exit() when returning from a test case, as, tst_exit() was designed to be meant for that. Infact tst_exit() performs other activities before actually exiting. And may be we need to look in to the tst_exit() code for any hidden bugs if at all it has, for which even some issue(s) has been reported earlier. May be we should also have some other ways to avoid this warning(s). May be Robert/Mike/Nate/Paul/Ricardo would like to produce their views on this. --Subrata > > Hi, > > I'm sure that is a beauty fix, decide if you want to circumvent the > > warning. > > Affected are the files pidns01.c, pidns03.c, shmnstest.c, the patch sets > > only the return statement. > > Hi, > > Currently i can't say how much it will impact to the stability, but > yeah for warning removal it is ok, but someway we need to also think > about to tell LTP that some test failed and set some global exit value > or clean some used data. i think tst_exit() is doing that only, in one > sentence i am just informing FAIL to {LTPROOT} and telling handle it > in own way. > > Subrata can give more comment on this. > > Thanks > Rishi > > > > Regards, > > plain text document attachment > > (fix_control_reaches_end_of_non-void_function) > > diff -pur ltp-full-20071231.orig/testcases/kernel/containers/pidns/pidns01.c ltp-full-20071231/testcases/kernel/containers/pidns/pidns01.c > > --- ltp-full-20071231.orig/testcases/kernel/containers/pidns/pidns01.c 2008-01-01 12:44:42.000000000 +0100 > > +++ ltp-full-20071231/testcases/kernel/containers/pidns/pidns01.c 2008-01-21 16:18:37.783853000 +0100 > > @@ -101,7 +101,7 @@ int child_fn1(void *ttype) > > tst_resm(TFAIL, "FAIL: Got unexpected result of" > > " cpid=%d ppid=%d\n", cpid, ppid); > > } > > - tst_exit(); > > + return 1; > > } > > > > /*********************************************************************** > > Nur in ltp-full-20071231/testcases/kernel/containers/pidns: pidns01.c.orig. > > diff -pur ltp-full-20071231.orig/testcases/kernel/containers/pidns/pidns03.c ltp-full-20071231/testcases/kernel/containers/pidns/pidns03.c > > --- ltp-full-20071231.orig/testcases/kernel/containers/pidns/pidns03.c 2008-01-01 12:44:42.000000000 +0100 > > +++ ltp-full-20071231/testcases/kernel/containers/pidns/pidns03.c 2008-01-21 16:19:06.372251000 +0100 > > @@ -164,7 +164,7 @@ child_fn(pid_t Ppid) > > closedir(d); > > } > > > > - cleanup(); > > + return 1; > > } > > > > /* > > Nur in ltp-full-20071231/testcases/kernel/containers/pidns: pidns03.c.orig. > > diff -pur ltp-full-20071231.orig/testcases/kernel/containers/sysvipc/shmnstest.c ltp-full-20071231/testcases/kernel/containers/sysvipc/shmnstest.c > > --- ltp-full-20071231.orig/testcases/kernel/containers/sysvipc/shmnstest.c 2008-01-01 12:44:42.000000000 +0100 > > +++ ltp-full-20071231/testcases/kernel/containers/sysvipc/shmnstest.c 2008-01-21 16:19:50.000574000 +0100 > > @@ -69,7 +69,7 @@ int check_shmid(void *vtest) > > write(p2[1], "exists", 7); > > shmctl(id, IPC_RMID, NULL); > > } > > - tst_exit(0); > > + return 0; > > } > > > > #define UNSHARESTR "unshare" > > @@ -134,5 +134,5 @@ int main(int argc, char *argv[]) > > > > /* destroy the key */ > > shmctl(id, IPC_RMID, NULL); > > - tst_exit(0); > > + return 0; > > } > > ------------------------------------------------------------------------- > > This SF.net email is sponsored by: Microsoft > > Defy all challenges. Microsoft(R) Visual Studio 2008. > > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > > _______________________________________________ Ltp-list mailing list Ltp...@li... https://lists.sourceforge.net/lists/listinfo/ltp-list > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2008. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ Ltp-list mailing list Ltp...@li... https://lists.sourceforge.net/lists/listinfo/ltp-list |