From: Jan Stancek <jstancek@redhat.com>
To: Francesco RUNDO <francesco.rundo@st.com>
Cc: ltp-list@lists.sourceforge.net
Subject: Re: [LTP] [PATCH] madvise/madvise03.c: Changed test exit code
Date: Fri, 21 Feb 2014 07:37:47 -0500 (EST) [thread overview]
Message-ID: <1275798317.7097152.1392986267877.JavaMail.zimbra@redhat.com> (raw)
In-Reply-To: <D2A2C37B00D2EA4CB1886D29B96695C55AE578@SAFEX1NODE23.st.com>
----- Original Message -----
> From: "Francesco RUNDO" <francesco.rundo@st.com>
> To: "Jan Stancek" <jstancek@redhat.com>
> Cc: gaowanlong@cn.fujitsu.com, ltp-list@lists.sourceforge.net
> Sent: Friday, 21 February, 2014 1:28:14 PM
> Subject: RE: [LTP] [PATCH] madvise/madvise03.c: Changed test exit code
>
>
> > > Now, "do_fallocate()" needs fallocate() op. but on ext3 this is not
> > > supported i.e. ENOTSUP.
>
> >>Do you have kernel compiled with CONFIG_TMPFS=y?
>
> No. I've just checked kernel with above option: the reported madvise03
> testcase worked fine (usage of shmem_fallocate()).
> So your analysis of my scenario is corret.
> Please , discard posted patch.
We can still handle this with some patch to skip first testcase if kernel is
compiled without "CONFIG_TMPFS=y". I think that qualifies as TCONF.
I'll leave it up to you.
Regards,
Jan
>
> Thanks so much.
> FR
>
> >
> > madvise(start=0x7fcff6d66000 len_in=0x1000 behavior=0x9) Call Trace:
> > 0xffffffff81150130 : shmem_fallocate+0x0/0x300 [kernel]
> > 0xffffffff8122d056 : shm_fallocate+0x26/0x40 [kernel]
> > 0xffffffff811a0089 : do_fallocate+0xf9/0x190 [kernel]
> > 0xffffffff8115ac95 : SyS_madvise+0x355/0x7a0 [kernel]
> > 0xffffffff815d05d9 : system_call_fastpath+0x16/0x1b [kernel]
> >
> > Do you have possibility to run original testcase with strace?
> > # strace ./madvise03 2>&1 | grep -v abcdefghijklmnopqrstuvwxyz12345
> >
> > Regards,
> > Jan
> >
> > > This is the reason for which I consider this scenario as not
> > > supported and not ENOSYS as the system call is supported as the
> > > remaining scenarios worked fine (MADV_DONTFORK and MADV_DOFORK).
> > >
> > > Regards
> > > FR
> > > >
> > > > Regards,
> > > > FR
> > > >
> > > > >>Regards,
> > > > >>Jan
> > > >
> > > >
> > > > >
> > > > >
> > > > > Regards,
> > > > > FR
> > > > >
> > > > > -----Original Message-----
> > > > > From: Wanlong Gao [mailto:gaowanlong@cn.fujitsu.com]
> > > > > Sent: Friday, February 21, 2014 9:02 AM
> > > > > To: Francesco RUNDO
> > > > > Cc: ltp-list@lists.sourceforge.net
> > > > > Subject: Re: [LTP] [PATCH] madvise/madvise03.c: Changed test
> > > > > exit code
> > > > >
> > > > > On 02/21/2014 03:51 PM, Francesco RUNDO wrote:
> > > > > > Changed exit code from TFAIL to TCONF in case of unsupported
> > > > > > syscall.
> > > > > > The "madvise" syscall needs kernel support as well as fs
> > > > > > support as -for specific advice- it requires specific
> > > > > > filesystem operations such as fallocate().
> > > > >
> > > > > Could you paste the running log on not supported system?
> > > > >
> > > > > Thanks,
> > > > > Wanlong Gao
> > > > >
> > > > > > So, if kernel support is missed or fs doesn't provide specific
> > > > > > operation needed for such "advice" scenario of that syscall,
> > > > > > the right exit code (according to LTP defs) is not TFAIL as it
> > > > > > is not a failure but it is TCONF as the syscall is unsupported.
> > > > > >
> > > > > > Signed-off-by: Francesco Rundo <francesco.rundo@st.com>
> > > > > > ---
> > > > > > testcases/kernel/syscalls/madvise/madvise03.c | 17
> > > > > > +++++++++++++----
> > > > > > 1 files changed, 13 insertions(+), 4 deletions(-)
> > > > > >
> > > > > > diff --git a/testcases/kernel/syscalls/madvise/madvise03.c
> > > > > > b/testcases/kernel/syscalls/madvise/madvise03.c
> > > > > > index b0c17e8..23dd9a6 100644
> > > > > > --- a/testcases/kernel/syscalls/madvise/madvise03.c
> > > > > > +++ b/testcases/kernel/syscalls/madvise/madvise03.c
> > > > > > @@ -160,10 +160,19 @@ static void cleanup(void) static void
> > > > > > check_and_print(char *advice) {
> > > > > > if (TEST_RETURN == -1) {
> > > > > > - tst_resm(TFAIL,
> > > > > > - "madvise test for %s failed with "
> > > > > > - "return = %ld, errno = %d : %s",
> > > > > > - advice, TEST_RETURN, TEST_ERRNO, strerror(TEST_ERRNO));
> > > > > > + if (TEST_ERRNO != ENOTSUP) {
> > > > > > + tst_resm(TFAIL,
> > > > > > + "madvise test for %s failed with "
> > > > > > + "return = %ld, errno = %d : %s",
> > > > > > + advice, TEST_RETURN, TEST_ERRNO,
> > > > > > + strerror(TEST_ERRNO));
> > > > > > + } else {
> > > > > > + tst_resm(TCONF,
> > > > > > + "madvise test for %s unsupported "
> > > > > > + "return = %ld, errno = %d : %s",
> > > > > > + advice, TEST_RETURN, TEST_ERRNO,
> > > > > > + strerror(TEST_ERRNO));
> > > > > > + }
> > > > > > } else if (STD_FUNCTIONAL_TEST) {
> > > > > > tst_resm(TPASS, "madvise test for %s PASSED", advice);
> > > > > > }
> > > > > >
> > > > >
> > > > >
> > > > > ----------------------------------------------------------------
> > > > > ----
> > > > > --
> > > > > -------- Managing the Performance of Cloud-Based Applications
> > > > > Take advantage of what the Cloud has to offer - Avoid Common
> > > > > Pitfalls.
> > > > > Read the Whitepaper.
> > > > > http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.
> > > > > clktrk _______________________________________________
> > > > > Ltp-list mailing list
> > > > > Ltp-list@lists.sourceforge.net
> > > > > https://lists.sourceforge.net/lists/listinfo/ltp-list
> > > > >
> > > >
> > >
> >
>
------------------------------------------------------------------------------
Managing the Performance of Cloud-Based Applications
Take advantage of what the Cloud has to offer - Avoid Common Pitfalls.
Read the Whitepaper.
http://pubads.g.doubleclick.net/gampad/clk?id=121054471&iu=/4140/ostg.clktrk
_______________________________________________
Ltp-list mailing list
Ltp-list@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/ltp-list
next prev parent reply other threads:[~2014-02-21 12:38 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-21 7:51 [LTP] [PATCH] madvise/madvise03.c: Changed test exit code Francesco RUNDO
2014-02-21 8:02 ` Wanlong Gao
2014-02-21 8:38 ` Francesco RUNDO
2014-02-21 8:39 ` Wanlong Gao
2014-02-21 9:08 ` Jan Stancek
2014-02-21 9:21 ` Francesco RUNDO
2014-02-21 10:06 ` Jan Stancek
2014-02-21 10:25 ` Francesco RUNDO
2014-02-21 11:01 ` Jan Stancek
2014-02-21 11:09 ` Jan Stancek
2014-02-21 12:28 ` Francesco RUNDO
2014-02-21 12:37 ` Jan Stancek [this message]
2014-02-21 12:42 ` Francesco RUNDO
2014-02-25 17:59 ` chrubis
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=1275798317.7097152.1392986267877.JavaMail.zimbra@redhat.com \
--to=jstancek@redhat.com \
--cc=francesco.rundo@st.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.