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

* Re: [LTP] [PATCH] Added proper return code (TPASS) in case of exit without errors.
  2011-07-12 16:01   ` Carmelo AMOROSO
@ 2011-07-12 17:06     ` Garrett Cooper
  0 siblings, 0 replies; 4+ messages in thread
From: Garrett Cooper @ 2011-07-12 17:06 UTC (permalink / raw)
  To: Carmelo AMOROSO; +Cc: ltp-list

On Tue, Jul 12, 2011 at 9:01 AM, Carmelo AMOROSO <carmelo.amoroso@st.com> wrote:
> On 12/07/2011 16.38, Garrett Cooper wrote:
>> On Tue, Jul 12, 2011 at 1:45 AM, Francesco RUNDO <francesco.rundo@st.com> wrote:
>>> 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>
>>
>>     Please properly styleize this; this doesn't conform to Linux
>> coding standards..
>
> I've noted there is a trailing white space ?
> is this the only problem ?

    No. Many software projects written in C, python, etc don't allow
conditionals with inline test statements, e.g.

    if (foo) bar;

    This is almost always done like 1):

    if (foo)
        bar;

    or 2):

    if (foo) {
        bar;
    }

    See K&R and the LKML for more details on what should be done.
Thanks,
-Garrett

------------------------------------------------------------------------------
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

* Re: [LTP] [PATCH] Added proper return code (TPASS) in case of exit without errors.
  2011-07-12 14:38 ` Garrett Cooper
@ 2011-07-12 16:01   ` Carmelo AMOROSO
  2011-07-12 17:06     ` Garrett Cooper
  0 siblings, 1 reply; 4+ messages in thread
From: Carmelo AMOROSO @ 2011-07-12 16:01 UTC (permalink / raw)
  To: ltp-list

On 12/07/2011 16.38, Garrett Cooper wrote:
> On Tue, Jul 12, 2011 at 1:45 AM, Francesco RUNDO <francesco.rundo@st.com> wrote:
>> 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>
> 
>     Please properly styleize this; this doesn't conform to Linux
> coding standards..

I've noted there is a trailing white space ?
is this the only problem ?

carmelo


> Thanks,
> -Garrett
> 
> ------------------------------------------------------------------------------
> 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
> 


------------------------------------------------------------------------------
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	[flat|nested] 4+ messages in thread

* Re: [LTP] [PATCH] Added proper return code (TPASS) in case of exit without errors.
       [not found] <4e1c09b0.04af2a0a.2ccb.ffffab1eSMTPIN_ADDED@mx.google.com>
@ 2011-07-12 14:38 ` Garrett Cooper
  2011-07-12 16:01   ` Carmelo AMOROSO
  0 siblings, 1 reply; 4+ messages in thread
From: Garrett Cooper @ 2011-07-12 14:38 UTC (permalink / raw)
  To: Francesco RUNDO; +Cc: ltp-list

On Tue, Jul 12, 2011 at 1:45 AM, Francesco RUNDO <francesco.rundo@st.com> wrote:
> 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>

    Please properly styleize this; this doesn't conform to Linux
coding standards..
Thanks,
-Garrett

------------------------------------------------------------------------------
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	[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 --
2011-07-12  8:45 [LTP] [PATCH] Added proper return code (TPASS) in case of exit without errors Francesco RUNDO
     [not found] <4e1c09b0.04af2a0a.2ccb.ffffab1eSMTPIN_ADDED@mx.google.com>
2011-07-12 14:38 ` Garrett Cooper
2011-07-12 16:01   ` Carmelo AMOROSO
2011-07-12 17:06     ` Garrett Cooper

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.