[LTP] [PATCH v2 1/2] libswap: Add {SAFE_, }MAKE_MINIMAL_SWAPFILE() macros

Petr Vorel pvorel@suse.cz
Fri Apr 19 11:40:27 CEST 2024


> On Fri, Apr 19, 2024 at 2:12 PM Petr Vorel <pvorel@suse.cz> wrote:

> > > On Fri, Apr 19, 2024 at 9:50 AM Li Wang <liwang@redhat.com> wrote:

> > > > Hi Petr, Cyril,

> > > > The patchset generally looks good.

> > > > But I have a concern about the macro name "MINIMAL" word,
> > > > which misled people to think that is the minimal swapfile size we
> > > > can make on the system, but obviously it is not, we could even
> > > > create a smaller one, right?

> > > > Can we rename it with a better one?


> > > What about MAKE_DEFAULT_SWAPFILE, or MAKE_TEST_SWAPFILE?

> > I want to somehow express that it's a really small swap file
> > (although sure, not minimal). Sure, it can be "default" or "test",
> > but it does not say anything about the size.


> Why do we have to emphasize the "small" swap file?

To make obvious on a first look that we are testing something which is not
typical use case (who creates 1MB swap file in reality?).

We have 5 swap tests: 2x not that big but it could be real swap usage (65536
blocks ~ 262 MB when 4kb and 128 MB) and the rest is 5x that 10 blocks, which
would be now changed 1 MB. Therefore most of them are small, not really
realistic size. Therefore it'd be good to make it obvious already from the test
source.

Kind regards,
Petr

> If we choose to use of "default" 1MB for LTP test but not
> explicitly declarant in the name, that's okay, people can
> check the defined value if they are interested.




> > Kind regards,
> > Petr


More information about the ltp mailing list