All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [PATCH v2 1/1] swapoff01: Define max_runtime 45s
Date: Wed, 4 Sep 2024 07:31:57 +0200	[thread overview]
Message-ID: <20240904053157.GA836933@pevik> (raw)
In-Reply-To: <ZtcoDmsWrMu8Qaze@yuki.lan>

> Hi!
> > Test run mostly below 1 sec per filesystem, only NTFS is very slow
> > ~ 10-15 sec depending on architecture.

> If part of the slowdown is caused by the fact that we format the
> filesystems the real question is if all the tests that format and mount
> a device should have a max_runtime defined. It may make sense to
> increment the max_runtime in the test library to compensate for the
> mkfs, but it looks that it's not the mkfs that is slow.

> I did some measurements for the swapoff01 case and the whole testrun
> runs for about 10 seconds for me. If I change the test to do
> tst_brk(TCONF, ...) as the first thing in the test setup its 1s. So
> writing out the 1MB of swapfile and running mkswap and swapon() on that
> takes about 90% of the runtime.

Thanks for your investigation.

> So yes it looks like the actual test needs some runtime defined,
> although I'm not sure how long it should be. We probably need a
> reference machine to callibrate this on. I would avoid any emulated CPU
> and choose a real hardware. I guess one of the RPis e.g. Pi Zero would
> be a good choice since they are widely available and slow by any modern
> standards.

This makes sense.

Kind regards,
Petr

> > Signed-off-by: Petr Vorel <pvorel@suse.cz>
> > ---
> > Changes v1->v2:
> > * 60 => 45

> >  testcases/kernel/syscalls/swapoff/swapoff01.c | 1 +
> >  1 file changed, 1 insertion(+)

> > diff --git a/testcases/kernel/syscalls/swapoff/swapoff01.c b/testcases/kernel/syscalls/swapoff/swapoff01.c
> > index 314630267d..ef75c92de0 100644
> > --- a/testcases/kernel/syscalls/swapoff/swapoff01.c
> > +++ b/testcases/kernel/syscalls/swapoff/swapoff01.c
> > @@ -53,5 +53,6 @@ static struct tst_test test = {
> >  	.all_filesystems = 1,
> >  	.needs_root = 1,
> >  	.test_all = verify_swapoff,
> > +	.max_runtime = 45,
> >  	.setup = setup
> >  };
> > -- 
> > 2.45.2

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

  reply	other threads:[~2024-09-04  5:32 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-03 14:03 [LTP] [PATCH v2 1/1] swapoff01: Define max_runtime 45s Petr Vorel
2024-09-03 15:15 ` Cyril Hrubis
2024-09-04  5:31   ` Petr Vorel [this message]
2024-09-04  8:52     ` Cyril Hrubis
2024-09-04  9:26       ` Li Wang
2024-09-04  9:37         ` Li Wang
2024-09-04 10:07           ` Petr Vorel
2024-09-04 13:58         ` Cyril Hrubis
2024-09-07  2:05           ` Li Wang
2024-09-09  2:52 ` [LTP] [PATCH v3] swapoff01/swapon01: Define max_runtime 1 mins Li Wang
2024-09-09 11:05   ` Avinesh Kumar
2024-09-09 11:46   ` Jan Stancek
2024-09-09 12:54   ` Cyril Hrubis
2024-09-09 14:02     ` Li Wang

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=20240904053157.GA836933@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=ltp@lists.linux.it \
    /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.