public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
* [LTP]  [PATCH 1/3] mbind01: Fix the bug of result output
@ 2009-09-02  5:43 Zhang Xiliang
  2009-09-07 11:40 ` Subrata Modak
  0 siblings, 1 reply; 2+ messages in thread
From: Zhang Xiliang @ 2009-09-02  5:43 UTC (permalink / raw)
  To: ltp-list

I tested ltp mbind case and found the result is error as follows:

mbind01     0  TINFO  :  (case00) START
EXPECT: return value(ret)=0 errno=0 (Success)
RESULT: return value(ret)=0 errno=0 (Success)
mbind01     0  TINFO  :  (case00) END => OK
mbind01     0  TINFO  :  (case01) START
EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
RESULT: return value(ret)=-1 errno=22 (Invalid argument)
mbind01     0  TINFO  :  (case01) END => NG
mbind01     0  TINFO  :  (case02) START
EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
RESULT: return value(ret)=-1 errno=22 (Invalid argument)
mbind01     0  TINFO  :  (case02) END => NG
mbind01     0  TINFO  :  (case03) START
EXPECT: return value(ret)=0 errno=0 (Success)
RESULT: return value(ret)=0 errno=0 (Success)
mbind01     0  TINFO  :  (case03) END => OK
mbind01     0  TINFO  :  (case04) START
EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
RESULT: return value(ret)=-1 errno=22 (Invalid argument)
mbind01     0  TINFO  :  (case04) END => NG
mbind01     0  TINFO  :  (case05) START
EXPECT: return value(ret)=0 errno=0 (Success)
RESULT: return value(ret)=0 errno=0 (Success)
mbind01     0  TINFO  :  (case05) END => OK
mbind01     0  TINFO  :  (case06) START
EXPECT: return value(ret)=0 errno=0 (Success), r/w check=OK
RESULT: return value(ret)=0 errno=0 (Success), r/w check=NG
mbind01     0  TINFO  :  (case06) END => OK
mbind01     0  TINFO  :  (case07) START
EXPECT: return value(ret)=0 errno=0 (Success)
RESULT: return value(ret)=0 errno=0 (Success)
mbind01     0  TINFO  :  (case07) END => OK
mbind01     0  TINFO  :  (case08) START
EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
RESULT: return value(ret)=-1 errno=22 (Invalid argument)
mbind01     0  TINFO  :  (case08) END => NG
mbind01     0  TINFO  :  (case09) START
EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
RESULT: return value(ret)=-1 errno=22 (Invalid argument)
mbind01     0  TINFO  :  (case09) END => NG
mbind01     0  TINFO  :  (case10) START
mbind01     1  TFAIL  :  get_mempolicy failed - errno = 14 : Bad address
 
In case01,case02,case04,case08,case09, the expect is same with the result.
So these cases should be OK instead of NG.

In sourse code, TEST_RETURN should get value by "ret".
By the way, the "switch/case RESULT_OK" missed "break".

Signed-off-by: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>
---
 testcases/kernel/syscalls/mbind/mbind01.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/testcases/kernel/syscalls/mbind/mbind01.c b/testcases/kernel/syscalls/mbind/mbind01.c
index 2b861ac..94c2dd0 100644
--- a/testcases/kernel/syscalls/mbind/mbind01.c
+++ b/testcases/kernel/syscalls/mbind/mbind01.c
@@ -389,6 +389,7 @@ int main(int ac, char **av) {
         		        int ret;
 	        	        tst_resm(TINFO,"(case%02d) START", i);
         	        	ret = do_test(&tcase[i]);
+				TEST_RETURN = ret;
 	        	        tst_resm(TINFO,"(case%02d) END => %s", i, ( TEST_RETURN== 0) ? "OK" : "NG");
 	                	result |= ret;
         		}
@@ -399,6 +400,7 @@ int main(int ac, char **av) {
 		        switch(result) {
         		case RESULT_OK:
 					tst_resm(TPASS, "mbind call succeeded --OK-- ");
+					break;
 
 		        default:
                 		tst_resm(TFAIL, "%s failed - errno = %d : %s --NG--", TCID, TEST_ERRNO, strerror(TEST_ERRNO));



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [LTP] [PATCH 1/3] mbind01: Fix the bug of result output
  2009-09-02  5:43 [LTP] [PATCH 1/3] mbind01: Fix the bug of result output Zhang Xiliang
@ 2009-09-07 11:40 ` Subrata Modak
  0 siblings, 0 replies; 2+ messages in thread
From: Subrata Modak @ 2009-09-07 11:40 UTC (permalink / raw)
  To: Zhang Xiliang; +Cc: ltp-list

On Wed, 2009-09-02 at 13:43 +0800, Zhang Xiliang wrote: 
> I tested ltp mbind case and found the result is error as follows:
> 
> mbind01     0  TINFO  :  (case00) START
> EXPECT: return value(ret)=0 errno=0 (Success)
> RESULT: return value(ret)=0 errno=0 (Success)
> mbind01     0  TINFO  :  (case00) END => OK
> mbind01     0  TINFO  :  (case01) START
> EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
> RESULT: return value(ret)=-1 errno=22 (Invalid argument)
> mbind01     0  TINFO  :  (case01) END => NG
> mbind01     0  TINFO  :  (case02) START
> EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
> RESULT: return value(ret)=-1 errno=22 (Invalid argument)
> mbind01     0  TINFO  :  (case02) END => NG
> mbind01     0  TINFO  :  (case03) START
> EXPECT: return value(ret)=0 errno=0 (Success)
> RESULT: return value(ret)=0 errno=0 (Success)
> mbind01     0  TINFO  :  (case03) END => OK
> mbind01     0  TINFO  :  (case04) START
> EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
> RESULT: return value(ret)=-1 errno=22 (Invalid argument)
> mbind01     0  TINFO  :  (case04) END => NG
> mbind01     0  TINFO  :  (case05) START
> EXPECT: return value(ret)=0 errno=0 (Success)
> RESULT: return value(ret)=0 errno=0 (Success)
> mbind01     0  TINFO  :  (case05) END => OK
> mbind01     0  TINFO  :  (case06) START
> EXPECT: return value(ret)=0 errno=0 (Success), r/w check=OK
> RESULT: return value(ret)=0 errno=0 (Success), r/w check=NG
> mbind01     0  TINFO  :  (case06) END => OK
> mbind01     0  TINFO  :  (case07) START
> EXPECT: return value(ret)=0 errno=0 (Success)
> RESULT: return value(ret)=0 errno=0 (Success)
> mbind01     0  TINFO  :  (case07) END => OK
> mbind01     0  TINFO  :  (case08) START
> EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
> RESULT: return value(ret)=-1 errno=22 (Invalid argument)
> mbind01     0  TINFO  :  (case08) END => NG
> mbind01     0  TINFO  :  (case09) START
> EXPECT: return value(ret)=-1 errno=22 (Invalid argument)
> RESULT: return value(ret)=-1 errno=22 (Invalid argument)
> mbind01     0  TINFO  :  (case09) END => NG
> mbind01     0  TINFO  :  (case10) START
> mbind01     1  TFAIL  :  get_mempolicy failed - errno = 14 : Bad address
> 
> In case01,case02,case04,case08,case09, the expect is same with the result.
> So these cases should be OK instead of NG.
> 
> In sourse code, TEST_RETURN should get value by "ret".
> By the way, the "switch/case RESULT_OK" missed "break".
> 
> Signed-off-by: Zhang Xiliang <zhangxiliang@cn.fujitsu.com>

Thanks.

Regards--
Subrata

> ---
>  testcases/kernel/syscalls/mbind/mbind01.c |    2 ++
>  1 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/testcases/kernel/syscalls/mbind/mbind01.c b/testcases/kernel/syscalls/mbind/mbind01.c
> index 2b861ac..94c2dd0 100644
> --- a/testcases/kernel/syscalls/mbind/mbind01.c
> +++ b/testcases/kernel/syscalls/mbind/mbind01.c
> @@ -389,6 +389,7 @@ int main(int ac, char **av) {
>          		        int ret;
>  	        	        tst_resm(TINFO,"(case%02d) START", i);
>          	        	ret = do_test(&tcase[i]);
> +				TEST_RETURN = ret;
>  	        	        tst_resm(TINFO,"(case%02d) END => %s", i, ( TEST_RETURN== 0) ? "OK" : "NG");
>  	                	result |= ret;
>          		}
> @@ -399,6 +400,7 @@ int main(int ac, char **av) {
>  		        switch(result) {
>          		case RESULT_OK:
>  					tst_resm(TPASS, "mbind call succeeded --OK-- ");
> +					break;
> 
>  		        default:
>                  		tst_resm(TFAIL, "%s failed - errno = %d : %s --NG--", TCID, TEST_ERRNO, strerror(TEST_ERRNO));
> 
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
> trial. Simplify your report design, integration and deployment - and focus on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> Ltp-list mailing list
> Ltp-list@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/ltp-list


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-09-07 11:41 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-09-02  5:43 [LTP] [PATCH 1/3] mbind01: Fix the bug of result output Zhang Xiliang
2009-09-07 11:40 ` Subrata Modak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox