All of lore.kernel.org
 help / color / mirror / Atom feed
From: Cyril Hrubis <chrubis@suse.cz>
To: ltp@lists.linux.it
Subject: [LTP] [PATCH] mkswap: make the test device size is aligned to pagesize
Date: Wed, 17 Aug 2016 13:18:41 +0200	[thread overview]
Message-ID: <20160817111841.GA10343@rei.lan> (raw)
In-Reply-To: <20160817033946.GA6430@gmail.com>

Hi!
> > Now that makes sense.
> > 
> > But if that is the case we still have to align down the device size to
> > the page size at the start of the test. Since the device can also be
> > passed down to the runltp script as a parameter and we cannot make any
> > assumptions about its size.
> 
> Hmm, yes, we have to face the problem.
> 
> A simple idea comes to my mind is that the loop device size should be
> customized by specific testcase(mkswap01.sh).
> 
> That would be happy if function "tst_acquire_device() 'NUM'" can get
> 'NUM' MB block device for testing.
> 
> It means we have to modify another path which about tst_acquire_device().

This is a bad idea for two reasons.

Fist one is that the reason the user passed block device to runltp may
be that the kernel does not support loop devices. In this case the test
would be skipped for no good reason.

The second is that there is another patch in flight that aims to add
minimal size parameter to the tst_acquire_device(). Which is much more
useful.

Why cannot we just simply take the size of the device at start of the
test, align it down to be the multiple of $PAGE_SIZE and use that as the
size for testing?

-- 
Cyril Hrubis
chrubis@suse.cz

  reply	other threads:[~2016-08-17 11:18 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-27  9:58 [LTP] [PATCH] mkswap: make the test device size is aligned to pagesize Li Wang
2016-08-09 16:41 ` Cyril Hrubis
2016-08-15  9:25   ` Li Wang
2016-08-15 12:39     ` Cyril Hrubis
2016-08-16  3:24       ` Li Wang
2016-08-16 12:15         ` Cyril Hrubis
2016-08-17  3:39           ` Li Wang
2016-08-17 11:18             ` Cyril Hrubis [this message]
2016-08-18 11:08               ` Li Wang
2016-08-18 11: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=20160817111841.GA10343@rei.lan \
    --to=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.