All of lore.kernel.org
 help / color / mirror / Atom feed
* [LTP] [PATCH] Added proper return code (TPASS) in case of exit without errors.
@ 2011-07-12  8:45 Francesco RUNDO
  0 siblings, 0 replies; 4+ messages in thread
From: Francesco RUNDO @ 2011-07-12  8:45 UTC (permalink / raw)
  To: ltp-list

From: Francesco Rundo <francesco.rundo@st.com>

The "kill05" testcase checks if EPERM is correctly raised by the system.
The testcase manages the error exit codes correctly while it didn't return
any exit code in case of no errors occured i.e. the system has raised EPERM.
The correct exit-code "TPASS" has been added in case of the test works fine without
errors.

Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
Reviewed-by: Carmelo Amoroso <carmelo.amoroso@st.com>
---
 testcases/kernel/syscalls/kill/kill05.c |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/testcases/kernel/syscalls/kill/kill05.c b/testcases/kernel/syscalls/kill/kill05.c
index fe34788..2a75a2a 100644
--- a/testcases/kernel/syscalls/kill/kill05.c
+++ b/testcases/kernel/syscalls/kill/kill05.c
@@ -126,6 +126,7 @@ 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


------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security 
threats, fraudulent activity, and more. Splunk takes this data and makes 
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
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

end of thread, other threads:[~2011-07-12 17:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <4e1c09b0.04af2a0a.2ccb.ffffab1eSMTPIN_ADDED@mx.google.com>
2011-07-12 14:38 ` [LTP] [PATCH] Added proper return code (TPASS) in case of exit without errors Garrett Cooper
2011-07-12 16:01   ` Carmelo AMOROSO
2011-07-12 17:06     ` Garrett Cooper
2011-07-12  8:45 Francesco RUNDO

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.