public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Li Wang <liwang@redhat.com>
Cc: Michal Hocko <mhocko@suse.com>, ltp@lists.linux.it
Subject: Re: [LTP] [PATCH 2/3] swapon03: Try to swapon() as many files until it fails
Date: Thu, 6 Nov 2025 10:07:59 +0100	[thread overview]
Message-ID: <20251106090759.GA1008660@pevik> (raw)
In-Reply-To: <CAEemH2fogMWAawF4eqWrLhJphMMq=V8GrO2DFuGxMKEp+zqZ_A@mail.gmail.com>

Hi Li,

...
> >  /*\
> > - * This test case checks whether swapon(2) system call returns:
> > + * Test checks whether :man2:`swapon` system call returns EPERM when the
> > maximum
> > + * number of swap files are already in use.
> >   *
> > - *  - EPERM when there are more than MAX_SWAPFILES already in use.
> > + * NOTE: test does not try to calculate MAX_SWAPFILES from the internal
> > + * kernel implementation (which is currently <23, 29> depending on kernel
> > + * configuration). Instead test exptect that at least 15 swap files minus
> > + * currently used swap can be created.
> >   */

> >  #include <stdio.h>
> > @@ -20,49 +24,54 @@
> >  #include "lapi/syscalls.h"
> >  #include "libswap.h"

> > +#define NUM_SWAP_FILES 15


> Does the number 15 have a specific meaning?

No. I wanted something high enough but reasonably smaller than the current
minimum 23, because it can get even smaller in the future.

Should I move/add some of the docs from docparse doc (the note) to this
definition?

> Anyway, the whole patch set looks good to me:
> Reviewed-by: Li Wang <liwang@redhat.com>

Thanks!

Kind regards,
Petr

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

  reply	other threads:[~2025-11-06  9:08 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-11-05 15:47 [LTP] [PATCH 0/3] swapon03: Try to swapon() as many files until it fails Petr Vorel
2025-11-05 15:47 ` [LTP] [PATCH 1/3] swapon03: Cleanup Petr Vorel
2025-11-05 15:47 ` [LTP] [PATCH 2/3] swapon03: Try to swapon() as many files until it fails Petr Vorel
2025-11-06  3:46   ` Li Wang via ltp
2025-11-06  9:07     ` Petr Vorel [this message]
2025-11-06 10:11   ` Avinesh Kumar
2025-11-06 12:03     ` Petr Vorel
2025-11-06 13:31       ` Avinesh Kumar
2025-11-05 15:47 ` [LTP] [PATCH 3/3] libswap: Remove now unused tst_max_swapfiles() Petr Vorel

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=20251106090759.GA1008660@pevik \
    --to=pvorel@suse.cz \
    --cc=liwang@redhat.com \
    --cc=ltp@lists.linux.it \
    --cc=mhocko@suse.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox