All of lore.kernel.org
 help / color / mirror / Atom feed
From: Caspar Zhang <czhang@redhat.com>
To: ltp-list@lists.sourceforge.net
Cc: czhang@redhat.com, emcnabb@redhat.com
Subject: Re: [LTP] [PATCH] [syscalls] io_submit: fix broken testcase
Date: Sun, 27 Mar 2011 22:04:46 +0800	[thread overview]
Message-ID: <4D8F43FE.7080305@redhat.com> (raw)
In-Reply-To: <1301233261-25499-1-git-send-email-czhang@redhat.com>

Sorry, there are some trailing whitespace in the patch, please ignore
this one, I'll workout a newer version.

On 03/27/2011 09:41 PM, czhang@redhat.com wrote:
> 
> io_submit01 contains 4 negative testing: EINVAL, EFAULT, EINVAL+EFAULT
> and EBADF. The first 3 testcases didn't initialize the content of 'ctx'
> so that they contained invalid argument in the cases. This may cause
> incorrect result on some architectures, like:
> 
> io_submit01    1  TPASS  :  expected failure - returned value = 22 :
> Invalid argument
> io_submit01    2  TFAIL  :  unexpected returned value - -22 - expected
> -14
> io_submit01    3  TPASS  :  expected failure - returned value = 22 :
> Invalid argument
> io_submit01    4  TPASS  :  expected failure - returned value = 9 : Bad
> file descriptor
> 
> I fixed this issue by moving the initialization of ctx before the cases,
> also added some additional negative + positive cases. Now tested on x86
> and s390x system, the results seem good:
> 
> io_submit01    1  TPASS  :  expected failure - returned value = 22 :
> Invalid argument
> io_submit01    2  TPASS  :  expected failure - returned value = 22 :
> Invalid argument
> io_submit01    3  TPASS  :  expected failure - returned value = 22 :
> Invalid argument
> io_submit01    4  TPASS  :  expected failure - returned value = 14 : Bad
> address
> io_submit01    5  TPASS  :  expected failure - returned value = 22 :
> Invalid argument
> io_submit01    6  TPASS  :  expected failure - returned value = 9 : Bad
> file descriptor
> io_submit01    7  TPASS  :  call succeeded expectedly
> io_submit01    8  TPASS  :  call succeeded expectedly
> 
> Signed-off-by: Caspar Zhang <czhang@redhat.com>
> ---
>  testcases/kernel/syscalls/io_submit/io_submit01.c |  143 ++++++++++++++-------
>  1 files changed, 98 insertions(+), 45 deletions(-)
> 


-- 
/---------------------------------------\
| Name: Caspar Zhang                    |
| Team: Kernel-QE                       |
| Timezone: GMT+0800 (Asia/Shanghai)    |
| IRC: caspar @ #kernel-qe, #eng-china  |
| Phone: +86-10-6260-8150               |
| Cellphone: +86-138-1073-0090          |
\---------------------------------------/

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list

  reply	other threads:[~2011-03-27 14:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-27 13:41 [LTP] [PATCH] [syscalls] io_submit: fix broken testcase czhang
2011-03-27 14:04 ` Caspar Zhang [this message]
2011-03-27 14:13 ` czhang
2011-04-01 14:44   ` Cyril Hrubis
2011-04-07  7:31     ` [LTP] [PATCH v2] " Caspar Zhang
2011-04-12  8:06     ` Caspar Zhang
2011-04-13 17:33       ` Cyril Hrubis
2011-04-14  3:33         ` [LTP] [PATCH v3] " Caspar Zhang
2011-04-14 14:44           ` Cyril Hrubis
2011-04-14 14:28             ` [LTP] [PATCH v4] " Caspar Zhang
2011-04-14 14:46               ` Masatake YAMATO
2011-04-14 16:33               ` Cyril Hrubis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D8F43FE.7080305@redhat.com \
    --to=czhang@redhat.com \
    --cc=emcnabb@redhat.com \
    --cc=ltp-list@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.