All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Cyril Hrubis <chrubis@suse.cz>,
	ltp@lists.linux.it, Li Wang <liwang@redhat.com>
Subject: Re: [LTP] [PATCH 1/1] libswap: Change TWARN message to TINFO
Date: Wed, 17 Apr 2024 15:37:49 +0200	[thread overview]
Message-ID: <20240417133749.GA4484@pevik> (raw)
In-Reply-To: <20240417122418.GB727397@pevik>

> > Hi!
> > Looking at the patches we get the warning from the is_swap_supported()
> > because we create only 10 blocks worth of swapfile there, right?

> > So the easiest fix is to make sure we create big enough swapfile there
> > as well, what about?

> > diff --git a/libs/libltpswap/libswap.c b/libs/libltpswap/libswap.c
> > index 313a15f24..36b5af483 100644
> > --- a/libs/libltpswap/libswap.c
> > +++ b/libs/libltpswap/libswap.c
> > @@ -192,7 +192,7 @@ int make_swapfile_(const char *file, const int lineno,
> >  bool is_swap_supported(const char *filename)
> >  {
> >         int i, sw_support = 0;
> > -       int ret = SAFE_MAKE_SWAPFILE_BLKS(filename, 10);
> > +       int ret = SAFE_MAKE_SWAPFILE_SIZE(filename, 1);
> Let me first check where it's needed, because SAFE_MAKE_SWAPFILE_BLKS() is
> called on more places.

Yes, not only it's directly used from the library, which affects all swapo{ff,n}
tests, but MAKE_SWAPFILE_BLKS() is also used directly by some of the tests.

Changing it to {SAFE_,}MAKE_SWAPFILE_SIZE() on all places would mean we don't need
{SAFE_,}MAKE_SWAPFILE_BLKS() at all. Therefore I think this check should be
suppressed to TINFO. Other option is to use high enough value (more blocks)
(not sure if using really small swap file makes sense anyway).

> Also, first is needed to move __FILE__, __LINE__ in macros (from function),
> sending patch...

https://lore.kernel.org/ltp/20240417123113.731780-1-pvorel@suse.cz/
https://lore.kernel.org/ltp/20240417123113.731780-1-pvorel@suse.cz/

Kind regards,
Petr

> Kind regards,
> Petr

> >         int fi_contiguous = file_is_contiguous(filename);
> >         long fs_type = tst_fs_type(filename);
> >         const char *fstype = tst_fs_type_name(fs_type);

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

  reply	other threads:[~2024-04-17 13:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-17  9:02 [LTP] [PATCH 1/1] libswap: Change TWARN message to TINFO Petr Vorel
2024-04-17  9:03 ` Andrea Cervesato via ltp
2024-04-17  9:10 ` Petr Vorel
2024-04-17 10:02 ` Cyril Hrubis
2024-04-17 10:06   ` Petr Vorel
2024-04-17 10:31     ` Cyril Hrubis
2024-04-17 12:24       ` Petr Vorel
2024-04-17 13:37         ` Petr Vorel [this message]
2024-04-17 13:42           ` Cyril Hrubis
2024-04-17 18:38             ` Petr Vorel
2024-04-18  5:30               ` 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=20240417133749.GA4484@pevik \
    --to=pvorel@suse.cz \
    --cc=chrubis@suse.cz \
    --cc=liwang@redhat.com \
    --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.