public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: minachou@andestech.com, tim609@andestech.com, ltp@lists.linux.it,
	x5710999x@gmail.com
Subject: Re: [LTP] [PATCH] hugeshmctl02: Skipped EFAULT tests for libc variant
Date: Tue, 27 Jun 2023 15:50:04 +0200	[thread overview]
Message-ID: <20230627135004.GA58180@pevik> (raw)
In-Reply-To: <CAEemH2d=Mf=WsSXFGwUPeL3dqSOR2kf-eJr+C8HFTMMhAEynKg@mail.gmail.com>

Hi all,

> On Mon, Jun 26, 2023 at 5:22 PM Cyril Hrubis <chrubis@suse.cz> wrote:

> > Hi!
> > > You pointed the segment fault only exists on 32bit when use
> > > libc wrapper, but this condition skips for both 64and32 bits,
> > > isn't it?

> > > I guess the strict condition should be as below?

> > >     if (tcases[i].error == EFAULT && tv->shmctl == libc_shmctl &&
> > > tst_kernel_bits() == 32) {
> > >     ...
> > >     }

> > Actually I think that it may be safer to skip libc version regardless,
> > as long as we have the raw syscall test in place we are not getting any
> > more coverage from passing invalid address to the libc call, since
> > either the libc call is thin wrapper, i.e. equivalent to the syscall()
> > call which we already test, or it does something to the arguments, in
> > which case it's possible to trigger segfault, if not now in some future
> > libc versions.

Good to know. Because at least of some of the tests modified by Vinay Kumar
(which Dylan is referring) aren't able to run on 32bit libc if we skip with
&& tst_kernel_bits() == 32, e.g.

./msgctl04
tst_test.c:1558: TINFO: Timeout per run is 0h 00m 30s
msgctl04.c:103: TINFO: Testing variant: libc msgctl()
msgctl04.c:79: TPASS: msgctl(32816, 2, 0x565e4700) : EACCES (13)
tst_kernel.c:87: TINFO: uname.machine=x86_64 kernel is 64bit
tst_test.c:1618: TBROK: Test killed by SIGSEGV!

> Okay, sounds reasonable. I agree with this.

BTW I also get ENOMEM on my laptop (currently 1G free space):
hugeshmctl02.c:119: TBROK: shmget #1: ENOMEM (12)

Should we handle it somehow?

Kind regards,
Petr


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

  reply	other threads:[~2023-06-27 13:50 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15  9:39 [LTP] [PATCH] hugeshmctl02: Skipped EFAULT tests for libc variant Dylan Jhong
2023-06-26  2:36 ` Dylan Dai-Rong Jhong(鍾岱融)
2023-06-26  6:57 ` Li Wang
2023-06-26  9:14   ` Dylan Dai-Rong Jhong(鍾岱融)
2023-06-26  9:23   ` Cyril Hrubis
2023-06-27  1:26     ` Li Wang
2023-06-27 13:50       ` Petr Vorel [this message]
2023-06-27 15:06         ` Cyril Hrubis
2023-06-27 18:26           ` Petr Vorel
2023-07-06  3:13             ` Dylan Dai-Rong Jhong(鍾岱融)
2023-07-11 11:24               ` Dylan Dai-Rong Jhong(鍾岱融)
2023-07-11 22:24                 ` Petr Vorel

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=20230627135004.GA58180@pevik \
    --to=pvorel@suse.cz \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    --cc=minachou@andestech.com \
    --cc=tim609@andestech.com \
    --cc=x5710999x@gmail.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox