All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2] syscalls/mmap14: Rewrite test using new LTP API
Date: Tue, 31 Oct 2023 16:39:29 +0100	[thread overview]
Message-ID: <ZUEfsSXxSe4nIsyf@yuki> (raw)
In-Reply-To: <871qe412jm.fsf@suse.de>

Hi!
> > -static void setup(void)
> > +static void run(void)
> >  {
> > -	tst_require_root();
> > +	unsigned int sz_before, sz_after, sz_diff;
> >  
> > -	tst_sig(FORK, DEF_HANDLER, cleanup);
> > +	getvmlck(&sz_before);
> >  
> > -	TEST_PAUSE;
> > -}
> > +	if (((sz_before * 1024) + MMAPSIZE) > rlim.rlim_cur)
> > +		tst_brk(TBROK, "Trying to exceed RLIMIT_MEMLOCK limit");
> 
> Should this be TCONF not TBROK?

TCONF also this should be done in the test setup()

And optionally we may atempt to raise the limit as long as rlim_max >=
than the size we need we can easily raise the rlim_cur.

-- 
Cyril Hrubis
chrubis@suse.cz

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

  reply	other threads:[~2023-10-31 15:39 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-08-25  6:38 [LTP] [PATCH 1/5] syscalls/mmap08: Rewrite the test using new LTP API Avinesh Kumar
2023-08-25  6:38 ` [LTP] [PATCH 2/5] syscalls/mmap09: " Avinesh Kumar
2023-09-01  8:27   ` Richard Palethorpe
2023-09-01  9:04     ` Cyril Hrubis
2023-09-01  9:11       ` Richard Palethorpe
2023-08-25  6:38 ` [LTP] [PATCH 3/5] syscalls/mmap13: Rewrite the test using new API Avinesh Kumar
2023-09-04  8:54   ` Richard Palethorpe
2023-08-25  6:38 ` [LTP] [PATCH 4/5] syscalls/mmap14: Rewrite test using new LTP API Avinesh Kumar
2023-09-01  9:23   ` Richard Palethorpe
2023-09-05 13:28   ` [LTP] [PATCH v2] " Avinesh Kumar
2023-10-09 10:59     ` Richard Palethorpe
2023-10-31 15:39       ` Cyril Hrubis [this message]
2023-08-25  6:38 ` [LTP] [PATCH 5/5] syscalls/mmap15: " Avinesh Kumar
2023-09-04  9:23   ` Richard Palethorpe
2023-09-05 16:01     ` [LTP] [PATCH v2] " Avinesh Kumar
2023-10-31 15:31       ` Cyril Hrubis
2023-12-11 20:49         ` [LTP] [PATCH v3] " Avinesh Kumar
2024-01-09 17:15           ` Petr Vorel
2024-01-10  9:41             ` Avinesh Kumar
2023-08-30 12:51 ` [LTP] [PATCH 1/5] syscalls/mmap08: Rewrite the " 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=ZUEfsSXxSe4nIsyf@yuki \
    --to=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=rpalethorpe@suse.de \
    /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.