* [LTP] [PATCH] kill05: Added proper return code (TPASS) if testcase exit without errors. @ 2011-07-13 14:27 Francesco RUNDO 2011-07-13 15:33 ` Cyril Hrubis 0 siblings, 1 reply; 4+ messages in thread From: Francesco RUNDO @ 2011-07-13 14:27 UTC (permalink / raw) To: ltp-list From: Francesco Rundo <francesco.rundo@st.com> Added kill05 TPASS exit code. The testcase didn't return any retrun code in case of exit without errors i.e. in case of EPERM is correctly raised by the system. Signed-off-by: Francesco Rundo <francesco.rundo@st.com> Signed-off-by: Carmelo Amoroso <carmelo.amoroso@st.com> --- testcases/kernel/syscalls/kill/kill05.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) diff --git a/testcases/kernel/syscalls/kill/kill05.c b/testcases/kernel/syscalls/kill/kill05.c index fe34788..23fac0a 100644 --- a/testcases/kernel/syscalls/kill/kill05.c +++ b/testcases/kernel/syscalls/kill/kill05.c @@ -126,6 +126,8 @@ int main(int ac, char **av) tst_resm(TBROK|TERRNO, "waitpid failed"); else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) tst_resm(TFAIL, "child exited abnormally"); + else + tst_resm(TPASS, "received expected errno(EPERM)"); cleanup(); tst_exit(); } -- 1.7.4.4 ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [LTP] [PATCH] kill05: Added proper return code (TPASS) if testcase exit without errors. 2011-07-13 14:27 [LTP] [PATCH] kill05: Added proper return code (TPASS) if testcase exit without errors Francesco RUNDO @ 2011-07-13 15:33 ` Cyril Hrubis [not found] ` <000c01cc41f3$bf4c0370$3de40a50$@rundo@st.com> 0 siblings, 1 reply; 4+ messages in thread From: Cyril Hrubis @ 2011-07-13 15:33 UTC (permalink / raw) To: Francesco RUNDO; +Cc: ltp-list Hi! > Added kill05 TPASS exit code. > > The testcase didn't return any retrun code in case of > exit without errors i.e. in case of EPERM is correctly > raised by the system. That shouldn't be a problem. The source in lib/tst_res.c initalizes the return value to 0 (which is equal to TPASS) so when you call tst_exit() it returns TPASS unless the tests reports failure. -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <000c01cc41f3$bf4c0370$3de40a50$@rundo@st.com>]
* Re: [LTP] [PATCH] kill05: Added proper return code (TPASS) if testcase exit without errors. [not found] ` <000c01cc41f3$bf4c0370$3de40a50$@rundo@st.com> @ 2011-07-14 10:32 ` Cyril Hrubis [not found] ` <000d01cc421a$607dc5a0$217950e0$@rundo@st.com> 0 siblings, 1 reply; 4+ messages in thread From: Cyril Hrubis @ 2011-07-14 10:32 UTC (permalink / raw) To: Francesco RUNDO; +Cc: ltp-list Hi! > Thanks for your comment. > > Anyway, I know LTP initalizes the return value to 0 (TPASS) but the problem > is that this return code was "not reported" in the LTP log (in the same way > used by other testcases) and, moreover, the "kill05" output message was > misleading as it reported only the message " "kill failed with EPERM" > without any further message which explained that EPERM was the expected test > result and then the test worked fine. > > Without above info, the result of the test was not very clear taking into > account the output message ("kill failed with EPERM") which didn't include > any further info about: > > 1. LTP exit code (TPASS/TFAIL/TINFO/TBROK...); > 2. "obtained result" against "expected ones"; Okay, so the commit description was a bit misleading as return value is integer nuber returned after process has ceased to exist. I would rather change it to "kill05 didn't print ...". -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <000d01cc421a$607dc5a0$217950e0$@rundo@st.com>]
* Re: [LTP] [PATCH] kill05: Added proper return code (TPASS) if testcase exit without errors. [not found] ` <000d01cc421a$607dc5a0$217950e0$@rundo@st.com> @ 2011-07-14 11:56 ` Cyril Hrubis 0 siblings, 0 replies; 4+ messages in thread From: Cyril Hrubis @ 2011-07-14 11:56 UTC (permalink / raw) To: Francesco RUNDO; +Cc: ltp-list Hi! > Hmmm....I'm not sure about that....is not only a proper "print" issue as the > testcase should return a "well defined" LTP error code i.e. > TAPSS/TFAIL/TBROK etc... > > In the lib/tst_res.c, the error code used in the tst_resm()[internally by > "tst_res()"] is used to setup the "T_exitval" variable which is used to > define the LTP testcase exit code in the "tst_exit()". Well test that just calls tst_exit() is successful and that would not change, that would be called regression ;). Frankly there is quite lot of things that has default behavior that must not change and not only in LTP. > Correctly, in the "kill05" test, each wrong scenario is properly managed > with a tst_resm(TFAIL,"......") and so on. > > Why it didn't the same(with tst_resm(TPASS,"...")) in case of no errors ? I'm certainly not against that, I just don't like the wording for the commit message, which made me think that the commit fixes very different problem. > Ok about your comment for the default LTP setup but I think the "kill05" > test(or generally speaking, each LTP testcase) shouldn't make any assumption > about LTP default settings as it could changes.... > Each test should set proper exit error code according to the obtained > results/expected ones. In short I will gladly pick your patch, just clarify the commit message a little. -- Cyril Hrubis chrubis@suse.cz ------------------------------------------------------------------------------ AppSumo Presents a FREE Video for the SourceForge Community by Eric Ries, the creator of the Lean Startup Methodology on "Lean Startup Secrets Revealed." This video shows you how to validate your ideas, optimize your ideas and identify your business strategy. http://p.sf.net/sfu/appsumosfdev2dev _______________________________________________ Ltp-list mailing list Ltp-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ltp-list ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-07-14 11:54 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2011-07-13 14:27 [LTP] [PATCH] kill05: Added proper return code (TPASS) if testcase exit without errors Francesco RUNDO 2011-07-13 15:33 ` Cyril Hrubis [not found] ` <000c01cc41f3$bf4c0370$3de40a50$@rundo@st.com> 2011-07-14 10:32 ` Cyril Hrubis [not found] ` <000d01cc421a$607dc5a0$217950e0$@rundo@st.com> 2011-07-14 11:56 ` Cyril Hrubis
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.